Skip to content

Conversation

@amoghrajesh
Copy link
Contributor

This is a precursor to: #59956 to remove usages of airflow references in shared libraries.

There are some utilities like this one: find_path_from_directory which is needed in dag path discovery as well in plugins manager. Right now its present in utils.file.

Since it is a module_loading related utility, moving it to module_loading shared library made the most sense. This allows shared libraries like plugins_manager to use the
function without importing from airflow.*

Changes of note:

  • New file shared/module_loading/file_discovery.py
  • Update airflow.utils.file to import from shared and inline config
  • Update plugins_manager to import from shared library

The method in shared library defaults to "glob" syntax. Any callers that needed a change have been updated to instead inject the dependency config after reading it from conf

Deprecation works:

from airflow.utils.file import find_path_from_directory
<ipython-input-2-a3047d0a2d8f>:1 DeprecatedImportWarning: Importing find_path_from_directory from airflow.utils.file is deprecated and will be removed in a future version. Use airflow._shared.module_loading.find_path_from_directory instead.

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@amoghrajesh
Copy link
Contributor Author

Pretty trivial, merging it

@amoghrajesh amoghrajesh self-assigned this Jan 5, 2026
@amoghrajesh amoghrajesh added this to the Airflow 3.2.0 milestone Jan 5, 2026
@amoghrajesh amoghrajesh merged commit 8badad1 into apache:main Jan 5, 2026
128 checks passed
@amoghrajesh amoghrajesh deleted the move-airflow-files-utilities-to-shared branch January 5, 2026 08:46
chirodip98 pushed a commit to chirodip98/airflow-contrib that referenced this pull request Jan 8, 2026
chirodip98 pushed a commit to chirodip98/airflow-contrib that referenced this pull request Jan 9, 2026
stegololz pushed a commit to stegololz/airflow that referenced this pull request Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants