-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
DagFileProcessor 'NoneType' is not iterable #22289
Comments
This seems related to #20468, which is fixed on |
Yeah. But I am not 100% sure if it fixes the problem. |
This is handled in two places where tags can be None and fallback to empty list/set . Removing the or condition to use empty list/set causes below test to fail since
Line 481 in 2f5a567
Line 2465 in 2f5a567
Test case setting tags as None : airflow/tests/models/test_dag.py Lines 789 to 801 in 2f5a567
|
This might be already fixed by #21757 |
Can someone test on 2.3.0b1 please? |
Hello, I am not experiencing this issue on the latest 2.3.0 release |
Closing it then . We can re-open if we see it again. Thanks @pbabics for checking! This is really helpful to keep our issues in order :) |
Discussed in #21846
Originally posted by momoadc January 20, 2022
Apache Airflow version
2.2.2
What happened
I'm seeing the same log repeating in the Scheduler.
I'm working in a restricted network so I cannot bring the entire log:
I saw that a single DAG didn't have any labels and i tried to add a label but the log is still showing
What you expected to happen
No response
How to reproduce
I've experienced this issue with the following steps (the actual DAG contents are arbitrary, besides the tags)
tags=None
nortags=[]
example snippet:
tags=["demo"]
example snippet:
example snippet:
The issue appears to be related to removing all tags once a dag has been given a tag. a workaround is to put in
tags=[]
instead of removing the tag line completely. this will allow the dag to be parsed correctly, though it doesn't resolve the underlying issue, which seems to be that if a dag has a tag, the parser will struggle with the tags line being removed completely. you need to set it to an empty list instead. once the dag has been parsed once with an empty tag list, you can remove the entire line and it seems to be fine (if you just hate having that empty list there).Operating System
Debian 10 (Scheduler image)
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
Deployment details
I'm deploying on OpenShift 4.8 using the official Helm Chart v1.3.0
Anything else
This happened to our 2.2.2 deployment. We've had some DAGs with tags=[...] and when we completely removed that line, those DAGs caused this error at the scheduler.
The issue is that for some reason this did not result in import error that was visible anywhere, we had to be alerted by a partner that data was no longer being processed.
Another quick fix is to manually remove those entries from dag_tag in the matadb.
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: