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

Return the deployment result in exit code for all failures #6258

Merged
merged 4 commits into from
Nov 29, 2023

Conversation

demolitionmode
Copy link
Contributor

Which issue(s) does this change fix?

#5103

Why is this change necessary?

When a stack fails to deploy, the exit code should reflect this regardless of it being rolled back (through use of --on-failure DELETE)

How does it address the issue?

Setting --on-failure DELETE no longer skips the raise line; rather, the condition will only determine whether deployer.rollback_delete_stack() is called or not.

What side effects does this change have?

Users who rely on the previous behaviour would need to ignore this fix, with something like sam deploy || true

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • Add input/output type hints to new functions/methods
  • Write design document if needed (Do I need to write a design document?)
  • Write/update unit tests
  • Write/update integration tests
  • Write/update functional tests if needed
  • make pr passes
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@demolitionmode demolitionmode requested a review from a team as a code owner November 13, 2023 20:14
@github-actions github-actions bot added area/deploy sam deploy command pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Nov 13, 2023
@mildaniel
Copy link
Contributor

Thanks @demolitionmode for raising this PR. As you mentioned, this is technically a breaking change that can impact existing customer. We might need a different way to enable this behaviour that is opt-in instead of by default, potentially a new command line flag.

I will bring this to the team to discuss the best approach.

@mildaniel
Copy link
Contributor

After discussing with the team, we think it's okay to proceed with this PR. When ready, we will create an announcement explain this change in behaviour to existing customers.

@jysheng123 jysheng123 added this pull request to the merge queue Nov 29, 2023
Merged via the queue into aws:develop with commit f18b4cc Nov 29, 2023
55 checks passed
@demolitionmode demolitionmode deleted the fail-on-failure branch November 29, 2023 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deploy sam deploy command pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants