@@ -75,6 +75,10 @@ def _unresolved_task_path(step_name):
7575 )
7676
7777
78+ def _skipped_task_path (step_name ):
79+ return "%s/%s/SKIPPED" % (RUN_ID , step_name )
80+
81+
7882def test_chain_skip_fallback_uses_latest_executed_split_switch (chain_skip_argo ):
7983 node = chain_skip_argo .graph ["end" ]
8084 assert node .in_funcs == ["start" , "step2" , "step3" ]
@@ -91,6 +95,20 @@ def test_chain_skip_fallback_uses_latest_executed_split_switch(chain_skip_argo):
9195 assert _decode_input_paths (result ) == [_task_path ("step2" )]
9296
9397
98+ def test_chain_skip_with_skipped_sentinel (chain_skip_argo ):
99+ """Same as above but with SKIPPED sentinel (Argo v3.7.11+ behavior)."""
100+ node = chain_skip_argo .graph ["end" ]
101+ skippable_steps = chain_skip_argo ._skippable_input_steps_in_dag_order (node )
102+
103+ input_paths = _encode_input_paths (
104+ [_task_path ("start" ), _task_path ("step2" ), _skipped_task_path ("step3" )]
105+ )
106+
107+ result = generate_input_paths (input_paths , skippable_steps )
108+
109+ assert _decode_input_paths (result ) == [_task_path ("step2" )]
110+
111+
94112@pytest .mark .parametrize (
95113 "paths, skippable_steps, expected" ,
96114 [
@@ -105,8 +123,30 @@ def test_chain_skip_fallback_uses_latest_executed_split_switch(chain_skip_argo):
105123 [_task_path ("branch" )],
106124 ),
107125 ([_task_path ("step" ), _task_path ("step2" )], ["step" ], [_task_path ("step2" )]),
126+ (
127+ [_task_path ("start" ), _skipped_task_path ("branch" )],
128+ ["start" ],
129+ [_task_path ("start" )],
130+ ),
131+ (
132+ [_task_path ("start" ), _task_path ("step2" ), _skipped_task_path ("step3" )],
133+ ["step2" , "start" ],
134+ [_task_path ("step2" )],
135+ ),
136+ (
137+ [_skipped_task_path ("left" ), _task_path ("right" )],
138+ [],
139+ [_task_path ("right" )],
140+ ),
141+ ],
142+ ids = [
143+ "normal_join" ,
144+ "non_skippable_executed" ,
145+ "exact_step_name" ,
146+ "skipped_non_skippable" ,
147+ "skipped_with_skippable_fallback" ,
148+ "skipped_no_skippable_steps" ,
108149 ],
109- ids = ["normal_join" , "non_skippable_executed" , "exact_step_name" ],
110150)
111151def test_generate_input_paths_filters_by_exact_step_name (
112152 paths , skippable_steps , expected
0 commit comments