From 2e961b1af0343b25e819346145a8de27ad4e82c4 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 16 Nov 2022 14:50:11 -0800 Subject: [PATCH] Cleanup force merging docs At some point we shifted from doing this task using the web UI to primarily using ssh only admin accounts. The docs ended up in a slightly confusing place with steps that only make sense when you interact with the web UI. Update the force merge docs to assume ssh only which is far more aligned with our admin account expectations. Change-Id: Ia99afe7ee10927765733891f72bd428e52fa2225 --- doc/source/sysadmin.rst | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/doc/source/sysadmin.rst b/doc/source/sysadmin.rst index 37ae284637..71871a49da 100644 --- a/doc/source/sysadmin.rst +++ b/doc/source/sysadmin.rst @@ -230,27 +230,35 @@ these cases, use the following procedure to force-merge a change. $ ssh -p 29418 myname.admin@review.opendev.org \ "gerrit set-members 'Project Bootstrappers' --add myname.admin" -* Navigate to the change which needs to be merged and reload the page. +* Changes with Code-Review -2, Verified -2, or Workflow -1 votes cannot + merge. If the change has any of these votes you will need to remove them + first. We can do that via SSH by removing users with those votes from the + reviewer list: -* Remove any -2 votes on the change. +.. code-block:: shell-session -* Add +2 Code-Review, and +1 Workflow votes if necessary, then add +2 - Verified. Also leave a review comment briefly explaining why this - was necessary, and make sure to mention it in the #opendev - IRC channel (ideally as a #status log entry for the benefit of - those not paying close attention to scrollback). + $ ssh -p 29418 myname.admin@review.opendev.org \ + "gerrit set-reviewers --project foo/bar --remove $USER_WITH_VOTE 123456" -* At this point, a *Submit* Button should appear, click it. The - change should now be merged. +* To merge the change needs a Code-Review +2, Verified +2, and Workflow +1. + We will apply those votes and ask Gerrit to submit (merge) the change + using a single `gerrit review` command: + +.. code-block:: shell-session $ ssh -p 29418 myname.admin@review.opendev.org \ "gerrit review 12345,6 --message 'Bypassing Zuul to merge this.' \ --code-review=2 --verified=2 --label workflow=1 --submit" + Please edit the message argment to provide as much detail as possible + for why the normal processes were bypassed in this situation. + * Remove yourself from *Project Bootstrappers* +.. code-block:: shell-session + $ ssh -p 29418 myname.admin@review.opendev.org \ - "gerrit set-members 'Project Bootstrappers' --remove myname.admin" + "gerrit set-members 'Project Bootstrappers' --remove myname.admin" This procedure is the safest way to force-merge a change, ensuring that all of the normal steps that Gerrit performs on repos still