-
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
Dependent Task after Task with when condition are skipped #7680
Comments
I once encountered a similar problem, and I suspect it is related to the status "Results were missing" in Phase B. |
I'm not sure if this behavior is by design or a bug. Relevant code: pipeline/pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go Lines 306 to 319 in 123f4a2
pipeline/pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go Lines 367 to 388 in 123f4a2
pipeline/pkg/apis/pipeline/v1/pipelinerun_types.go Lines 550 to 565 in 123f4a2
|
I think this is the relevant section of the docs on when expressions:
Specifically the last point. Also from the example just after that:
As far as I understand this matches the behaviour you're describing so is working as designed. |
I have spent last several days reading the documentation about how the conditional Tekton task works so I understand why this is happening, but on the other hand if a task depends on the previous one (B depends on A) and B is is not executed due to Would you happen to have any suggestions on how to workaround this? The usecase for this is when a pipeline contains a series of task that depends on each other and are controlled by input parameter. In such a case with a current behavior, the pipeline always skips the rest of the pipeline even though there are no missing data for dependencies. |
Due to a Tekton limitation we can't execute a merge task if any previous tasks have been skipped. This usually happens when not bundle is added and ci.yaml file is updated. Until tekton enables this workflow I am temporarily move the merge task into finally section. The issue has been create in Tekton upstream to fix this issue tektoncd/pipeline#7680 JIRA: ISV-4476 Signed-off-by: Ales Raszka <[email protected]>
Due to a Tekton limitation we can't execute a merge task if any previous tasks have been skipped. This usually happens when not bundle is added and ci.yaml file is updated. Until tekton enables this workflow I am temporarily move the merge task into finally section. The issue has been create in Tekton upstream to fix this issue tektoncd/pipeline#7680 JIRA: ISV-4476 Signed-off-by: Ales Raszka <[email protected]>
Due to a Tekton limitation we can't execute a merge task if any previous tasks have been skipped. This usually happens when not bundle is added and ci.yaml file is updated. Until tekton enables this workflow I am temporarily move the merge task into finally section. The issue has been create in Tekton upstream to fix this issue tektoncd/pipeline#7680 JIRA: ISV-4476 Signed-off-by: Ales Raszka <[email protected]>
Due to a Tekton limitation we can't execute a merge task if any previous tasks have been skipped. This usually happens when not bundle is added and ci.yaml file is updated. Until tekton enables this workflow I am temporarily move the merge task into finally section. The issue has been create in Tekton upstream to fix this issue tektoncd/pipeline#7680 JIRA: ISV-4476 Signed-off-by: Ales Raszka <[email protected]>
@AlanGreene @l-qing Do you know if this issue can be workaround somehow until we get any official conclusion of this issue? |
I checked the code briefly and I think moving pipeline/pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go Lines 309 to 332 in 123f4a2
|
@Allda did you get anywhere with this? I think we are facing the same issue. |
@willejs-ec Unfortunately I haven't. Due to this limitation, I wasn't able to use any |
We're facing the same issue. |
We are facing same issue, BTW I think this duplicates stale (but still open) issue that I just commented on before seeing this one: #7029 |
Expected Behavior
Hello, I am building a pipeline with a conditional series of tasks that use the same
when
condition, after that series of tasks there is one or more other tasks that don't have the condition.Simplified task schema looks like this
A -> B -> C
where A and B use the condition given by the pipeline argument. At the same time, B uses the output of A as an input parameter.
I expect the C is triggered regardless of A or B but as shown bellow this is no the case and if A and B are skipped the C is also skipped.
Actual Behavior
Based on the pipeline argument A and B are skipped as expected, but C is also skipped which is unexpected. Skipped reasons are the following:
A -
When Expressions evaluated to false
B -
Results were missing
< -- This task useswhen
and should be also skipped the same way as taskA
C -
Parent Tasks were skipped
Steps to Reproduce the Problem
Additional Info
Client Version: 4.14.6
Kustomize Version: v5.0.1
Server Version: 4.13.31
Kubernetes Version: v1.26.13+77e61a2
Client version: 0.33.0
Chains version: v0.16.1
Pipeline version: v0.47.6
Triggers version: v0.24.2
Operator version: v0.67.3
The text was updated successfully, but these errors were encountered: