Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

[6.1.x] Add check for rollback phases in reverse order #2218

Merged
merged 1 commit into from Oct 12, 2020

Conversation

bernardjkim
Copy link
Contributor

@bernardjkim bernardjkim commented Oct 9, 2020

Description

This PR updates the check for gravity plan rollback command. The check now ensures that phases of an operation are being rolled back in order. This check can be bypassed by providing the --force flag.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Internal change (not necessarily a bug fix or a new feature)

Linked tickets and other PRs

TODOs

  • Self-review the change
  • Perform manual testing
  • Address review feedback

Testing done

Verify rollback phase fails if dependent phase is not rolled back

Verify rollback phase executes if --force flag is provided

Verify latest phase can still be rolled back

Verify plan can be rolled back completely

* Use `requires` field to find dependent phases and check if all
depedents have been rolled back if they have been started.

* Collect and display phases that require rollback

* Update phase state evaluation. If all subphases are either
unstarted or rolled back, the phase is considered rolled back.

* Update local phase state on remote rollback
@bernardjkim bernardjkim requested review from a team, r0mant and knisbet October 9, 2020 20:46
@bernardjkim bernardjkim merged commit c3d5d9f into version/6.1.x Oct 12, 2020
@bernardjkim bernardjkim deleted the bernard/6.1.x/rollback branch October 12, 2020 16:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants