Backport of 'Remove unnecessary committer batch-load from mergeability fields' to 19.3

What does this MR do and why?

Backports !258392 (merged) to 19.3. On projects that prevent committers from approving, the merge request widget's mergeable / detailedMergeStatus GraphQL fields batch-loaded every diff commit, which on merge requests with thousands of commits exceeded the GraphQL timeout and the widget never loaded. The fix removes that unused batch load.

Cherry-pick of e70b3e6e, already in 19.5 and backported to 19.4 in !262177 (merged).

Detailed context for AI agents
  • Original MR: !258392 (merged) (merged 2026-10-05, milestone 19.5, workflow::production).
  • 19.4 backport: !262177 (merged) (merged).
  • Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/630822
  • Requested for 19.3 by Support for a customer on the original MR; 19.3 is still in the maintenance window (next patch release 2026-11-11).
  • Commit e70b3e6e is not an ancestor of 19-3-stable-ee.
  • The cherry-pick hit one context-only conflict in ee/app/graphql/ee/types/merge_request_type.rb: master has grouped_approvals_left / grouped_approvals_required methods next to the removed overrides, and 19.3 does not. Resolved by dropping the mergeable / detailed_merge_status overrides and lazy_committers without adding the grouped_approvals_* methods. The added and removed lines are identical to the original commit (3 files: app/models/commit_collection.rb, ee/app/graphql/ee/types/merge_request_type.rb, ee/spec/graphql/ee/types/merge_request_type_spec.rb; +16 / -21).
  • Safety on 19.3: the removed lazy_committers wrapper called commits.add_committers_to_batch_loader, but nothing on 19.3 consumes that batch. The approval committer filter on 19.3 (MergeRequest#committer_ids_to_filter_from_approvers / #committers_to_filter_from_approvers) already goes through committer_users_from_diff -> committer_emails_from_diff, which does not read the committers_lazy batch. No references to lazy_committers or add_committers_to_batch_loader remain on the branch.
  • Rubocop clean on the 3 files. No local spec run against 19.3; CI covers the updated N+1 specs in ee/spec/graphql/ee/types/merge_request_type_spec.rb.

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 MR that fixed the bug on the default branch has been deployed to GitLab.com (not applicable for documentation or spec changes).
  • The MR title is descriptive (e.g. "Backport of 'title of default branch MR'"). This is important, since the title will be copied to the patch blog post.
  • Required labels have been applied to this merge request
  • This MR has been approved by a maintainer (only one approval is required).
  • Ensure the E2E Omnibus GitLab EE pipeline (triggered by thee2e:test-on-omnibus-ee job) has succeeded. If it has failed (or shows warnings), investigate the failures. If you determine the failures are unrelated, you may proceed. If you need assistance investigating, request help in the #s_developer_experience Slack channel to confirm the failures are unrelated to the merge request.

Note to the merge request author and maintainer

If you have questions about the patch release process, please:

Edited by Marc Shaw

Merge request reports

Loading
Loading