Filter by pipeline iid backend added
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
Filter by pipeline iid backend added
Changelog: added
References
Screenshots or screen recordings
| screenrecord | |
|---|---|
| pipelineiid |
How to set up and validate locally
- git pull branch and checkout
- start gdk
- visit any project
- visit http://gdk.test:3000/-/graphql-explorer
- paste getjobartifacts query present in text file
- query.text
(in my gdk setup)
- git pull 382689_filter_by_pipeline_iid and checkout
- start gdk
- visit project http://gdk.test:3000/gitlab-org/new-project
- visit http://gdk.test:3000/-/graphql-explorer
- paste getjobartifacts query present in text file
- query.txt
query plan:
- gdk rails c and run following query
- query = Ci::Build.joins(:pipeline).where(p_ci_pipelines: { iid: 3 })
- query.explain
query plan text(old):
=> EXPLAIN SELECT "p_ci_builds"."status", "p_ci_builds"."finished_at", "p_ci_builds"."created_at", "p_ci_builds"."updated_at", "p_ci_builds"."started_at", "p_ci_builds"."coverage", "p_ci_builds"."name", "p_ci_builds"."options", "p_ci_builds"."allow_failure", "p_ci_builds"."stage_idx", "p_ci_builds"."tag", "p_ci_builds"."ref", "p_ci_builds"."type", "p_ci_builds"."target_url", "p_ci_builds"."description", "p_ci_builds"."erased_at", "p_ci_builds"."artifacts_expire_at", "p_ci_builds"."environment", "p_ci_builds"."when", "p_ci_builds"."yaml_variables", "p_ci_builds"."queued_at", "p_ci_builds"."lock_version", "p_ci_builds"."coverage_regex", "p_ci_builds"."retried", "p_ci_builds"."protected", "p_ci_builds"."failure_reason", "p_ci_builds"."scheduled_at", "p_ci_builds"."token_encrypted", "p_ci_builds"."resource_group_id", "p_ci_builds"."waiting_for_resource_at", "p_ci_builds"."processed", "p_ci_builds"."scheduling_type", "p_ci_builds"."id", "p_ci_builds"."stage_id", "p_ci_builds"."partition_id", "p_ci_builds"."auto_canceled_by_partition_id", "p_ci_builds"."auto_canceled_by_id", "p_ci_builds"."commit_id", "p_ci_builds"."erased_by_id", "p_ci_builds"."project_id", "p_ci_builds"."runner_id", "p_ci_builds"."upstream_pipeline_id", "p_ci_builds"."user_id", "p_ci_builds"."execution_config_id", "p_ci_builds"."upstream_pipeline_partition_id" FROM "p_ci_builds" INNER JOIN "p_ci_pipelines" ON "p_ci_pipelines"."partition_id" IS NOT NULL AND "p_ci_pipelines"."id" = "p_ci_builds"."commit_id" AND "p_ci_pipelines"."partition_id" = "p_ci_builds"."partition_id" WHERE "p_ci_builds"."type" = 'Ci::Build' AND "p_ci_pipelines"."iid" = 3
screenshot:
related to issue:#382689
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.
