Page MenuHomePhabricator

Scap rollback command
Closed, ResolvedPublic3 Estimated Story Points

Description

As part of the deployment workflow, implement the following:

scap rollback
  1. Present user staging history via scap prep --history
  2. Hard reset the git state on the deployment server
  3. scap sync-world

Event Timeline

Need to rethink this since the image tag won't be updated via the deployment-charts repo.

thcipriani updated the task description. (Show Details)
thcipriani set the point value for this task to 3.
dduvall changed the task status from Open to In Progress.Jun 14 2022, 4:05 PM
dduvall claimed this task.
dduvall triaged this task as Medium priority.

Putting this up for grabs since I'll be out on vacation for the remainder of the week.

Upon investigation, implementing scap rollback will probably duplicate a lot of what scap prep auto --history already does, so I think we should probably just implement the revert functionality in the latter and possibly create a scap rollback subcommand that aliases scap prep auto --history --revert or something like that.

I did have a change to modify AbstractSync to mark the latest history entry as synced, so I'll throw that up. I have not had a chance to test it, however.

dduvall changed the task status from In Progress to Open.Jun 14 2022, 11:26 PM
dduvall removed dduvall as the assignee of this task.

Change 805496 had a related patch set uploaded (by Dduvall; author: Dduvall):

[mediawiki/tools/scap@master] history: Mark latest history entry as synced following any sync command

https://gerrit.wikimedia.org/r/805496

Change 808086 had a related patch set uploaded (by Dduvall; author: Dduvall):

[mediawiki/tools/scap@master] rollback: Provide rollback subcommand for quick history replay and sync

https://gerrit.wikimedia.org/r/808086

Change 805496 merged by jenkins-bot:

[mediawiki/tools/scap@master] history: Mark latest history entry as synced following any sync command

https://gerrit.wikimedia.org/r/805496

Change 808086 merged by jenkins-bot:

[mediawiki/tools/scap@master] rollback: Provide rollback subcommand for quick history replay and sync

https://gerrit.wikimedia.org/r/808086

dduvall claimed this task.

Note that after a discussion with @jeena and @dancy, we decided that scap rollback should stop after the sync-world and leave complicated revert logic to the user.