Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
z0rc opened this issue Jun 23, 2020 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@z0rc
Copy link

z0rc commented Jun 23, 2020

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.

@z0rc z0rc added the bug Something isn't working label Jun 23, 2020
@z0rc
Copy link
Author

z0rc commented Jun 23, 2020

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

@mad-it
Copy link
Contributor

mad-it commented Jun 29, 2020

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.

@mad-it
Copy link
Contributor

mad-it commented Jul 10, 2020

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 :)

@ricardoatsouza
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants