Repository navigation
Discover Dag definitions through the Task SDK importers - #74020
Merged
Merged
Conversation
dilnazanlid
marked this pull request as ready for review
October 1, 2026 11:37
dilnazanlid
requested review from
ephraimbuddy and
jedcunningham
as code owners
October 1, 2026 11:37
kaxil
reviewed
Oct 1, 2026
This was referenced Oct 1, 2026
This was referenced Oct 2, 2026
dilnazanlid
force-pushed
the
aip-85-definition
branch
from
October 2, 2026 09:30
b4550a9 to
8a9b2b8
Compare
dilnazanlid
force-pushed
the
aip-85-definition
branch
from
October 2, 2026 10:01
8a9b2b8 to
2baeeeb
Compare
uranusjr
reviewed
Oct 2, 2026
uranusjr
approved these changes
Oct 2, 2026
uranusjr
left a comment
Member
There was a problem hiding this comment.
One minor point, otherwise lgtm.
kaxil
approved these changes
Oct 2, 2026
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sdk/importers: discovery using the importer registry.TheDag processor manager still found files with
list_py_file_paths, which only returns.pyand.zipfiles. Files handled by a custom importer configured indag_importer_configswere never queued for parsing. Discovery now uses the importer registry, so anything a configured importer can handle is picked up.Some importers return definitions nested inside a file, such as members of an archive. The manager still queues and parses the enclosing file once. The member locations are kept on
DagFileInfo.definition_locs, anddeactivate_deleted_dagsandclear_orphaned_import_errorsmatch against them. Before, a separate zip-only pass reopened every archive to collect member paths. Thedeactivate_deleted_dags(bundle_name, present)signature is unchanged.Other fixes for nested definitions:
DagBag.get_dag/process_filenow reprocess a nested definition from its own location. Before, the path had to be mapped back to a.zip(correct_maybe_zipped).list_py_file_pathsandfind_dag_file_pathsare removed fromairflow.utils.file. They have no remaining callers in this repo.User-visible changes in discovery, since files are now routed to importers by extension:
.pycfile (outside__pycache__, with no.pynext to it) is now parsed by the Python importer..zipfile now shows azip_read_errorimport error; it used to be skipped without one..zipextension (e.g..egg) is no longer discovered. Rename it to.zip, or map its extension to the zip importer indag_importer_configs.This PR covers #74029's discovery change. One difference for importer authors: here an importer is discovered through its
list_dag_definitions, not only throughsupported_extensions+might_contain_dag.Was generative AI tooling used to co-author this PR?
Generated-by: Antigravity following the guidelines