Skip to content

Print warning if Variable.get () or any other DB method is executed during DAG parsing #11925

@potiuk

Description

@potiuk

Description

It would be great to make a big, hairy warning when someone tries to use Variable.get() or Connection or any other method that hits Airflow's database during DAG parsing. This is a very bad practice, resulting in opening and closing DB connections and it is too easy to use and too difficult to spot that it is actually a problem.

Use case / motivation

Guide our users to write good DAGs.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions