Repository navigation
Parse native Java Dags and show their source - #73843
Merged
jason810496 merged 8 commits intoOct 1, 2026
Merged
jason810496 merged 8 commits into
jason810496 merged 8 commits into
Conversation
jason810496
added this pull request to stack #73848
September 28, 2026 13:20
This was referenced Sep 28, 2026
This was referenced Sep 28, 2026
jason810496
force-pushed
the
jason/lang-sdk-e2e/04-java-dag-importer
branch
from
September 28, 2026 15:57
4619343 to
a80facc
Compare
jason810496
force-pushed
the
jason/lang-sdk-e2e/03-native-dag-parse
branch
from
September 28, 2026 15:57
6242f83 to
8e8c982
Compare
jason810496
force-pushed
the
jason/lang-sdk-e2e/04-java-dag-importer
branch
from
September 29, 2026 01:25
a80facc to
d62246f
Compare
jason810496
force-pushed
the
jason/lang-sdk-e2e/03-native-dag-parse
branch
from
September 29, 2026 01:26
8e8c982 to
0080efb
Compare
jason810496
force-pushed
the
jason/lang-sdk-e2e/04-java-dag-importer
branch
from
September 29, 2026 01:29
d62246f to
f8acd1d
Compare
jason810496
force-pushed
the
jason/lang-sdk-e2e/03-native-dag-parse
branch
from
September 29, 2026 01:29
0080efb to
c4b3431
Compare
jason810496
removed this pull request from stack #73848
October 1, 2026 03:02
jason810496
force-pushed
the
jason/lang-sdk-e2e/03-native-dag-parse
branch
from
October 1, 2026 03:03
c4b3431 to
e6de2df
Compare
jason810496
force-pushed
the
jason/lang-sdk-e2e/04-java-dag-importer
branch
from
October 1, 2026 03:03
f8acd1d to
ceb6b6a
Compare
1 task done
jason810496
added this pull request to stack #74005
October 1, 2026 03:04
jason810496
force-pushed
the
jason/lang-sdk-e2e/03-native-dag-parse
branch
from
October 1, 2026 06:20
e6de2df to
ec6f22e
Compare
jason810496
force-pushed
the
jason/lang-sdk-e2e/04-java-dag-importer
branch
from
October 1, 2026 06:20
ceb6b6a to
ca832b6
Compare
jason810496
force-pushed
the
jason/lang-sdk-e2e/03-native-dag-parse
branch
from
October 1, 2026 12:41
ec6f22e to
c35472f
Compare
jason810496
force-pushed
the
jason/lang-sdk-e2e/04-java-dag-importer
branch
from
October 1, 2026 12:41
ca832b6 to
5e8a705
Compare
jason810496
removed this pull request from stack #74005
October 1, 2026 13:18
jason810496
force-pushed
the
jason/lang-sdk-e2e/04-java-dag-importer
branch
from
October 1, 2026 13:18
5e8a705 to
8ffd19e
Compare
jason810496
force-pushed
the
jason/lang-sdk-e2e/03-native-dag-parse
branch
from
October 1, 2026 13:18
c35472f to
6f91c3e
Compare
Base automatically changed from
jason/lang-sdk-e2e/03-native-dag-parse
to
jason/lang-sdk-e2e/02-importer-registry
October 1, 2026 13:18
This was referenced Oct 1, 2026
Member
Author
|
Replaced by #74036. GitHub marked this PR as merged into a stack branch when the stack was reordered; nothing was merged into |
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.
Stack (bottom to top): #73841, #74004, #73842, #73843, #73844, #73845, #73846, #73847
Why
With this PR,
JavaCoordinatorparses the native Dags a bundle JAR declares, and the Code view shows their Java source.What changes
JavaCoordinatorwithoutjars_rootparses each.jarwhose manifest setsMain-Class(matchingmain_classif set) in the Dag bundles it reads, skipping thin-bundle dependency JARs. An unreadable JAR is kept so its parse reports the error.java -classpath <bundle JARs> <jvm_args> <Main-Class>, with the same schema version lookup. A JAR it cannot run gets an import error.emailparser broke a foldedMain-Class..javafile, orairflowBundle.dagSource, into every bundle JAR, fat or thin, and names it in the manifest.get_source_codereturns it, up to 1 MiB, or a placeholder. A JAR embeds one source for all its Dags, so the Java importer ignores the Dag id.The Java runtime is unchanged here. The Java SDK layer above makes it answer the parse request, with a payload that passes
validate_serialized_dag.airflowBundle { mainClass = "com.example.Main" dagSource = file("src/main/java/com/example/MyDag.java") // optional }Example bundle manifest (
./gradlew bundleinjava-sdk/example):Deviations and limitations
get_source_codeopen for native Dags. This returns the source embedded as the pure Java Dags ADR (Move Lang-SDK ADRs from java-sdk/adr to airflow-core/adr/lang-sdk #70156) proposes, but underMETA-INF/airflow/dag-code/instead of the JAR root to avoid fat JAR collisions, and without itsairflow-metadata.yaml, since the parse runs the JVM.main_class, each is parsed, but a task runs the first one in walk order (Coordinator: detect ambiguous entrypoints and duplicate dag_ids at import time #71134).max_active_tasks,max_active_runs,max_consecutive_failed_dag_runs,catchupanddisable_bundle_versioningwhen a Dag leaves them unset, so a native Java Dag does not get the Airflow config values that Parse native Lang-SDK Dags with their coordinator's runtime #73842 fills in.queueset, no Dag in both Java and Python in one bundle, no cluster policies,airflow dags reserializedoes not store a JAR's Dags, andairflow dags test,tasks test,tasks renderandtasks listrefuse a native Java Dag.Verification
task-sdk/tests/task_sdk/coordinators/java: 88 passed. Java SDK./gradlew testat this layer passed.Was generative AI tooling used to co-author this PR?