Skip to content

Quiet mode for dags list-import-errors #31655

Description

@fjmacagno

Description

Add an option for airflow dags list-import-errors command like -q which suppresses all logging, in order to print just the intended output.

Use case/motivation

I want to make a CI test which confirms that there are no dag import errors, and the easiest way that it seems to do that is to parse the output of airflow dags list-import-errors, something like

airflow dags list-import-errors -o json | jq -e 'select(type=="array" and length == 0)'

However, if there is any logging that occurs in list-import-errors it breaks the test, and it isn't always possible to remove the logging statement (currently this is messing me up).

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

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions