dagu icon indicating copy to clipboard operation
dagu copied to clipboard

[Feature Request] Modular DAG

Open GhisF opened this issue 2 years ago • 5 comments

It is not uncommon to have several versions of a DAG with only minor variations. It could be interesting to have the possibility to import steps or call other DAGs to avoid copy/paste between dags.

GhisF avatar Nov 29 '22 08:11 GhisF

Thanks for the great suggestion. Yes, as you mentioned there're two different approaches to dealing with the issue. I think calling other DAGs (or sub-DAGs) natively looks like a good idea.

yohamta avatar Nov 29 '22 12:11 yohamta

any updates?

ccxuy avatar May 11 '24 07:05 ccxuy

Not yet. While importing steps or calling other DAGs to avoid copy/paste between DAGs is an interesting idea, I think that allowing the direct importing of other DAGs in YAML could lead to some complications and potential issues with maintainability.

As an alternative, you can currently call other DAGs (or sub-DAGs) using the dagu start command.

We can continue to explore ways to improve the reusability and modularity of DAGs. Any suggestion or ideas are very welcomed.

yohamta avatar May 11 '24 07:05 yohamta

my idea:

steps:
  - sub_workflow1
     run: path/to/sub_workflow.yaml
     params: "A=1 B=2"

yohamta avatar May 11 '24 08:05 yohamta

It looks like a good idea.

GhisF avatar May 13 '24 08:05 GhisF

This feature is implemented in v1.13.0.

yohamta avatar May 25 '24 17:05 yohamta