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

ajshepley
Copy link
Contributor

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

app/models/shipit/task.rb Outdated Show resolved Hide resolved
@ajshepley ajshepley force-pushed the ajs/restrict_previous_deploy_check_by_stack branch from 933f3f6 to 2f9124f Compare July 2, 2019 16:53
@ajshepley ajshepley requested a review from a team July 2, 2019 18:12
app/models/shipit/task.rb Outdated Show resolved Hide resolved
@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 ajshepley force-pushed the ajs/restrict_previous_deploy_check_by_stack branch from f6f3423 to c64bebc Compare July 3, 2019 18:34
@ajshepley ajshepley merged commit 6422110 into master Jul 3, 2019
@ajshepley ajshepley deleted the ajs/restrict_previous_deploy_check_by_stack branch July 5, 2019 16:49
@casperisfine casperisfine temporarily deployed to rubygems July 19, 2019 09:47 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants