-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance user-facing Condition/ContainerTerminated Reasons with backwards compatibility #7539
Comments
/assign @renzodavid9 |
@JeromeJu: GitHub didn't allow me to assign the following users: renzodavid9. Note that only tektoncd members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign me |
@renzodavid9: GitHub didn't allow me to assign the following users: me. Note that only tektoncd members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign |
Through offline discussion with @renzodavid9 , we've examined that it might not be a feasible way to create a new field in the pod container status to update the container termination reason since these are all knative rather than Tekton conditions.
|
One other question is that are making changes to PipelineRunStatus Condition Reason and PipelineRunStatus Condition Reason also considered as breaking changes? It looks like that Dashboard relies on the ConditionStatus on this to determine the completion of a PipelineRun (similarly for TaskRuns). Does this imply that the changes made to PipelineRunStatus/TaskRunStatus Reasons will not be breaking changes for Dashboard and others that consumes such status? cc @AlanGreene @vdemeester @tektoncd/core-collaborators 🙏 |
Thanks @AlanGreene for confirming the understanding on this 🙏 |
It depends on whether this information is only intended for user consumption or if it's also intended to be used by clients / automation. If it's intended for clients I don't think the message is a good option. Today I believe most clients treat it as an opaque string and avoid parsing it. If we change this we would need to define a clear API contract for its structure, content, etc. and guard against unexpected changes. |
Following on #7539 (comment), and according with offline conversation with @JeromeJu , to avoid extending the ContainerStateTerminated from the k8s lib, we can instead modify the StepStatus from Tekton to add the new field. It will look something like this: apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
name: task1
...
status:
steps:
- container: step-first
imageID: docker-pullable://busybox@sha256:ba76950ac9eaa407512c9d859cea48114eeff8a6f12ebaa5d32ce79d4a017dd8
name: first
terminationReason: AnyReason # <- This will be the new field
terminated:
containerID: docker://aaa111222
exitCode: 1
finishedAt: "2024-01-08T16:27:38Z"
reason: Error
startedAt: "2024-01-08T16:27:38Z" |
Thansk @renzodavid9 for the discussion and this! The next AI for us might be to create a PR RFC(requesting for feedback). i.e. And we could together have some documentations in the deprecations md and elsewhere to claim our migration plan when moving to v2alpha1. |
Related with tektoncd#7539 and tektoncd#7223 To report specific Steps termination reasons we need to know why its continer finished; we use the termination message to store a new "state" with this information. We are adding a new field to store this information per step. Co-authored-by: JeromeJu <46675578+JeromeJu@users.noreply.github.com> Co-authored-by: Chitrang Patel <chitrang@google.com>
Related with tektoncd#7539 and tektoncd#7223 To report specific Steps termination reasons we need to know why its continer finished; we use the termination message to store a new "state" with this information. We are adding a new field to store this information per step. Co-authored-by: JeromeJu <46675578+JeromeJu@users.noreply.github.com> Co-authored-by: Chitrang Patel <chitrang@google.com>
Hello there! The open PR for this currently has ~19 tests failing (unit + integration). This is mainly due to the new field, Other alternative discussed:
Making the observation in case we have comments from members in the community. Thanks a lot! 😄 |
Related with tektoncd#7539 and tektoncd#7223 To report specific Steps termination reasons we need to know why its continer finished; we use the termination message to store a new "state" with this information. We are adding a new field to store this information per step. Co-authored-by: JeromeJu <46675578+JeromeJu@users.noreply.github.com> Co-authored-by: Chitrang Patel <chitrang@google.com>
Related with tektoncd#7539 and tektoncd#7223 To report specific Steps termination reasons we need to know why its continer finished; we use the termination message to store a new "state" with this information. We are adding a new field to store this information per step. Co-authored-by: JeromeJu <46675578+JeromeJu@users.noreply.github.com> Co-authored-by: Chitrang Patel <chitrang@google.com>
Related with tektoncd#7539 and tektoncd#7223 To report specific Steps termination reasons we need to know why its continer finished; we use the termination message to store a new "state" with this information. We are adding a new field to store this information per step. Co-authored-by: JeromeJu <46675578+JeromeJu@users.noreply.github.com> Co-authored-by: Chitrang Patel <chitrang@google.com>
Related with tektoncd#7539 and tektoncd#7223 To report specific Steps termination reasons we need to know why its continer finished; we use the termination message to store a new "state" with this information. We are adding a new field to store this information per step. Co-authored-by: JeromeJu <46675578+JeromeJu@users.noreply.github.com> Co-authored-by: Chitrang Patel <chitrang@google.com>
Related with #7539 and #7223 To report specific Steps termination reasons we need to know why its continer finished; we use the termination message to store a new "state" with this information. We are adding a new field to store this information per step. Co-authored-by: JeromeJu <46675578+JeromeJu@users.noreply.github.com> Co-authored-by: Chitrang Patel <chitrang@google.com>
We have had use cases as specified in #7223 and #7396 that downstream users and Tekton providers would want to have more granular error reasons. As discussed at the API WG and #7390, the existing CRDs {Step, TaskRun, PipelineRun} rely on knative.dev/pkg/apis#Condition for conveying user-facing reasons.
However these Condition reasons are being relied on for our Pipeline For example, dashboard will rely on the error reason to determine the step status.
Blocked issues:
Surfacing of actual Termination Reason in Step Status
Surface TaskRun failure reason when Step or Pod fails
Make user-facing condition messages more granular as canonical error codes
Current workaround:
Option 1: Add a new provisional field in the CRDs for {Step, TaskRun, PipelineRun} Condition/ContainerTerminatedState status
Option 2: Add it to the condition/containerTerminated message
Future work plan:
With a major version bump, i.e. in v2alpha1, we would be able to change the Condition/ContainerTerminated Reason
co-authored with: @renzodavid9
The text was updated successfully, but these errors were encountered: