-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix: Move when condition to higher priority #8569
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
Conversation
|
Hi @Allda. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
/ok-to-test |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
When using "when" condition in pipelinerun definition we can sometime get into a situation when a task would be skipped due to "when" condition but instead it is skipped either by parent is skipped or result reference is missing. This behaviour has a negative impact on the rest of the tasks in the pipeline. A good example of this issue is represented by this pipeline: A -> B -> C In case B depends on A's result and both A and B uses when condition that both evaluates to false the C is automatically skipped with "Parent Tasks were skipped" even-though C doesn't depend on any previous results. With this change both A and B are skipped by evaluating the "when" condition and C is executed as expected. This commit address the bug tektoncd#7680. Signed-off-by: Ales Raszka <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! It looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@vdemeester @afrittoli Is there anything else needed in this PR or can it be merged? |
Nothing is missing. It's in |
It's in queue for merge after #8524, but CI was stalling there. |
When using "when" condition in pipelinerun definition we can sometime get into a situation when a task would be skipped due to "when" condition but instead it is skipped either by parent is skipped or result reference is missing. This behaviour has a negative impact on the rest of the tasks in the pipeline.
A good example of this issue is represented by this pipeline:
A -> B -> C
In case B depends on A's result and both A and B uses when condition that both evaluates to false the C is automatically skipped with "Parent Tasks were skipped" even-though C doesn't depend on any previous results.
With this change both A and B are skipped by evaluating the "when" condition and C is executed as expected.
This commit address the bug #7680.
Changes
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes
/kind bug