Skip to content

[15.10] Fix for the rebase merge request state being shown incorrectly

Stan Hu requested to merge sh-fix-issue-389074-15-10 into 15-10-stable-ee

What does this MR do and why?

This backports !118327 (merged) to the 15-10-stable-ee branch.

This is a fix for #389074 (closed) in that the rebase merge request widget state gets shown incorrectly.

Previously, the following was happening:

  1. Merge request form gets submitted.
  2. User gets direct to merge request page, which loads the widget.
  3. The value for ff_merge_possible? gets cached incorrectly.

In between steps 1 and 2, the async diff creation is happening, which actually fetches the ref into the project. If the ref is fetched after the page is loaded, the widget will cache the wrong value, and the state won't expire until either the target branch SHA changes or the diff head SHA changes.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

  • This MR is backporting a bug fix, documentation update, or spec fix, previously merged in the default branch.
  • The original MR has been deployed to GitLab.com (not applicable for documentation or spec changes).
  • This MR has a severity label assigned (if applicable).
  • This MR has been approved by a maintainer (only one approval is required).
  • Ensure the e2e:package-and-test-ee job has either succeeded or been approved by a Software Engineer in Test.

Note to the merge request author and maintainer

The process of backporting bug fixes into stable branches is tracked as part of an internal pilot. If you have questions about this process, please:

Edited by Stan Hu

Merge request reports