Page MenuHomePhabricator

scap backport sometimes crashes when running with two stacked patches
Closed, ResolvedPublic

Description

I've seen this happen sometime, but not always:

taavi@deploy1002 ~ $ scap backport 947361 947362
11:22:08 Checking whether changes are in a branch and version deployed to production...
11:22:08 Change '947361' validated for backport
11:22:08 Related change 947361 found for 947362
11:22:08 Change '947362' validated for backport
The following changes are scheduled for backport:
+--------+-----------------------------+--------+----------------------------------------+
|      # |           Project           | Branch | Subject                                |
+--------+-----------------------------+--------+----------------------------------------+
| 947361 | operations/mediawiki-config | master | throttle: remove expired rules         |
| 947362 | operations/mediawiki-config | master | throttle: add rules for Wikimania 2023 |
+--------+-----------------------------+--------+----------------------------------------+
Backport the changes? (y/n): y
11:22:11 Voting on 2 change(s)
11:22:11 Change 947361 approved
11:22:11 Change 947362 approved
11:22:11 Waiting for changes to be merged. This may take some time if there are long running tests.
11:22:57 awaiting-backport-merges:  50% (ok: 1; fail: 0; left: 1)
Gerrit could not merge the change '947362' as is and could require a rebase

Here 361 and 362 were stacked and merged within seconds of each other:

14:22:57 <+wikibugs> (Merged) jenkins-bot: throttle: remove expired rules [mediawiki-config] - https://gerrit.wikimedia.org/r/947361 (owner: Majavah)
14:22:59 <+wikibugs> (Merged) jenkins-bot: throttle: add rules for Wikimania 2023 [mediawiki-config] - https://gerrit.wikimedia.org/r/947362 (https://phabricator.wikimedia.org/T343595) (owner: Majavah)

Running scap backport after the merge completes normally, however.

Details

ReferenceSource BranchDest BranchAuthorTitle
repos/releng/scap!176T343967masterjhuneidibackport: make multiple attempts to continue
repos/releng/train-dev!24review/dancy/submit-patches-in-ascending-ordermaindancyverify-patches.py: Process changes in ascending order
Customize query in GitLab

Event Timeline

Notes:

https://gitlab.wikimedia.org/repos/releng/scap/-/blob/master/scap/plugins/backport.py#L646
The exception "Gerrit could not merge the change '%s' as is and could require a rebase" is generated when Gerrit returns mergeable=False. It looks like there is a brief period of time when the change becomes unmergeable between after its parent has been merged and when the change is auto-rebased by Gerrit.

@jeena Ping to publish a new scap release.

@jeena Ping to publish a new scap release.

👍 done

dancy claimed this task.