-
Notifications
You must be signed in to change notification settings - Fork 16.6k
Description
Description
Support grouping dags, where a dag can be part of many groups, with a configuration similar to max_active_runs across the whole group.
Use case/motivation
(I'm sure this must have been discussed somewhere before but I can't find any searches for the topic, apologies if there are)
In a nutshell: Motivations relating to the reasoning behind the current existence of DAG level max_active_runs.
Use case: My dags each have a 1-1 relationship to a single table in my schema which they aim to mutate. Occasionally I need to duplicate a dag with a static start/end date to fill in some missing data (eg. backfilling jobs for earlier dates, or backfilling jobs for existing dates without overriding existing data). All dags by themselves run with max_active_runs=1.
Each dag I have creates a snapshot of the table (and rolls back if necessary when things go wrong). If a rollback of this snapshot were to trigger it is pretty much guaranteed to have negative impacts on the persistence of the data of another dag working on the same table.
What would you like to happen? Ideally the ability to make a DAGGroup object with max_active_runs. (I'm not sure if it's better for the DagGroup to add dags, or if the dag should specify which DagGroup(s) to belong to).
Alternatives:
- I can pause DAGs manually that might interfere with each other, but would need to actively monitor them
- Cross-DAG dependencies, though I feel all dags would need knowledge of each other and would be a nightmare to maintain and get right
Related issues
No response
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct