Reputation: 13387
On Airflow 2 my dag is not showing on the UI, and I'm getting DAG Import Errors (...) for it. The error message is insufficient for me to debug (it's a custom operator, with a lot of custom logic - so I don't want to get into details of the error itself). On Airflow 1.X I could use cli:
airflow list_dags
to get more elaborated debug message, is there anything analogical on airflow 2 ? I'm looking for a cli command/UI option that will provide me with more elaborated error message, than the one I'm getting on the main screen of the webserver.
Upvotes: 3
Views: 1111
Reputation: 7795
As described in the Airlfow's documentation, to test DAG loading you can simply run:
python your-dag-file.py
If there is any problem during the DAG loading phase you will get a stack trace here.
The later sections also describe how to test custom operators.
Upvotes: 3
Reputation: 15921
As explained in the upgrading manual the
airflow list_dags
has been changed to airflow dags list
The full syntax is:
airflow dags list [-h] [-o table, json, yaml] [-S SUBDIR]
for more information see docs
Upvotes: 1