RFR: 1069: PR ends up in bad state if interrupted just after push [v2]

Kevin Rushforth kcr at openjdk.java.net
Wed Jun 9 20:10:55 UTC 2021


On Wed, 9 Jun 2021 18:49:25 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> This change adds a new transaction step when integrating a PR, to better handle if the bot gets interrupted mid integration. Currently, if the change is pushed and the bot is interrupted before closing, changing labels or adding the final "commit pushed" comment, the PR can end up in a limbo state.
>> 
>> The new step is another comment "Going to push commit as ..." which gets added right before the git push command is run. Using this comment, it's now possible to automatically recover if the bot gets interrupted. The integration command checks for any such comments and if found, checks if the commit hash is present in the target. If it is, the PR was already pushed, and the command will just close it out as normal.
>> 
>> I also decided to move the output of any rebase command to this prepush comment, so we don't risk losing it.
>
> Erik Joelsson has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
> 
>  - Review comments and fix SponsorCommand
>  - Merge branch 'master' into SKARA-1069-push-interrupt
>  - SKARA-1069

Looks good as far as I can tell.

-------------

Marked as reviewed by kcr (Reviewer).

PR: https://git.openjdk.java.net/skara/pull/1183


More information about the skara-dev mailing list