smarkets / marge-bot

A merge-bot for GitLab
BSD 3-Clause "New" or "Revised" License
687 stars 134 forks source link

Sporadic issues "I couldn't merge this branch: GitLab failed to rebase the branch saying: Rebase failed. Please rebase locally" #222

Open okainov opened 4 years ago

okainov commented 4 years ago
  1. marge-bot is used with --rebase-remotely parameter to use Gitlab API for rebase.
  2. Assign some MR to marge-bot which does not require rebase at all
  3. Wait for picking up the MR
  4. Sometimes marge will complain "I couldn't merge this branch: GitLab failed to rebase the branch saying: Rebase failed. Please rebase locally". However there is even no need to rebase at all, I have green "Merge" button in UI!

Also I observed the same issue when rebasing is in progress or CI is in progress - marge does not understand that CI is in progress - see #223

aschmolck commented 4 years ago

Could you try running marge with debug output, and paste what actual Gitlab API call returns back (and also what version of gitlab you are using)? Not fully sure if there's a problem with Gitlab's rebase API or marge's use of it from this description.

okainov commented 4 years ago

Not really, we wrote our own solution and use it not instead of marge-bot. This was quite reproducible