Skip to content

Add bundle_name to Dag objects #68575

@stephen-bracken

Description

@stephen-bracken

Description

Add a bundle_name attribute that references the dag bundle which populated a given dag object.

Use case/motivation

Make it easier to identify which dag bundle a dag originates from, which enables creating bundle based dag policies, e.g. filtering example dags out of the policy list or setting team specific policies:

@hookimpl
def dag_policy(dag: DAG):
    if dag.bundle_name == "example_dags":
        return # skip validating example dags
    if dag.bundle_name == "special_dags":
         ... # special dag policy

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions