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

Use previous rollback behaviour when no previous deploy is found to roll back to. #916

Merged
merged 2 commits into from Jul 3, 2019

Conversation

Projects
None yet
3 participants
@ajshepley
Copy link
Contributor

commented Jul 2, 2019

With PR #913, the Abort&Rollback button (eventually Deploy.trigger_revert) would try to skip unsuccessful tasks when searching for a commit to roll back to, and fix a bug where interleaved stack deploys would be used for the revert sha instead of the same stack.

Unfortunately, an edge case (no prior deploys found) was missed, resulting in a rare but blocking error.

This PR fixes the above problem by deferring to the old rollback behaviour whenever a previous-deploy could not be found. At the same time, I've made sure that the SHA shown in the button will be correct (showing the current_deploy_task.until_commit in the aforementioned scenario).

For context, see also:
#910
#913

@ajshepley ajshepley requested review from DazWorrall and JackTLi Jul 2, 2019

Show resolved Hide resolved app/models/shipit/task.rb Outdated

@ajshepley ajshepley force-pushed the ajs/restrict_previous_deploy_check_by_stack branch from 933f3f6 to 2f9124f Jul 2, 2019

@ajshepley ajshepley requested a review from Shopify/pipeline Jul 2, 2019

@JackTLi

JackTLi approved these changes Jul 2, 2019

Show resolved Hide resolved app/models/shipit/task.rb Outdated

@ajshepley ajshepley changed the title Ajs/restrict previous deploy check by stack Use previous rollback behaviour when no previous deploy is found to roll back to. Jul 3, 2019

ajshepley added some commits Jun 28, 2019

Use the current deploy's since_commit in the rollback case where ther…
…e's no previous deploy. Also provide short_sha method for the NoDeployCommit facsimile.

@ajshepley ajshepley force-pushed the ajs/restrict_previous_deploy_check_by_stack branch from f6f3423 to c64bebc Jul 3, 2019

@ajshepley ajshepley merged commit 6422110 into master Jul 3, 2019

3 checks passed

CLA Contributor License Agreement (CLA) status
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@ajshepley ajshepley deleted the ajs/restrict_previous_deploy_check_by_stack branch Jul 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.