As part of the backport deployment workflow, implement the following:
scap backport --revert change_url [change_url]
- Create revert on Gerrit
- Run scap backport for the commit in step 1 (which will sync—skipping all prompts)
As part of the backport deployment workflow, implement the following:
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | akosiaris | T198901 Migrate production services to kubernetes using the pipeline | |||
| Resolved | Clement_Goubert | T238770 Deploy MediaWiki to Wikimedia production in containers | |||
| Resolved | None | T279322 Design m8s deployment workflows and tooling | |||
| Resolved | jeena | T287046 scap backport --revert command |
Change 806352 had a related patch set uploaded (by Jeena Huneidi; author: Jeena Huneidi):
[mediawiki/tools/scap@master] scap backport: add revert option
Change 809094 had a related patch set uploaded (by Jeena Huneidi; author: Jeena Huneidi):
[mediawiki/tools/train-dev@master] Add test for scap backport --revert
Change 809094 merged by jenkins-bot:
[mediawiki/tools/train-dev@master] Add test for scap backport --revert
Change 806352 merged by jenkins-bot:
[mediawiki/tools/scap@master] scap backport: add revert option
Feedback from @bd808 about scap backport --revert:
<bd808> Bryan Davis thcipriani: that TrainBranchBot revert process seems slick, but it is not leaving the common "this commit was reverted" linkage that one gets from using the gerrit UI. Might be a nice thing to try and figure out how to add. Or at least include the hash of the commit being reverted in the commit message so its easier to follow in the reverse direction
The gerrit UI triggered built-in for reverting does two things I like. It puts This reverts commit <git hash>. in the commit message. Having the hash makes it easier to find the antecedent than just having the prior commit subject. Random example from a quick gerrit search is https://gerrit.wikimedia.org/r/c/operations/puppet/+/829005
Revert "db2149: Disable notifications" This reverts commit 9549250f32499b3f41e0122bba97c62414ac5c79. Reason for revert: RAID back to optimal Change-Id: Iea1c1d643ae9ec68777ef87c36e9496aad522ee7
That hash gets linked to a search in the Gerrit UI which then shows both commits: https://gerrit.wikimedia.org/r/q/9549250f32499b3f41e0122bba97c62414ac5c79
Second it adds a message in the change log of the antecedent stating "Created a revert of this change as <Change-Id>". An example from the same set of commits as before is https://gerrit.wikimedia.org/r/c/operations/puppet/+/827176/1#message-d9b879129f274d6f6095f0b7ae0282206bcec3b8. This is nice because it gives a very strong signal when encountering the prior patch in gerrit that it is no longer active (or at least was proposed to no longer be active at time).
I have no idea how much of a pain in the butt adding the comment behavior to scap backport --revert would be, and I don't think its worth more than a short investigation to be honest. Tweaking the commit message of the revert would be a solid improvement independently.
Change 829249 had a related patch set uploaded (by Jeena Huneidi; author: Jeena Huneidi):
[mediawiki/tools/scap@master] Scap backport --revert: improve commit message
Change 829249 merged by jenkins-bot:
[mediawiki/tools/scap@master] Scap backport --revert: improve commit message