Remove single_pipeline_for_resolver workaround
What does this MR do and why?
Context
Until recently p_ci_pipelines could hold two pipelines with the same (project_id, iid). Resolvers::Ci::ProjectPipelineResolver looks up pipelines by iid through BatchLoader, which stores one pipeline per iid. Ci::PipelinesFinder orders by id: :desc by default, so the lowest-id row loaded last and overwrote the others. The resolver returned the oldest duplicate, so customers landed on the wrong pipeline.
!192174 (merged) worked around this by passing sort: :asc to the finder behind the single_pipeline_for_resolver flag, so the newest duplicate won instead.
This MR
Duplicate iids are no longer possible. Finalize `DeduplicatePipelineIids` BBMs (#603644 - closed) was the final step to clean up existing duplicates.
With at most one pipeline able to match a given (project_id, iid), the finder's sort order no longer selects between candidates, so this MR removes the workaround and its flag. This MR basically reverts !192174 (merged).
This is a no-op for self-managed: the flag was never enabled there. On GitLab.com it was scoped to a single project.
Removed FF: single_pipeline_for_resolver
References
- Closes #582341 (closed)
- Original workaround: !192174 (merged)
- Closes #544930 (closed)
How to set up and validate locally
bundle exec rspec spec/graphql/resolvers/ci/project_pipeline_resolver_spec.rb— expect 19 examples, 0 failures.bundle exec rspec spec/requests/api/graphql/project/pipeline_spec.rb— expect 20 examples, 0 failures.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
- I have evaluated the MR acceptance checklist for this MR.