-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Bring back support for local dagbag based list/list-import-errors #49380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Note during review:
|
@jscheffl , yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I support the idea using the commands to check if local edited DAG files are parse-able.
Otherwise I am asking a bit myself if it would be better to introduce a specific command for this like airflow dags parse
which would just print errors if un-parsable?
Following on this would be cool to offer a "pre-commit" that people can just add to their repo (if not existing already?) based on this.
Before merging would like another opinion, as on the bug report there had been some discussions already, e.g. by @bugraoz93 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jscheffl Thanks! I agree. It's all good to include this in the code base. I was clarifying some things for AF 3 in the issue. I wasn't against the idea.
I tried to understand the scenario better, and my only concern with the approach was this action command calling and action command, which is addressed in this PR :)
#49331 (comment)
Looks good! @dheerajturaga, thanks for adding and addressing the comment! :)
Co-authored-by: Jens Scheffler <[email protected]>
Thanks @jscheffl & @bugraoz93 !! |
…ache#49380) * Bring back support for localdagbag based list/list-imporr-errors * fix typo * Fix unit tests - restore db back to its orig state for downstream tests * Absorb Ruff linting to fix CI static checks * better help message Co-authored-by: Jens Scheffler <[email protected]> --------- Co-authored-by: Jens Scheffler <[email protected]>
Airflow 2 supported running of
airflow dags list
andairflow dags list-import-errors
without bringing up other services (webserver/scheduler/dag-processor/triggerer) However, in Airflow 3,airflow dags list
andairflow dags list-import-errors
fetch from the database instead.This requires dag developers to have a
dag-processor
service running on their local setups for these simple tasks (for example: some one trying make quick dag changes and commit to their dag repository)We need to keep the ability to list dags and import errors without having to run any other services. This PR addresses this issue by introducing a
--local
argument toairflow dags list
andairflow dags list-import-errors
.This command will fetch from db:
airflow dags list
This command will read the local dagbag instead:
airflow dags list --local
Resolves #49330
Closes #49331