Repository navigation
Adjust warnings, import errors, and Dag source models for sdk/importers - #72474
Merged
Merged
Conversation
dilnazanlid
requested review from
XD-DENG,
ashb,
bbovenzi,
bugraoz93,
choo121600,
ephraimbuddy,
guan404ming,
henry3260,
jason810496,
jedcunningham,
pierrejeambrun,
rawwar,
ryanahamilton,
shubhamraj-git and
vatsrahul1001
as code owners
September 3, 2026 12:21
dilnazanlid
force-pushed
the
aip-85-error-warning
branch
4 times, most recently
from
September 15, 2026 09:42
d67d024 to
9007a4c
Compare
dilnazanlid
force-pushed
the
aip-85-error-warning
branch
from
September 22, 2026 12:45
392ce22 to
f241197
Compare
jason810496
reviewed
Sep 23, 2026
jason810496
reviewed
Sep 23, 2026
dilnazanlid
force-pushed
the
aip-85-error-warning
branch
from
September 25, 2026 09:11
f241197 to
d24b5a3
Compare
2 tasks done
dilnazanlid
force-pushed
the
aip-85-error-warning
branch
from
September 25, 2026 10:11
d24b5a3 to
c836751
Compare
dilnazanlid
force-pushed
the
aip-85-error-warning
branch
3 times, most recently
from
September 25, 2026 11:19
bc576b6 to
2ee8f50
Compare
uranusjr
approved these changes
Sep 26, 2026
shahar1
reviewed
Sep 26, 2026
dilnazanlid
force-pushed
the
aip-85-error-warning
branch
from
September 27, 2026 20:07
2ee8f50 to
a89729e
Compare
The API response and the Code view's syntax highlighting already expose a language for each Dag's source, but nothing persisted it, so the field was always null and the UI silently fell back to Python for every Dag.
Renaming filename to source_reference might break compatibility across the database schema, model attributes, and public REST API endpoints that rely on filename to refer to concrete files.
dilnazanlid
force-pushed
the
aip-85-error-warning
branch
from
September 27, 2026 20:19
a89729e to
a586e2b
Compare
dilnazanlid
force-pushed
the
aip-85-error-warning
branch
from
September 27, 2026 20:50
a586e2b to
3f7666f
Compare
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.
Why
AIP-85 allows Dags to come from non-Python and composite sources (YAML/JSON importers,
ZipImporter, external bundles). Three pieces of metadata currently assume a single local.pyfile:filename, but a Dag definition is no longer strictly 1:1 with a file —an archive member inside a container (e.g.
archive.zip/dags/my_dag.py) needs an abstract sourcereference while retaining
filenamefor compatibility.DagWarningrejects any type outside the built-in enum, preventing importers from reportingformat-specific warnings.
This is groundwork for AIP-85: it introduces the necessary schema and model extensions without altering
runtime behavior for existing Python Dags.
What
Import errors: add
source_reference, keepfilenameca8499dc1004adds a nullablesource_referencecolumn (String(2000)) toimport_error.filenameas the primary file path column across the database, model, and API to preservefull backward compatibility for existing tooling and API consumers.
source_reference: str | NoneonImportErrorResponseandParseImportError.ParseImportError.full_file_path()usingPath.is_absolute()rather than substring prefixmatching, avoiding false positives across sibling bundle paths.
delete_dagcleanup to delete import errors matchingsource_referenceorfilename.Dag warnings: open-ended types, enum retained
DagWarning.__init__acceptsDagWarningType | str, normalizing enum members to their string valueand preserving importer-supplied warning types verbatim.
DAGWarningResponse.warning_typeand thelist_dag_warningsfilter acceptDagWarningType | str.This retains
DagWarningTypein the published schema and generated clients as the vocabulary forcore-emitted warnings, while gracefully accepting importer-defined warnings.
warning_typereturns200with an empty list instead of422.Dag source language
e5a91c7f42b3adds a nullablelanguagecolumn (String(64)) todag_code.DAGSourceResponseandDagCodepersist and exposelanguage: str | None.code?.language ?? "python"to MonacoEditorandCodeDiffViewer, defaultingto Python when unstated.
Was generative AI tooling used to co-author this PR?
Generated-by: Google Gemini following the guidelines