File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,22 +87,17 @@ impl JobDAG {
8787 continue ;
8888 }
8989
90- // Match base job ID (scoped to same stage if prefixing active)
90+ // Match base job ID (the job_id from split config)
91+ // NOTE: This must work across stages. When stage prefixing is enabled, the
92+ // *generated* instance IDs are stage-scoped, but the job_id is still the
93+ // canonical identifier users reference in `needs` (e.g. "build/build_app_image").
94+ //
95+ // We intentionally add *all* concrete instances that share this job_id
96+ // (e.g. matrix-expanded jobs).
9197 if & candidate. job_id == needed_job_id {
92- if should_prefix ( & concrete_job. stage , wf_config)
93- && should_prefix ( & candidate. stage , wf_config)
94- {
95- if concrete_job. stage == candidate. stage {
96- new_needs. insert ( candidate_id. clone ( ) ) ;
97- graph. update_edge ( node_map[ candidate_id] , dependent_node, ( ) ) ;
98- found_match = true ;
99- }
100- } else {
101- // Global match (e.g. no stage prefixing)
102- new_needs. insert ( candidate_id. clone ( ) ) ;
103- graph. update_edge ( node_map[ candidate_id] , dependent_node, ( ) ) ;
104- found_match = true ;
105- }
98+ new_needs. insert ( candidate_id. clone ( ) ) ;
99+ graph. update_edge ( node_map[ candidate_id] , dependent_node, ( ) ) ;
100+ found_match = true ;
106101 }
107102 }
108103 if !found_match {
You can’t perform that action at this time.
0 commit comments