Skip to content

Commit

Permalink
fix(grouped dag): use annotations to set the main dag
Browse files Browse the repository at this point in the history
This commit allows the recipe author to choose the main task in a grouped dag by setting the annotations `{'main_task': True}`
  • Loading branch information
mostaphaRoudsari committed Nov 19, 2022
1 parent 3b51eb1 commit f521460
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pollination_dsl/dag/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f521460

Please sign in to comment.