Inconsistent rebase status in merge request

  • Backend weight: 3
  • Frontend weight: 3

Summary

The rebase status changes somewhat unpredictably when using the rebase button inside GitLab. It appears that the status isn't stored in the repo and maybe isn't being tracked cleanly in the UI (maybe we are losing state).

Steps to reproduce

  1. Create a project with fast-forward merge enabled
  2. Create a merge request with changes to master
  3. Make changes to master
  4. Try to rebase the merge request feature branch

Failures/strange behavior appears to be intermittent. I suspect it's a situation where the rebase isn't possible and fails, but no failure status is being returned to the merge request widget.

Example Project

TBD

What is the current bug behavior?

Rebase status flicks backwards and forwards between rebase button, and rebase in-progress, and sometimes from offering the rebase button to a prompt to reload the page.

What is the expected correct behavior?

Status should transition cleanly between states.

Relevant logs and/or screenshots

Screen_Recording_2018-11-15_at_2.26.13_PM

Everytime I clicked the rebase button I received a 200 OK status from POST http://localhost:3004/gitlab-org/gitlab-ce/merge_requests/3/rebase with an empty response body, at which point it would return to the rebase state.

Output of checks

This bug happens on GitLab.com

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Edited by André Luís (no longer at GitLab)