Skip to content

Promote ProjectPipelineResolver query to finder

What does this MR do?

this merge request addresses a follow-up issue from !39275 (merged) by promoting an inline query into a finder for more visiblity and in order to get access-checking for free.

Related Issue(s)

Performance Analysis

SELECT "ci_pipelines".* FROM "ci_pipelines" WHERE "ci_pipelines"."project_id" = 278964 AND "ci_pipelines"."iid" IN (38488, 619147, 829783);
 Index Scan using index_ci_pipelines_on_project_id_and_iid on public.ci_pipelines  (cost=0.57..16.81 rows=9 width=316) (actual time=9.813..20.759 rows=2 loops=1)
   Index Cond: ((ci_pipelines.project_id = 278964) AND (ci_pipelines.iid = ANY ('{38488,619147,829783}'::integer[])))
   Buffers: shared hit=7 read=10
   I/O Timings: read=20.589
Time: 21.191 ms
  - planning: 0.391 ms
  - execution: 20.800 ms
    - I/O read: 20.589 ms
    - I/O write: 0.000 ms

Shared buffers:
  - hits: 7 (~56.00 KiB) from the buffer pool
  - reads: 10 (~80.00 KiB) from the OS file cache, including disk I/O
  - dirtied: 0
  - writes: 0

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Mayra Cabrera

Merge request reports