Remove the enqueue_widget_mergeability_check feature flag

What does this MR do and why?

Removes the enqueue_widget_mergeability_check feature flag. It has been at 100% on GitLab.com since 2026-09-30 with no reported problems. The merge request widget endpoint now always enqueues the mergeability check in a worker instead of running it inside the GET request.

Detailed context for AI agents

Flag: enqueue_widget_mergeability_check, type gitlab_com_derisk, default off. It was introduced in !257538 (merged).

Rollout history (all on 2026-09-30):

  • Enabled on staging, Marc's test project and gitlab-org/gitlab.
  • Then raised to 10%, 25%, 50% and 100% of actors on GitLab.com the same day.
  • It has stayed at 100% since, with no reported problems.
  • Rollout issue: #630708 (closed). Feature issue: #628132 (closed).

Behaviour kept (now permanent):

  • The widget.json endpoint (Projects::MergeRequests::ContentController#widget) wraps serialization in merge_request.with_async_mergeability_check.
  • So the GET request enqueues MergeRequestMergeabilityCheckWorker. It no longer runs the mergeability check and writes the merge status inside the request.
  • Merge actions still run the check synchronously. This MR does not change that.

Code changes:

  • The private widget_json method in the controller held the flag check. It is removed.
  • The widget action now calls with_async_mergeability_check directly.
  • config/feature_flags/gitlab_com_derisk/enqueue_widget_mergeability_check.yml is deleted.
  • The flag-disabled context in spec/requests/projects/merge_requests/content_spec.rb is removed.
  • git grep finds no other references to the flag in the repo.

Out of scope: the companion flag mark_mergeability_checking_in_worker (#630354 (closed)). The widget GET needs that flag as well to write nothing at all. It is not touched here.

Changelog: the commit carries the trailer Changelog: performance.

Verification: bundle exec rspec spec/requests/projects/merge_requests/content_spec.rb passes locally. There is no UI change.

After merge, run these two commands in order:

  1. /chatops gitlab run release check https://gitlab.com/gitlab-org/gitlab/-/merge_requests/260689 19.5
  2. /chatops gitlab run feature delete enqueue_widget_mergeability_check --dev --pre --staging --staging-ref --production

References

Screenshots or screen recordings

Not applicable, there is no UI change.

How to set up and validate locally

  1. On GDK, open an approved merge request with no unresolved threads.
  2. In the Rails console, set its merge status to unchecked: MergeRequest.id_in(<id>).update_all(merge_status: 'unchecked').
  3. Request /<project>/-/merge_requests/<iid>/widget.json.
  4. Confirm the merge status is still unchecked right after the request.
  5. Once Sidekiq runs MergeRequestMergeabilityCheckWorker, confirm the merge status is can_be_merged.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Marc Shaw

Merge request reports

Loading
Loading