-
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
[TEP-0050] Add OnError field #7162
[TEP-0050] Add OnError field #7162
Conversation
Skipping CI for Draft Pull Request. |
> :seedling: This feature is in **Preview Only** mode and not yet supported/implemented. | ||
|
||
When a `PipelineTask` fails, the rest of the `PipelineTasks` are skipped and the `PipelineRun` is declared a failure. If you would like to | ||
ignore such `PipelineTask` failure and continue executing the rest of the `PipelineTasks`, you can specify `onError` for such a `PipelineTask`. |
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.
What about the case when the Task produces a result that may be needed downstream or by the pipeline?
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.
Wouldn't setting it to just "continue" without providing a value to the outputs of the task make it fail?
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.
Sorry! I spoke too soon. You already go over that use case below.
``` | ||
|
||
- If the consuming `PipelineTask` has `OnError:stopAndFail`, the `PipelineRun` will fail with `InvalidTaskResultReference`. | ||
- If the consuming `PipelineTask` has `OnError:continue`, the consuming `PipelineTask` will be skipped with reason `Results were missing`, |
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.
Just confirming. This would ensure that all the subsequent Tasks that in-turn depend on this skipped Task would also be skipped right?
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.
Yeah, and to be more specific:
all subsequent resource-dependent tasks (with onError:continue
) would be skipped if the result is not emitted.
Thanks for the PR @QuanZhang-William. I think the |
why don't we add the docs when the feature is implemented? |
Hi @chitrangpatel, sure I can put them in a single PR. I don't think we need to apply default values for this field though (which is same for |
Hi @Yongxuanzhang. Seems like this the pattern we follow recently:
I feel users could be confused if we add an API field but has no documentation on it. I have called out in the doc that the feature is WIP and do not use it. |
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
Could you also link the issue to track all the work plan? Thanks! |
9acd0bd
to
8b55c08
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
8b55c08
to
a97c1e8
Compare
Sure, tracking issue added: #7165 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Yongxuanzhang 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 |
7989360
to
3729c9a
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
3729c9a
to
ec04b1d
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
@QuanZhang-William I think we should remove the release note - release notes are aimed towards users and since the feature doesn't work yet, I think it is confusing to add it otherwise, LGTM |
/lgtm |
/retest |
In [TEP-0050][tep-0050], we proposed to add an `OnError` API field under `PipelineTask` to configure error handling strategy. This commits add the new `OnError` API field and the related validation, conversion and validation. The business logic will be added in the follow-up PRs. Note: OnError is in preview mode and not yet supported. /kind feature [tep-0050]: https://github.com/tektoncd/community/blob/main/teps/0050-ignore-task-failures.md
ec04b1d
to
c2185d9
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/lgtm |
/test pull-tekton-pipeline-integration-tests |
Changes
Part of #7165. In TEP-0050, we proposed to add an
OnError
API field underPipelineTask
to configure error handling strategy.This commits add the new
OnError
API field and the related documentations. The validation and business logic will be added in the follow-up PRs.Note: OnError is in preview mode and not yet supported.
/kind feature
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