jason810496 opened a new pull request, #71190: URL: https://github.com/apache/airflow/pull/71190
related: AIP-108 depends on: #69757, #71057 ## Why A Java-authored Dag could not reach the scheduler on its own. The runtime answered task-execution requests only, so a Python stub file still had to exist purely to describe the Dag's structure — even for a Dag whose schedule, configuration and dependency edges were all declared in Java. With edges and schema-keyed configuration now recorded on the Java Dag model, the runtime has everything it needs to answer the coordinator's `DagFileParseRequest` itself, and the `nativedag` examples become real schedulable Dags with no Python counterpart. ## How - `parseDags` serializes every Dag registered on the `Bundle` to DagSerialization v3 — the same shape Python's `DagSerialization` emits — and returns it as a `DagFileParsingResult` body. It mirrors the Go SDK's serde (`go-sdk/pkg/execution/serde.go`): `type`/`var` envelopes, omit-if-schema-default operator fields, sorted tags and downstream ids, and a timetable derived from the schedule. - `Server.dispatchTask` gains a `DagFileParseRequest` branch alongside `StartupDetails`, so a bundle process serves either a task run or a parse request. - Fields Python resolves from `[core]` config rather than a JSON-schema default (`max_active_tasks_per_dag`, `max_active_runs_per_dag`) are always emitted, falling back to the same values. - Native Java tasks deliberately emit no `_arg_bindings`: the execution API delivers bindings only for Python `_StubOperator` tasks, and a Java task always runs inside the JVM bundle that already holds its wired inputs, so the runtime resolves them locally. ## What - Add `execution/Serde.kt` (`parseDags`, `serializeDag`, `serializeTask`, timetable/task-group/value serializers) with `SerdeTest` covering required fields, config emit rules, wiring-recorded edges, the `DagFileParsingResult` envelope, and temporal/nested-map encoding. - Wire the parse-request branch into `Server.dispatchTask`, covered by a new `ServerTest` case that drives a real `DagFileParseRequest` frame end to end. ## Known limitation Cron schedules map to `CronTriggerTimetable` only, mirroring the Go SDK until the supervisor forwards the `[scheduler]` timetable flags over the coordinator protocol. There is a `TODO` at the timetable serializer. --- ##### Was generative AI tooling used to co-author this PR? - [x] Yes, with help of Claude Code Opus 5 following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
