-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
fix: update path handling in get_dag_directory()
to return the absolute path of the symlink
#42350
base: main
Are you sure you want to change the base?
fix: update path handling in get_dag_directory()
to return the absolute path of the symlink
#42350
Conversation
…lute path of the symlink
37c560c
to
e583098
Compare
get_dag_directory()
to teturn the absolute path of the symlinkget_dag_directory()
to return the absolute path of the symlink
Changelist by BitoThis pull request implements the following key changes.
|
The issue you had has been fixed in 2.10.2, which will be released later today. Makes me think that this PR is also a result of the same problem. |
@ephraimbuddy even if the 2.10.2 is reverting the changes causing the issue, I believe this PR still adds value and robustness to airflow, so I believe it would be a good addition. |
There's a similar change here: https://github.com/apache/airflow/pull/42142/files. So yeah, we will look into it |
I believe this one would be cleaner than the other one you mentioned |
Somtimes, I use symlinks in my local environment, like this:
In this case, the
get_dag_directory()
function follows the symlink and returns the original path, which causes issues.To resolve this, it should return the absolute path of the symlink itself.
Even though
airflow.cfg
is set withdags_folder = /opt/airflow/dags
, if that path is a symlink, it returns/home/oboki/projects/oboki-airflow/dags
, leading todag_not_in_current_folder = True
and causing issues. (a valid DAG is periodically deactivated.)I changed
manager.py
to use the absolute path of symlink itself instead of resolved one.