Loading
Backport of 'Remove unnecessary committer batch-load from mergeability fields' to 19.4
What does this MR do and why?
Backports !258392 (merged) to 19.4. 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.
Clean cherry-pick of e70b3e6e, already in 19.5.
Detailed context for AI agents
- Original MR: !258392 (merged) (merged 2026-10-05, milestone 19.5,
workflow::production). - Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/630822
- Commit e70b3e6e is an ancestor of
19-5-stable-eeand not of19-4-stable-ee. - The cherry-pick applied without conflicts; the diff against
19-4-stable-eeis line-for-line 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). - Safety on 19.4: the removed
lazy_committerswrapper calledcommits.add_committers_to_batch_loader, but nothing on 19.4 consumes that batch. The approval committer filter on 19.4 (MergeRequest#committer_ids_to_filter_from_approvers/#committers_to_filter_from_approvers) already goes throughcommitter_users_from_diff->committer_emails_from_diff, which uses either the SQL path (approval_committer_emails_from_diff, default off on 19.4) orcommits.author_and_committer_emails. Neither path reads thecommitters_lazybatch. The only caller of the removedadd_committers_to_batch_loaderalias on 19.4 was the removed wrapper. - No local spec run against 19.4; 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