Replies: 3 comments 5 replies
-
|
This is adeliberate decision. We need to make certain assumptions about healthiness of DAGs and such errors are precisely meant to tell "it's wrong". You might think of other ways of surfacing the information (for example in the same way Import Errors are raised in the UI) if not there already but yes. Catastrofic errors and stoppig DAG processing in such case is the way how you can get attention of the users. This is really "consistency" check. When you have a recursive error, the problem is that many things might be broken, so "good" behaviour in this case is to "stop-the world" basically. Because you do not know what else can be broken. Converting it to a discussion, but I am quite sure we won't change the "stop-the world" in this case. |
Beta Was this translation helpful? Give feedback.
-
|
Also to give one more example from the past I had - generally when you see something totally unexpected (like this case) it's better to crash hard, because you never know what harm is done. Various things can happen if such recursive loop is found and many things can go wrong. Happened to me when running a system which was "half working" because such catastriphic unknown situatiuon occured and problem was undetected for 2 days. It took me and my collegue 2 weeks to recover from wrongly charged data in billing system of telecom operator - we had to track down a lot of "bad" transactions. That tought me - "when in doubts, CRASH". Then you will get attention. |
Beta Was this translation helpful? Give feedback.
-
|
I'm getting same kind of error, but I'm not able to find the root cause for this loop Error: File structure in the git-sync container: I would assume it would only run through the Anything i can check? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Apache Airflow version
2.9.3
If "Other Airflow 2 version" selected, which one?
No response
What happened?
Disclaimer: This may be considered a bug or a change of behaviour in Airflow.
Airflow is very strict with symbolic links in the DAGs folder that lead to recursive loops:
airflow/airflow/utils/file.py
Line 243 in 965d752
However, let's say someone accidentally deploys a "bad" folder (e.g. by using
astro deploy --dags). To have Airflow raise aRuntimeErrorand stop parsing all DAGs, which may be critical to a business, could be considered an overreaction. To raise this exception can have a very high cost for business and is very disruptive to Airflow users, as recently experienced by at least one Astronomer customer.What you think should happen instead?
I believe by default Airflow should raise warnings if it faces symbolic links that lead to recursive links and ignore them. We could expose a configuration for erroring, if users want to keep the current behaviour.
How to reproduce
In an existing working Airflow project, create a symbolic link that leads to a recursive loop, e.g.:
Try to run a DAG that previously worked:
See the exception
RuntimeError: Detected recursive loop forbeing raised.Operating System
N/A
Versions of Apache Airflow Providers
N/A
Deployment
Astronomer
Deployment details
ZD 57833
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions