-
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
When Expressions Status #3139
Comments
A few options:
My preference is (4), when skipped, don't set Condition Successful at all, b/c the TaskRun didn't start running at all |
I think 4 is the ideal choice here with slight modification, introduce a new condition "Skipped" and set it to Pros:
Cons:
|
I think it's desirable to get away from shoehorning the condition status under a non-existent TaskRun name (which is how it worked with Condition). What about introducing a separate status key that lists the skipped pipeline task names? That section could also list why each one was skipped (
|
I think it's worth exploring @GregDritschler 's suggestion before we decide - it is strange that we pretend a TaskRun has been created when one has not Quick comment about the other options: downside of using Successful:True in this case is that this might imply things we don't want to imply, e.g. right now Successful:True would imply that a Task's results are available |
Thank you for the idea @GregDritschler! Experimented with it and I think that telling users that Taking this example: apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: pipelinerun-to-skip-task
spec:
pipelineSpec:
tasks:
- name: skip-this-task
when:
- input: "foo"
operator: in
values: ["bar"]
- input: "foo"
operator: notin
values: ["foo"]
taskSpec:
steps:
- name: echo
image: ubuntu
script: |
echo "Good Night!"
- name: run-this-task
when:
- input: "foo"
operator: in
values: ["foo"]
taskSpec:
steps:
- name: echo
image: ubuntu
script: |
echo "Good Morning!" We would get:
|
@jerop That looks great to me. |
I think I like this direction as well - @jerop I hate to ask you to do more TEP work but I could see this making sense as a short TEP? i.e. capturing the different options and some examples, esp. b/c this has ripple effects on projects like CLI and Dashboard that want to be able to tell when something has been skipped (and iirc struggled a bit with the current Success: false approach) If possible I'd like to avoid blocking your current work: Of all the options, i wonder which would be the easiest to change? I'm thinking that having a separate Curious what you think also @pritidesai ! |
@bobcatfish its exciting and indicating might be the solution that we are circling back to maintaining a list of skipped pipeline tasks 😹 I like going with @GregDritschler's suggestion as well. @jerop any impact on the existing PR #3135 if we go this route? |
already added Skipped to the PR
yes, will open a TEP proposing this solution and discussing the alternatives we considered -- in a flow with implementing when expressions but will write the tep shortly
the map of skipped tasks and their when expressions + results is easiest to change in my opinion, changing the ConditionSucceeded/ConditionSkipped later could get confusing |
why didn't you do it at that time? what was the concern with doing that when you considered it? |
(There's some discussion about this too in the conditions proposal - in general id say we haven't given status design the attention it deserves and our discussions always focus more on spec) |
Here is my take: List of
|
@pritidesai sure! will send you a draft :) |
Proposing the design of When Expressions Status and discussing the alternatives discussed in tektoncd/pipeline#3139 Related TEP: tektoncd#159
Proposing the design of When Expressions Status and discussing the alternatives discussed in tektoncd/pipeline#3139 Related TEP: tektoncd#159
Proposing the design of When Expressions Status and discussing the alternatives discussed in tektoncd/pipeline#3139 Related TEP: tektoncd#159
Proposing the design of When Expressions Status and discussing the alternatives discussed in tektoncd/pipeline#3139 Related TEP: #159
When a Task is skipped because its When Expressions evaluated to false, its resolved When Expressions are listed alongside the PipelineTaskName in the SkippedTasks section of the PipelineRunStatus. When a Task is executed bacause its When Expressions evaluate to true, its resolved When Expressions are listed in the TaskRuns section of the PipelineRunStatus. Further details in https://github.com/tektoncd/community/blob/master/teps/0007-conditions-beta.md#status-1 Closes tektoncd#3139
When a Task is skipped because its When Expressions evaluated to false, its resolved When Expressions are listed alongside the PipelineTaskName in the SkippedTasks section of the PipelineRunStatus. When a Task is executed bacause its When Expressions evaluate to true, its resolved When Expressions are listed in the TaskRuns section of the PipelineRunStatus. Further details in https://github.com/tektoncd/community/blob/master/teps/0007-conditions-beta.md#status-1 Closes tektoncd#3139
When a Task is skipped because its When Expressions evaluated to false, its resolved When Expressions are listed alongside the PipelineTaskName in the SkippedTasks section of the PipelineRunStatus. When a Task is executed bacause its When Expressions evaluate to true, its resolved When Expressions are listed in the TaskRuns section of the PipelineRunStatus. Further details in https://github.com/tektoncd/community/blob/master/teps/0007-conditions-beta.md#status-1 Closes tektoncd#3139
When a Task is skipped because its When Expressions evaluated to false, its resolved When Expressions are listed alongside the PipelineTaskName in the SkippedTasks section of the PipelineRunStatus. When a Task is executed because its When Expressions evaluated to true, its resolved When Expressions are listed in the TaskRuns section of the PipelineRunStatus. Further details in https://github.com/tektoncd/community/blob/master/teps/0007-conditions-beta.md#status-1 Closes tektoncd#3139
When a Task is skipped because its When Expressions evaluated to false, its resolved When Expressions are listed alongside the PipelineTaskName in the SkippedTasks section of the PipelineRunStatus. When a Task is executed because its When Expressions evaluated to true, its resolved When Expressions are listed in the TaskRuns section of the PipelineRunStatus. Further details in https://github.com/tektoncd/community/blob/master/teps/0007-conditions-beta.md#status-1 Closes #3139
Tracking discussions about When Expressions Status, particularly:
ConditionSucceeded
in When ExpressionsConditionsSkipped
type to use in place ofConditionSucceeded
@pritidesai's comment:
@jerop's comment:
@bobcatfish's comment:
/assign
The text was updated successfully, but these errors were encountered: