Skip to content

Discover a bundle's Dag definitions through the importer registry - #73728

Merged
shahar1 merged 2 commits into
apache:mainfrom
dilnazanlid:aip-85-registry
Sep 28, 2026
Merged

shahar1 merged 2 commits into
apache:mainfrom
dilnazanlid:aip-85-registry

Conversation

@dilnazanlid

Copy link
Copy Markdown
Contributor
  • Project Board: AIP-85 Dag Importer (Project #672)
  • 2nd PR for rewiring the Dag processing process with sdk/importers: prepares the Task SDK importer registry so Dag processing can discover definitions through importers instead of by file path.

Changes:

  • DagImporterRegistry.list_dag_definitions(bundle, safe_mode=...) yields each definition (or discovery error) in a bundle, paired with the importer that listed it. The pairing is needed because a composite importer's members, such as zip members, cannot be routed back to it by extension.
  • find_file_dag_definitions accepts a single file as its root, so a parse process can scope discovery to the file it was given.
  • An importer whose extensions were all overridden, e.g. by a bundle's own ZipImporter, no longer takes part in discovery. Previously it listed the same zip members a second time.
  • An importer config entry may be a bare classpath string, shorthand for {"classpath": "..."}.

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Antigravity following the guidelines

@SameerMesiah97 SameerMesiah97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just had a look at the diff and traced the execution flow for list_dag_definitions and saw one potential issue.

@shahar1 shahar1 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've managed to reproduce the issue in Sameer's comment + one nit

Dag processing needs every definition in a bundle paired with the importer
that should import it: a composite importer's members, such as zip members,
cannot be routed back to it by extension. An importer whose extensions were
all overridden, for example by a bundle's own ZipImporter, kept listing its
definitions and discovered them twice.
@shahar1
shahar1 merged commit 3634bc8 into apache:main Sep 28, 2026
107 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

3 participants