-
Notifications
You must be signed in to change notification settings - Fork 220
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
TEP-0007: Conditions Beta Skipping - When Scope #258
Conversation
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.
Thank you for the updates!
This is a really an important feature of Tekton, thanks for driving this forward.
I wonder if this should be a new TEP instead? @vdemeester @bobcatfish
I don't have a strong feeling about this, if amending the TEP is the preferred approach I'm ok with that.
I'm getting a bit confused about all the guarding options and how they relate to one each other. I think it would be really useful to draw a few diagrams for the different types of conditions / behaviours in case of condition not met, and associate the proposed syntax for each of them.
/test pull-community-teps-lint |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
thank you for the review @afrittoli 🙏 i described the components and their behavior in further detail, and added a diagram to demonstrate different scenarios i prefer having it in one TEP so that all the proposals, alternatives and other related info are in one place...there would also be a lot of repetition if we split it up |
5aaa065
to
446a548
Compare
adding `scope` and `expressions` field to allow bundling of the specifications of when expressions and their skipping options. scope can take either `Node` and `Branch`, where `scope` can be set to `Node` in guarded tasks with ordering-dependent tasks only and to allow the execution of the branch
@tektoncd/core-maintainers this tep is ready for review, specifically looking for feedback and suggestions on the naming and syntax We propose the naming
We considered
|
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.
I have one open question about the best way to implement the different syntaxes in a single field but otherwise this looks good to me!
/lgtm |
- can take the values `Branch` or `Node` only; there will be a validation error if anything else is passed to `scope` | ||
- can take the value `Node` in guarded `Nodes` with ordering dependencies only; there will be a validation error if `scope` is set to `Node` in `Nodes` with resource dependencies | ||
|
||
The latter syntax allows us to make it explicit that the skipping policy, as specified by `WhenScope`, is related to the `WhenExpressions`. We can support both the former and latter syntaxes initially then give users 9 months to migrate to the new syntax, per [the beta api policy](https://github.com/tektoncd/pipeline/blob/master/api_compatibility_policy.md). |
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.
Are we saying users who migrated to when expressions with 0.16
(old syntax) will not be benefited with this feature? To make use of this feature, users will have to migrate to this new syntax 🤔 I feel we had promised continueAfterSkip
with the old syntax and now proposing continueAfterSkip
only possible with new syntax? wdyt?
values: ['bar'] | ||
``` | ||
|
||
The `scope` field is optional, defaults to `Branch` and can be set to `Branch` to specify that the `Node`'s `WhenExpressions` guard the execution of the `Branch` (the `Node` and its dependent `Nodes`). However, when `Node` has ordering dependencies only, users can set the `scope` field to `Node` to specify that the `Node`'s `WhenExpressions` guard the execution of the `Node` only, thus the all dependent nodes (which are ordering dependent tasks only) can be executed. |
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.
I understand Node
as self
, when expressions is limited to that particular pipelineTask/node where it's defined. And Branch
includes all dependencies i.e. all dependencies are impacted (skipped) by the when expressions of a parent task.
Update from API WG: @jerop is currently exploring other alternatives, will update |
hey @jerop when you get back to this PR, is it possible to update TEP-0007 with some links to relevant issues in the pipelines repo? i was trying to track them down and it'd be very handy to be able to find them here |
Adding
scope
andexpressions
field towhen
allow bundling of thespecifications of when expressions and their skipping options
scope
defaults toBranch
and be set toNode
in guarded tasks withordering-dependent tasks only and to allow the execution of the branch
other alternatives considered in doc
/cc @bobcatfish @pritidesai @sbwsg