Eugenia Grieff activity https://gitlab.com/egrieff 2026-03-18T15:28:00Z tag:gitlab.com,2026-03-18:5218229074 Eugenia Grieff opened merge request !227920: Draft: PoC read and write from new commits table at GitLab.org / GitLab 2026-03-18T15:28:00Z egrieff Eugenia Grieff

What does this MR do and why?

PoC read and write from new commits table

This is a PoC to evaluate changes needed to support only writing to the new table merge_request_diff_commits_b5377a7a34 before we drop the old table.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

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.

tag:gitlab.com,2026-03-18:5218210899 Eugenia Grieff pushed new project branch eg-poc-read-write-new-commits-table at GitLab.org / GitLab 2026-03-18T15:24:21Z egrieff Eugenia Grieff

Eugenia Grieff (7e537b46) at 18 Mar 15:24

PoC read and write from new commits table

... and 2 more commits

tag:gitlab.com,2026-03-18:5217555577 Eugenia Grieff commented on merge request !227627 at GitLab.org / GitLab 2026-03-18T13:17:39Z egrieff Eugenia Grieff

@marc_shaw Thanks, LGTM 👍

tag:gitlab.com,2026-03-18:5217553699 Eugenia Grieff approved merge request !227627: Add help text and docs link to automatic rebase setting at GitLab.org / GitLab 2026-03-18T13:17:17Z egrieff Eugenia Grieff

Summary

  • Adds descriptive help text and a "How does automatic rebase work?" documentation link for the "Enable automatic rebase prior to merge" checkbox in project merge request settings.
  • Uses safe_format + tag_pair for i18n-safe interpolation (following the modern pattern used in e.g. _pages.html.haml).
  • Replaces the previous icon-only help link with an inline text link per Pajamas contextual help guidelines.

Relates to #524048

What does this MR do?

Adds a help_text with an inline docs link to the automatic rebase checkbox in Settings > Merge requests > Merge options, so users can quickly learn what the setting does and access the documentation.

The help text reads:

Automatically rebases the source branch onto the target branch before merging. How does automatic rebase work?

Screenshot_2026-03-18_at_13.00.47

tag:gitlab.com,2026-03-18:5216627842 Eugenia Grieff commented on merge request !227632 at GitLab.org / GitLab 2026-03-18T09:58:59Z egrieff Eugenia Grieff

@lauraXD @garyh Would you mind taking the backend and Merge Requests backend reviews please? Thanks!

tag:gitlab.com,2026-03-18:5216620794 Eugenia Grieff deleted project branch 591242-add-a-library-module-container-class-that-can-handle-rapid-diff-concerns at GitLab.org / GitLab 2026-03-18T09:57:28Z egrieff Eugenia Grieff

Eugenia Grieff (3c1c2b31) at 18 Mar 09:57

tag:gitlab.com,2026-03-18:5216619769 Eugenia Grieff pushed to project branch master at GitLab.org / GitLab 2026-03-18T09:57:15Z egrieff Eugenia Grieff

Eugenia Grieff (7da13cd2) at 18 Mar 09:57

Merge branch '591242-add-a-library-module-container-class-that-can-...

... and 1 more commit

tag:gitlab.com,2026-03-18:5216616825 Eugenia Grieff accepted merge request !226206: Add a library module/container class that can handle rapid diff concerns at GitLab.org / GitLab 2026-03-18T09:56:37Z egrieff Eugenia Grieff

What does this MR do and why?

Renames Gitlab::MergeRequests::DiffVersion to Gitlab::MergeRequests::DiffResolver and moves the compare early-return logic from the three rapid diffs methods in MergeRequest (first_diffs_slice, diffs_for_streaming, diffs_for_streaming_by_changed_paths) into DiffResolver#resolve.

This keeps the MR model methods as slim one-liner delegations and centralizes diff resolution logic in a single class, per the discussion with @patrickbajao.

References

tag:gitlab.com,2026-03-18:5216609626 Eugenia Grieff approved merge request !226206: Add a library module/container class that can handle rapid diff concerns at GitLab.org / GitLab 2026-03-18T09:55:05Z egrieff Eugenia Grieff

What does this MR do and why?

