-
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
Allow steps to run regardless of previous step errors #1573
Conversation
[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 |
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
This commit introduces an `errorStrategy` field to Steps and a `defaultErrorStrategy` field to Tasks. These fields can currently accept one of two possible strategies. The first is `SkipOnPriorStepErrors` and tells the Step to skip its work if a prior step has failed. This is how Tekton works today and is therefore the default value if the field is omitted or left blank. The second strategy is `IgnorePriorStepErrors` and tells a step to run regardless of whether a previous step has already errored out. This feature is intended to serve two similar use-cases: 1. Unit test failures in a step can be written to the task workspace and then uploaded to persistent storage in a subsequent step, even though the unit test failure resulted in a non-zero exit code. 2. Pipeline resources that need to report on the failed status of a step can do so. For example the pull request resource could be updated to add a final step to a Task that updates a PR with the status of a build step. Currently if a build step fails then any later steps will be skipped.
The following is the coverage report on pkg/.
|
With respect to output pipeline resources I don't observe any obvious change in their behaviour with this PR. I modified |
ok i think this is ready to review now. |
/hold humble request to be able to review this before it goes in - but am swamped with kubecon until after next week 🙏 which im guessing is the case for most OWNERS |
i'm going to close this until after kubecon when it can be discussed further. will just keep it as part of my resources branch. |
Fixes #1559
Changes
Outstanding TODOs:
defaultErrorStrategy
behaviour: its value should be copied into any steps that dont include their ownerrorStrategy
field.This commit introduces an
errorStrategy
field to Steps and adefaultErrorStrategy
field to Tasks. These fields can currently accept one of two possible strategies. The first isSkipOnPriorStepErrors
and tells the Step to skip its work if a prior step has failed. This is how Tekton works today and is therefore the default value if the field is omitted or left blank. The second strategy isIgnorePriorStepErrors
and tells a step to run regardless of whether a previous step has already errored out.This feature is intended to serve two similar use-cases:
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Double check this list of stuff that's easy to miss:
cmd
dir, please updatethe release Task to build and release this image.
Reviewer Notes
If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.
Release Notes