Airflow: Add DAG level cluster policy

Created on 8 Nov 2020  路  4Comments  路  Source: apache/airflow

Description

Currently we have only task level cluster policy:
https://github.com/apache/airflow/blob/7dfb3980cecfafdb7d6b79d17455b08971cec7d4/airflow/models/dagbag.py#L386-L387

This is an amazing tool that allows users to validate their tasks by either skipping DAG or setting default values (queues, owners, emails etc). I would like to proposes same mechanism for DAGs.

Some may argue that users already can implement it by accessing task.dag attribute in the policy, however this has the following drawbacks:

Use case / motivation

Create explicit mechanism for creating "DAG level" cluster policy that will be optimised for this task (check only once per dag not for every task) and will not required users to implement this custom optimisation logic (for example by monkey patching or changes in their fork).

Related Issues

10282

feature

Most helpful comment

CC: @mik-laj @jaketf @swalkowski @JavierLopezT @kaxil

All 4 comments

CC: @mik-laj @jaketf @swalkowski @JavierLopezT @kaxil

Good idea !

+1

Nice feature. Thanks for informing me

Was this page helpful?
0 / 5 - 0 ratings