Returning one result for project pipeline resolver when requesting IID
What does this MR do and why?
This is done as a workound patch to https://gitlab.com/gitlab-com/request-for-help/-/issues/2855. The code should be removed once https://gitlab.com/gitlab-org/gitlab/-/issues/545167 is addressed
Currently BatchLoader takes in all the requests and maps them to the response. So when passed in iid: [2]
and there's 2 pipelines that match it, the older pipeline will overwrite the iid match and be the one that's returned.
This is likely not the expected behaviour as newer pipelines are the more relevant ones.
This workaround is gated behind the FF which I'm thinking should only be turned on for specific customers as it takes a very minor performance hit
References
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Going into a pipeline #show page would act as normal
- To address use-case 2 this is a bit harder to reproduce
- Create two pipelines of the same project
- Make of of the pipelines a different partition_id. You'll need to make the build the same partition_id as well
- Update the pipeline to have the same IID
- With the FF off, going into a pipeline #show page would show the earlier pipeline (wrong)
- With the FF enabled, it should show the later pipeline
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 #461470 (closed)