Contributes to #496665
Problem
Merge request commits are stored in the database without information about their parent_ids. As a result, commits created from DB records are missing this data.
Solution
Load commit content from Gitaly to have access to full commit information.
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
![]() |
![]() |
Enable feature flag
Feature.enable(:commits_from_gitaly)
Visit merge request commits API endpoint (http://gdk.test:3000/api/v4/projects/462/merge_requests/1/commits)
parent_ids
value should be defined for commits (when FF is disabled, it will be missing)
Find a merge request diff version from this endpoint (http://gdk.test:3000/api/v4/projects/462/merge_requests/1/versions/)
Visit merge request diff version page (http://gdk.test:3000/api/v4/projects/462/merge_requests/1/versions/2180)
parent_ids
value should be defined for commits (when FF is disabled, it will be missing. Note endpoint response is cached)
Related to #496665