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

Add a ForceRollback option to CRD #46

Merged
merged 11 commits into from
Jul 29, 2019
Merged

Add a ForceRollback option to CRD #46

merged 11 commits into from
Jul 29, 2019

Conversation

glaksh100
Copy link
Contributor

@glaksh100 glaksh100 commented Jul 11, 2019

This PR adds the ability for a user to cancel an ongoing deploy/update. This is done in the following way:

  • By adding a CancelDeploy to the Spec. The user sets this to be True to cancel the deploy.
  • When CancelDeploy is set to True, shouldRollback evaluates to True and moves the application to a DeployFailed state.
  • Either un-setting or setting CancelDeploy to False enables the deploy to be continued (as would be the case when we fix forward from DeployFailed)
  • An integration test case is added to simple_test.sh for this workflow.
  • CRD doc is updated to include CancelDeploy

Alternatively, I could have added an extra state (like DeployCancelled) but felt that that would have been quite a bit of code duplication as it'd be very similar to the DeployFailed state. Happy to incorporate other ideas!

@glaksh100 glaksh100 changed the title [WIP] Add a cancelDeploy option to CRD Add a CancelDeploy option to CRD Jul 12, 2019
@glaksh100
Copy link
Contributor Author

cc. @mwylde / @anandswaminathan

docs/crd.md Outdated Show resolved Hide resolved
@glaksh100 glaksh100 changed the title Add a CancelDeploy option to CRD Add a ForceRollback option to CRD Jul 26, 2019
@glaksh100
Copy link
Contributor Author

Updates based on discussion (captured here)

  • Renamed CRD to forceRollback
  • Included a rollbackHash that will be set on rolling back the application
  • Updated test and docs to reflect the change

cc @anandswaminathan / @mwylde

@glaksh100 glaksh100 merged commit 3b0347b into master Jul 29, 2019
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.

4 participants