Repository navigation
Java SDK: Generate Dag and task configuration from the serialization schema - #73595
Merged
henry3260 merged 2 commits intoSep 30, 2026
Merged
Conversation
This was referenced Sep 23, 2026
jason810496
force-pushed
the
feature/java-sdk-dag-schema-config
branch
6 times, most recently
from
September 27, 2026 14:48
7007954 to
571e95f
Compare
1 task done
jason810496
force-pushed
the
feature/java-sdk-dag-schema-config
branch
2 times, most recently
from
September 27, 2026 15:39
82421a3 to
c36610b
Compare
1 task done
A Dag authored entirely in Java has no Python in the picture, so teaching its edge verbs as "Java's spelling of >> and <<" asks the reader to know a language the feature does not involve. The mixed-language surface keeps its Python references, because there the Python Dag file is part of what the reader has to understand.
jason810496
force-pushed
the
feature/java-sdk-dag-schema-config
branch
from
September 29, 2026 02:41
c36610b to
6b03721
Compare
jason810496
marked this pull request as ready for review
September 29, 2026 07:27
FrankYang0529
approved these changes
Sep 30, 2026
FrankYang0529
left a comment
Member
There was a problem hiding this comment.
Overall LGTM. Thanks for the PR.
…schema A Java-authored Dag could carry no schedule, retries, tags or any other Airflow setting, so it could be defined but not configured. Hand-listing those settings in Java would drift from the Python semantics they mirror, so they are recorded and validated against Airflow's own Dag serialization schema instead, and take effect once the runtime answers parse requests. The `Builder` annotations are generated from a copy of that schema vendored at java-sdk/sdk/schema/dag-schema.json, so a source release builds without the monorepo; a prek hook keeps the copy in sync.
jason810496
force-pushed
the
feature/java-sdk-dag-schema-config
branch
from
September 30, 2026 02:47
6b03721 to
8b8bccd
Compare
henry3260
approved these changes
Sep 30, 2026
This was referenced Oct 2, 2026
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
Add the Dag and task level arguments, and those arguments are generated from the Airflow's own Dag serialization schema.
Example
The same keys on the interface surface:
How
:sdk:generateDagDslemitsorg.apache.airflow.sdk.Builder— the@Builder.Dag/@Builder.Task/@Builder.TaskHandlerannotations — and the key-to-type table thatDagDef.configandTaskDef.configvalidate against.TaskSpecgenerator: scalar properties only, serializer-owned keys skipped, and a documented exclusion list for Python-only concerns. An exclusion entry that stops matching an eligible key fails generation, so the list cannot go stale.sdk/schema/dag-schema.jsonso a source release builds standalone; an in-repo build refreshes it fromairflow-core, andsync-java-sdk-dag-schemaprek hook re-vendors it on demand.camelCase(retryDelay);configkeys are Airflow's own names ("retry_delay").build()constructs theDagDefitself and chains theconfigcalls onto it.java.timevalues inconfigcalls. An unknown key or a mismatched value type fails the build or Dag parsing.Was generative AI tooling used to co-author this PR?