Renames Gitlab::MergeRequests::DiffVersion to Gitlab::MergeRequests::DiffResolver and moves the compare early-return logic from the three rapid diffs methods in MergeRequest (first_diffs_slice, diffs_for_streaming, diffs_for_streaming_by_changed_paths) into DiffResolver#resolve.

This keeps the MR model methods as slim one-liner delegations and centralizes diff resolution logic in a single class, per the discussion with @patrickbajao.

References

tag:gitlab.com,2026-03-17:5213924405 Eugenia Grieff deleted project branch 592500-update-mr-reports-ff-actor at GitLab.org / GitLab 2026-03-17T16:55:30Z egrieff Eugenia Grieff

Eugenia Grieff (6e2b5756) at 17 Mar 16:55

tag:gitlab.com,2026-03-17:5213923536 Eugenia Grieff pushed to project branch master at GitLab.org / GitLab 2026-03-17T16:55:20Z egrieff Eugenia Grieff

Eugenia Grieff (b05b21c7) at 17 Mar 16:55

Merge branch '592500-update-mr-reports-ff-actor' into 'master'

... and 1 more commit

tag:gitlab.com,2026-03-17:5213921083 Eugenia Grieff accepted merge request !226694: Update mr_reports_tab FF actor to project at GitLab.org / GitLab 2026-03-17T16:54:48Z egrieff Eugenia Grieff

What does this MR do and why?

This MR updates the actor for all mr_reports_tab FF reference to be project instead of current_user.

There is no UI/UX changes, everything continues to work expected:

mr_reports_tab true mr_reports_tab false
image image

mr_reports_tab true

  • Has "Reports" tab
  • Display "View reports"
  • Widget is not expandable

mr_reports_tab false

  • No "Reports" tab
  • Widget is expandable

References

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Clone this repo and create a MR similar to this: gitlab-org/govern/threat-insights-demos/frontend/mr-reports-tab!1
  2. Trigger a pipeline and it will create some findings

Enable and disable FF:

http://gdk.test:3000/rails/features/mr_reports_tab

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.

Related to #592500

tag:gitlab.com,2026-03-17:5212441730 Eugenia Grieff commented on merge request !226694 at GitLab.org / GitLab 2026-03-17T11:48:14Z egrieff Eugenia Grieff

@sming-gitlab Sure, LGTM 👍

tag:gitlab.com,2026-03-17:5212440596 Eugenia Grieff approved merge request !226694: Update mr_reports_tab FF actor to project at GitLab.org / GitLab 2026-03-17T11:47:57Z egrieff Eugenia Grieff

What does this MR do and why?

This MR updates the actor for all mr_reports_tab FF reference to be project instead of current_user.

There is no UI/UX changes, everything continues to work expected:

mr_reports_tab true mr_reports_tab false
image image

mr_reports_tab true

  • Has "Reports" tab
  • Display "View reports"
  • Widget is not expandable

mr_reports_tab false

  • No "Reports" tab
  • Widget is expandable

References

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Clone this repo and create a MR similar to this: gitlab-org/govern/threat-insights-demos/frontend/mr-reports-tab!1
  2. Trigger a pipeline and it will create some findings

Enable and disable FF:

http://gdk.test:3000/rails/features/mr_reports_tab

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.

Related to #592500

tag:gitlab.com,2026-03-17:5212422726 Eugenia Grieff pushed to project branch 592062-use-commit-shas-for-merge-request-changed-paths at GitLab.org / GitLab 2026-03-17T11:43:37Z egrieff Eugenia Grieff

Eugenia Grieff (1d708855) at 17 Mar 11:43

Avoid loading CommitsMetadata in MergeRequest#changed_paths

tag:gitlab.com,2026-03-17:5212367932 Eugenia Grieff commented on merge request !226651 at GitLab.org / GitLab 2026-03-17T11:30:46Z egrieff Eugenia Grieff

The approach in !226904 (closed) didn't help in the end 😞 I added more details in #592062 (comment 3166114140)

tag:gitlab.com,2026-03-17:5212288941 Eugenia Grieff commented on issue #592062 at GitLab.org / GitLab 2026-03-17T11:12:39Z egrieff Eugenia Grieff

Regardless of that, I wonder if this could have been caught by a spec / integration test.

