From f521460de7121596c830cd346dfb0f71ef320394 Mon Sep 17 00:00:00 2001 From: mostaphaRoudsari Date: Fri, 18 Nov 2022 19:03:49 -0500 Subject: [PATCH] fix(grouped dag): use annotations to set the main dag This commit allows the recipe author to choose the main task in a grouped dag by setting the annotations `{'main_task': True}` --- pollination_dsl/dag/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pollination_dsl/dag/base.py b/pollination_dsl/dag/base.py index 513fb98..bfc8326 100644 --- a/pollination_dsl/dag/base.py +++ b/pollination_dsl/dag/base.py @@ -144,5 +144,8 @@ def queenbee(self) -> QBDAG: f'Found an invalid task "{task.name}" with parameter output in ' \ f'GroupedDAG "{dag.name}". Only file or folder outputs are allowed in ' \ f'GroupedDAG.\n{task.parameter_returns}' + is_main = task.annotations.get('main_task', False) + if is_main: + dag.annotations['__main_task__'] = task.name return dag