ridedott / merge-me-action

Automatically merges Pull Requests.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GraphqlError: Base branch was modified. Review and try the merge again.

z0rc opened this issue · comments

How would you describe the issue?

Merge-me action sometimes fails with ##[error]GraphqlError: Base branch was modified. Review and try the merge again. Example https://github.com/z0rc/dotfiles/pull/1451/checks?check_run_id=797772548. Re-running affected job works fine, the error doesn't reproduce.

How can we reproduce the issue?

This one is tricky. I'm using this for single repo, where dependabot updates submodules and PR's can be merged only via rebase. As Dependabot creates multiple PR's almost simultaneously, same number of simultaneous github-actions being executed. I think there is run condition, where one action action updates the master branch, and another actions fails on merge, until github "unlocks" PR for being able to merge again. See https://github.community/t/merging-via-rest-api-returns-405-base-branch-was-modified-review-and-try-the-merge-again/13787

What are the expected results?

Merge-me action would succeed. Maybe retry on failure.

What are the actual results?

Merge-me action fails with ##[error]GraphqlError: Base branch was modified. Review and try the merge again..

How much does it hurt?

One or two PR's from daily dependabot update batch (5-10 PR's) fail on merge-me action.

While we're at it I think check shouldn't succeed on internal failure.

Sorry for taking a bit longer to respond. This will require a bit more of an internal discussions.

There are quite a few cases where we want the errors to be swallowed and not retried. Here are a few examples for our own usages:
##[error]GraphqlError: 5 of 5 required status checks have not succeeded: . - This is an example of when a build is still in progress.
##[error]GraphqlError: 4 of 4 required status checks are expected. - An alternative scenario where a build is still in progress.

So we need to discuss whether we will retry for the specific case you mentioned or come up with a more general solution.

While we're at it I think check shouldn't succeed on internal failure.

I do agree with this, however GitHub actions still does not support restarting individual jobs, so failing the automated check would require you to restart the entire build. So that will be a somewhat nasty side effect. I will take this up as well as the intention of this action is to merge the PR. If that fails it should indeed indicate as much.

While we're at it I think check shouldn't succeed on internal failure.

This part has been resolved by #469

The rest is pending some discussions :)

Hello @z0rc. Retry on failure for this error was added in this PR: #480. Hope this solves the problem you were having. :)