File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -2045,13 +2045,14 @@ def set_prereqs_and_outputs(
20452045 return
20462046
20472047 # For active tasks, default to the task's current flow assignment.
2048+ warnings_flow_none = []
20482049 if itasks :
20492050 flow_nums = self .get_flow_nums (flow , flow_descr )
20502051 for itask in itasks :
20512052 if flow == ['none' ] and itask .flow_nums != set ():
2052- LOG . error (
2053- f"[ { itask } ] ignoring 'flow=none' set: task already has "
2054- f" { repr_flow_nums (itask .flow_nums , full = True )} "
2053+ warnings_flow_none . append (
2054+ f"{ itask . identity } : "
2055+ f"{ repr_flow_nums (itask .flow_nums , full = True )} "
20552056 )
20562057 continue
20572058
@@ -2076,6 +2077,13 @@ def set_prereqs_and_outputs(
20762077 self ._set_outputs_itask (itask , outputs )
20772078 no_op = False
20782079
2080+ if warnings_flow_none :
2081+ msg = '\n * ' .join (warnings_flow_none )
2082+ LOG .warning (
2083+ "Tasks already flow-assigned - ignoring "
2084+ f'"trigger --flow=none": \n * { msg } '
2085+ )
2086+
20792087 # For inactive tasks, default to all current flows.
20802088 if inactive_tasks :
20812089 flow_nums = self .get_flow_nums (flow or [FLOW_ALL ], flow_descr )
Original file line number Diff line number Diff line change 2727 FLOW_ALL ,
2828 FLOW_NEW ,
2929 FLOW_NONE ,
30- repr_flow_nums
3130)
3231from cylc .flow .scheduler import Scheduler
3332
@@ -137,11 +136,8 @@ async def test_flow_assignment(
137136 do_command ([active_a .identity ], flow = [FLOW_NONE ])
138137 assert active_a .flow_nums == {1 , 2 }
139138 assert log_filter (
140- contains = (
141- f'[{ active_a } ] ignoring \' flow=none\' { command } : '
142- f'task already has { repr_flow_nums (active_a .flow_nums )} '
143- ),
144- level = logging .ERROR
139+ contains = ("Tasks already flow-assigned - ignoring" ),
140+ level = logging .WARNING
145141 )
146142
147143 do_command ([active_a .identity ], flow = [FLOW_NEW ])
You can’t perform that action at this time.
0 commit comments