I think the challenge is not having data with a size large enough to trigger these edge cases. I've seen cases where AR preloading caused problems that were caught only after deployment, so probably there is something to improve.

tag:gitlab.com,2026-03-17:5212261676 Eugenia Grieff commented on issue #592062 at GitLab.org / GitLab 2026-03-17T11:06:33Z egrieff Eugenia Grieff

@lauraXD @manuelgrabowski Unfortunately, the approach in !227632 didn't work because preloading users is still needed. Without it, CachedCommit#to_hash in MergeRequestDiff#load_commits calls every column on the MergeRequestDiffCommit record, triggering individual SQL loads for commit and author fields (all delegated to merge_request_commits_metadata via has_commit_metadata?).

Batching the preloading (attempted in !226904 (closed)) doesn't work either because load_commits collects everything into the CommitCollection array before returning, so we still hold the same peak number of objects.

However, I found a possible solution to the problem affecting this worker: use an existing SQL query that fetches the commit SHAs and build the CommitRequest objects from them (I created !227632 to try this).

I can assign it to @lauraXD for review today, or let me know if I should pick someone else instead 🙇

tag:gitlab.com,2026-03-17:5212243184 Eugenia Grieff closed merge request !226904: Draft: Optimise merge_request_commits_metadata preloading at GitLab.org / GitLab 2026-03-17T11:02:11Z egrieff Eugenia Grieff

What does this MR do and why?

Optimise merge_request_commits_metadata preloading for MR diff commits

Introduce Preloaders::MergeRequestDiffCommitsMetadataPreloader to batch-load merge_request_commits_metadata records by ID, avoiding the scoped belongs_to lambda overhead and memory spikes when loading all metadata in a single query for large diffs.

The preloader supports a with_users: flag that mirrors the existing with_users association extension, preloading :commit_author and :committer on metadata records, and directly on commits that lack a metadata record (fallback for un-backfilled rows).

References

Related to #592902

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.

tag:gitlab.com,2026-03-17:5212192586 Eugenia Grieff closed merge request !226651: Draft: Skip preloading commit users when not needed at GitLab.org / GitLab 2026-03-17T10:51:44Z egrieff Eugenia Grieff

What does this MR do and why?

Optimise calls to MergeRequestDiff#commits and MergeRequest#commits so callers that don't need author/committer data can opt out of the with_users preload.

The following list of callers is updated (behind FF skip_merge_request_commits_user_preload) to skip preloading commit users' data:

File Method What commits are used for
app/models/merge_request.rb changed_paths object.sha - find_changed_pathss only needs sha, all that author/committer data we're loading never gets used for rules:changes
app/finders/context_commits_finder.rb search_commits & already_included_ids .map(&:id) - SHA deduplication only
app/services/issues/close_service.rb store_first_mentioned_in_commit_at .last.try(:authored_date) - timestamp only
app/services/system_notes/issuables_service.rb cross_reference_disallowed? .include?(noteable) - membership check only

Note: As far as I can tell, all other calls either explicitly need user records (committers for approval rules, audit logs) or use load_from_gitaly: true (which bypasses with_users entirely, so preload_users doesn't apply). I'll investigate further if there is some obscure path that I missed, but I think it's best to keep this MR scoped to as few changes as possible to make validation easier.

References

Related to #592902

#592062 (comment 3138432832)

How to set up and validate locally

1. Enable the feature flag in Rails console:

Feature.enable(:skip_merge_request_commits_user_preload)

2. Test the four affected code paths:

a) MergeRequest#changed_paths (rules:changes):

  • Create/use an MR with CI rules that use rules:changes
  • Verify the pipeline triggers correctly based on changed files
  • Check that only commit SHAs are loaded (no author/committer data)

b) ContextCommitsFinder (SHA deduplication):

  • Open an MR and try adding context commits (previously merged commits) in the commits tab
  • Search for commits by SHA
  • Verify search works and doesn't duplicate existing commits

c) Issues::CloseService (timestamp only):

  • Create an issue and an MR that references it with "Closes #issue-number"
  • Merge the MR
  • Check that issue.metrics.first_mentioned_in_commit_at is set correctly

d) SystemNotes::IssuablesService (membership check):

  • Reference a commit from within an MR
  • Verify cross-reference notes are created/suppressed correctly

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.