Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use stopAndFail instead of fail with onError 馃 #497

Merged
merged 1 commit into from
Aug 13, 2021

Conversation

bobcatfish
Copy link
Contributor

This commit proposes changing the wording of the fail option for
onError from fail to make it more explicitly clear that this option
(which is the default behavior when onError is not specified) will
both cause the Task to fail AND stop execution of any subsequent steps.

This change doesn't propose changing any of the described functionality,
just the value of the field.

PTAL @pritidesai @vdemeester ( @afrittoli I think you're on holiday right now, given this is such a minor change I'm assuming you will be okay with it but strong apologies if not!! 馃檹 )

This commit proposes changing the wording of the `fail` option for
`onError` from `fail` to make it more explicitly clear that this option
(which is the default behavior when `onError` is not specified) will
both cause the Task to fail AND stop execution of any subsequent steps.

This change doesn't propose changing any of the described functionality,
just the value of the field.
@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 12, 2021
@bobcatfish
Copy link
Contributor Author

p.s. if anyone can think of better wording than stopAndFail this is the time! 馃檹

@bobcatfish bobcatfish added the kind/tep Categorizes issue or PR as related to a TEP (or needs a TEP). label Aug 12, 2021
@pritidesai
Copy link
Member

thanks @bobcatfish, sounds good 馃憤

The same pattern can be extended to propose debug functionality, debugAndFail, debugAndContinue, etc

/approve

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 12, 2021
bobcatfish added a commit to bobcatfish/pipeline that referenced this pull request Aug 12, 2021
This commit proposes changes the wording of the `fail` option for
`onError` from `fail` to make it more explicitly clear that this option
(which is the default behavior when `onError` is not specified) will
both cause the Task to fail AND stop execution of any subsequent steps.

This change doesn't propose changing any of the described functionality,
just the value of the field.

Change to the TEP should be approved before this is merged
(tektoncd/community#497) and if we go ahead with
it we should do a patch release ASAP to minimize user impact - that
being said, this change impacts the default value of the field which
users are unlikely to specify explicitly - users are much more likely to
start using `onError: continue` and for them there would be no impact.
@ghost
Copy link

ghost commented Aug 12, 2021

/approve

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stopAndFail or failAndStop ? 馃槤
But yeah, nothing against this change 馃懠馃徏

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pritidesai, sbwsg, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@bobcatfish
Copy link
Contributor Author

stopAndFail or failAndStop ? 馃槤

haha good question @vdemeester ! talked it over with some folks and currently leaning toward stopAndFail for 2 reasons:

  1. The first thing that happens is the stopping (i.e. dont move to the next step) and only after that is the task marked failed (i.e. the order of operations is first stop, second fail)
  2. The other option is continue so maybe it makes sense to emphasize that this option does the opposite thing (stopping)

But anyway I think either is totally reasonable :D

@pritidesai
Copy link
Member

Thank you everyone 馃檹
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 13, 2021
@tekton-robot tekton-robot merged commit 1411122 into tektoncd:main Aug 13, 2021
tekton-robot pushed a commit to tektoncd/pipeline that referenced this pull request Aug 13, 2021
This commit proposes changes the wording of the `fail` option for
`onError` from `fail` to make it more explicitly clear that this option
(which is the default behavior when `onError` is not specified) will
both cause the Task to fail AND stop execution of any subsequent steps.

This change doesn't propose changing any of the described functionality,
just the value of the field.

Change to the TEP should be approved before this is merged
(tektoncd/community#497) and if we go ahead with
it we should do a patch release ASAP to minimize user impact - that
being said, this change impacts the default value of the field which
users are unlikely to specify explicitly - users are much more likely to
start using `onError: continue` and for them there would be no impact.
tekton-robot pushed a commit to tektoncd/pipeline that referenced this pull request Aug 16, 2021
This commit proposes changes the wording of the `fail` option for
`onError` from `fail` to make it more explicitly clear that this option
(which is the default behavior when `onError` is not specified) will
both cause the Task to fail AND stop execution of any subsequent steps.

This change doesn't propose changing any of the described functionality,
just the value of the field.

Change to the TEP should be approved before this is merged
(tektoncd/community#497) and if we go ahead with
it we should do a patch release ASAP to minimize user impact - that
being said, this change impacts the default value of the field which
users are unlikely to specify explicitly - users are much more likely to
start using `onError: continue` and for them there would be no impact.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/tep Categorizes issue or PR as related to a TEP (or needs a TEP). lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants