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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(stage): Handle SKIPPED tasks and synthetic stages #3837

Merged
merged 4 commits into from
Jul 29, 2020

Conversation

gomid
Copy link
Contributor

@gomid gomid commented Jul 28, 2020

This PR is to fix spinnaker/spinnaker#5936.

Before this PR, CompleteStageHandler treats SKIPPED tasks/synthetics as "unhandled condition".
As a result, SKIPPED tasks and synthetic stages will mark the (parent) stage as TERMINAL.
This is not desirable because:

  • SKIPPED is benign
  • a SKIPPED stage won't fail a pipeline and the behaviour is inconsistent
  • SKIPPED has valid use cases, for example synthetic stages conditional on parent stage output

After this PR, SKIPPED task or synthetic stage won't fail (parent) stage.
A special case is where all the tasks are skipped. The stage status will be SUCCEEDED instead of SKIPPED, to differentiate from the case where the stage itself is conditional and skipped.

Copy link
Contributor

@marchello2000 marchello2000 left a comment

Choose a reason for hiding this comment

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

thanks, looks good to me

@marchello2000 marchello2000 added the ready to merge Approved and ready for merge label Jul 28, 2020
@mergify mergify bot added the auto merged Merged automatically by a bot label Jul 28, 2020
@mergify mergify bot merged commit 2c78d69 into spinnaker:master Jul 29, 2020
KathrynLewis pushed a commit to KathrynLewis/orca that referenced this pull request Jan 31, 2021
* fix(stage): Handle SKIPPED tasks and synthetic stages

* fix lint

Co-authored-by: Qijia Wang <qijia.wang@grabtaxi.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merged Merged automatically by a bot ready to merge Approved and ready for merge target-release/1.22
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Orca] Skipped synthetic stage should not fail parent stage
3 participants