Skip to content

Fix 500 error when MR from fork has conflicts but worker has not run

What does this MR do?

Fixes the easy part of https://gitlab.com/gitlab-org/gitlab-ce/issues/44930.

Are there points in the code the reviewer needs to double check?

Don't think so? The Gitaly version works anyway, this is just needed when the feature flag is disabled.

Why was this MR needed?

Steps to reproduce:

  1. Disable the feature flag and turn off the auto-enablement of feature flags in development.
  2. Create an MR from a fork.
  3. Disable Sidekiq.
  4. Push to the MR's branch.
  5. Set the MR as unchecked: MergeRequest.find(mr_id).mark_as_unchecked.
  6. 500 before this change, when loading the MR.

This is a way of replicating the missing PostReceive worker we saw in the issue, so it's a bit convoluted, but basically you can think of it as 'the UpdateMergeRequestsWorker has not yet run - or failed, or went missing - for the push to the fork'.

Does this MR meet the acceptance criteria?

  • Changelog entry added, if necessary
  • Tests added for this feature/bug
  • Review
    • Has been reviewed by Backend

Merge request reports