Loading
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 hasgrouped_approvals_left/grouped_approvals_requiredmethods next to the removed overrides, and 19.3 does not. Resolved by dropping themergeable/detailed_merge_statusoverrides andlazy_committerswithout adding thegrouped_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_committerswrapper calledcommits.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 throughcommitter_users_from_diff->committer_emails_from_diff, which does not read thecommitters_lazybatch. No references tolazy_committersoradd_committers_to_batch_loaderremain 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
- severity label and bug subtype labels (if applicable)
- If this MR fixes a bug that affects customers, the customer label has been applied.
- This MR has been approved by a maintainer (only one approval is required).
- Ensure the
E2E Omnibus GitLab EEpipeline (triggered by thee2e:test-on-omnibus-eejob) 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:
- Refer to the patch release runbook for engineers and maintainers for guidance.
- Ask questions on the
#releasesSlack channel (internal only). - Once the backport has been merged, the commit changes will be automatically deployed to a release environment that can be used for manual validation. See after merging runbook for details.
Edited by Marc Shaw