Skip to content

Commit af7eb4f

Browse files
group-trigger: release tasks as needed
* The trigger command has always overridden the held status. * This still holds for group-start tasks, however: * In-group tasks which were previously held are not released (so will not run when their deps are met). * Tasks which are removed as part of group-trigger will get held as a side-effect of removal. * This small modification releases in-group active tasks, as well as non start-tasks which were removed in order to ensure that trigger continues to trump held.
1 parent b39c17b commit af7eb4f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cylc/flow/commands.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,7 @@ def _force_trigger_tasks(
730730

731731
# Record off-group prerequisites, and active tasks to be removed.
732732
active_to_remove: List[TaskTokens] = []
733+
active_to_resume: Set[TaskTokens] = set()
733734

734735
warnings_flow_none = []
735736
warnings_has_job = []
@@ -794,6 +795,7 @@ def _force_trigger_tasks(
794795

795796
else:
796797
active_to_remove.append(itask.tokens.task)
798+
active_to_resume.add(itask.tokens.task)
797799

798800
if warnings_flow_none:
799801
msg = '\n * '.join(warnings_flow_none)
@@ -807,6 +809,12 @@ def _force_trigger_tasks(
807809
if flow != [FLOW_NONE]:
808810
# (No need to remove tasks if triggering with no-flow).
809811
_remove_matched_tasks(schd, {*active_to_remove, *inactive}, flow_nums)
812+
813+
# trigger should override the held state, however, in-group tasks may
814+
# have previously been held and active in-group tasks will become
815+
# held as the result of removal
816+
schd.pool.release_held_tasks({*active_to_resume, *inactive})
817+
810818
# Store removal results before moving on.
811819
schd.workflow_db_mgr.process_queued_ops()
812820

0 commit comments

Comments
 (0)