Allow jobs need to refer to a job in the same stage [RUN ALL RSPEC] [RUN AS-IF-FOSS]
What does this MR do?
Allows needs
to refer to jobs from the same stage.
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
EXPLAIN ANALYZE
SELECT "ci_builds".* FROM "ci_builds" WHERE "ci_builds"."type" IN ('Ci::Processable', 'Ci::Build', 'Ci::Bridge')
AND ("ci_builds"."commit_id" IN (SELECT MAX(id) FROM ci_pipelines))
AND ("ci_builds"."status" IN ('skipped'))
AND "ci_builds"."scheduling_type" = 0
AND (stage_idx > 0)
Nested Loop (cost=1.30..38.11 rows=14 width=1286) (actual time=0.107..0.108 rows=0 loops=1)
-> Result (cost=0.60..0.61 rows=1 width=4) (actual time=0.082..0.082 rows=1 loops=1)
InitPlan 1 (returns $0)
-> Limit (cost=0.57..0.60 rows=1 width=4) (actual time=0.079..0.080 rows=1 loops=1)
-> Index Only Scan Backward using ci_pipelines_pkey on ci_pipelines (cost=0.57..8771550.02 rows=311217263 width=4) (actual time=0.079..0.079 rows=1 loops=1
)
Index Cond: (id IS NOT NULL)
Heap Fetches: 2
-> Index Scan using index_ci_builds_on_commit_id_and_status_and_type on ci_builds (cost=0.70..37.35 rows=14 width=1286) (actual time=0.024..0.024 rows=0 loops=1)
Index Cond: ((commit_id = ($0)) AND ((status)::text = 'skipped'::text))
Filter: ((stage_idx > 0) AND (scheduling_type = 0) AND ((type)::text = ANY ('{Ci::Processable,Ci::Build,Ci::Bridge}'::text[])))
Planning Time: 24.519 ms
Execution Time: 0.156 ms
(12 rows)
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because _____.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides
Relates to: #30632 (closed)
Checklist ported over from the POC:
-
Handling circular dependencies. -
Handling .before_stage
,.for_stage
and.after_stage
as this will break that, ex.: retry of build, dependencies, analytics -
UX / some designs. -
A feature flag -
documentation changes
Edited by Laura Montemayor