-
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
WhenExpressions are neglected when finally tasks are present #3196
Comments
Tasks with when expressions using variables that evaluated to false were mistakenly were mistakenly executed because we missed an additional check to validate that the task should be skipped after variable replacement. Fixes tektoncd#3196
Quick update: @jerop is working on these and we'll make a 0.16.1 release (https://github.com/tektoncd/pipeline/milestone/34) once these are fixed. Thanks for the quick report @VeereshAradhya !! |
The issue is when expression param is not getting resolved and remains as is when a list of candidates are calculated. pipeline/pkg/reconciler/pipelinerun/pipelinerun.go Lines 502 to 510 in f97f6b5
This is what
pipeline/pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go Lines 163 to 167 in f97f6b5
Sometimes
and at times it does:
|
when expression with constants works as expected in presence of finally tasks. |
when expression with task results (with PR #3197) behaves odd with finally tasks. PipelineRun gets stuck and finally tasks are waiting for their turn to be scheduled 😞 I havent got chance to debug this but here is a sample pipelinerun and its output.
Output of |
Thanks @pritidesai ! @jerop and i were able to make some progress towards a fix (wip in master...bobcatfish:when_finally if you're curious) - don't want to rush it so ETA for getting this in will be next week, hoping to have a release with a fix Monday! |
Thanks @bobcatfish, was just talking to @jerop, yup no rush, lets fix it right. Both the issues mentioned above (when expression params and task results not getting resolved in presence of finally task) are connected to the when expression resolution : pipeline/pkg/apis/pipeline/v1beta1/when_types.go Lines 109 to 114 in 204a403
I was asking @jerop if we can modify this function to:
If we fix this logic, we might not need Examples: when-expression-params-with-finally.yaml Changes on fixing first example very similar to what you have 😜 |
Mix of |
Expected Behavior
WhenExpressions should work when finally tasks are present
Actual Behavior
WhenExpressions will not work when finally tasks are present
Steps to Reproduce the Problem
Additional Info
Kubernetes version:
Output of
kubectl version
:Tekton Pipeline version:
Command Execution Logs:
Execution logs contain the output of both
pipeline with finally task
andpipeline without finally task
The text was updated successfully, but these errors were encountered: