Commit Graph
55 Commits
Author SHA1 Message Date
Jason(Zhe-You) Liu 21bbf2f40a Java SDK: Generate Dag and task configuration from the serialization schema (#73595)
* Java SDK: Describe native Java Dags without reference to Python

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.

* Java SDK: Generate Dag and task configuration from the serialization 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.
2026-09-30 15:00:35 +08:00
Jarek Potiuk a72b73576f Drop stale entries from the Java SDK dependency trust list (#73792)
The regenerate-java-sdk-verification-metadata hook added in #71869 drops
checksums that no Java SDK build task resolves any more, but the trust
list on main still carried entries for versions superseded by earlier
dependency bumps. The hook therefore rewrites the file in every run, and
static checks fail on every PR regardless of what it touches.

Generated-by: Claude Opus 5
2026-09-27 16:20:48 +02:00
PoAn Yang 3e47fc3996 Catch stale entries in the Java SDK dependency trust list (#71869) 2026-09-27 13:00:47 +08:00
Jason(Zhe-You) LiuandTzu-ping Chung 77a1953cd4 Java SDK: Draw a Java-authored Dag's edges with before and after (#73594)
* Java SDK: Draw a Java-authored Dag's edges with before and after

A Dag authored in Java had no way to say what runs after what. Without a
Python Dag file to hold the graph, every task was a root, so a Dag that
Java owns end to end could not be expressed at all.

The verbs are before and after, matching the TypeScript SDK, and leaving
then free for the conditional control flow that reads as a then-branch.
They are the only way to draw an edge, so one graph has one spelling
however it was built.

* Add notes on delibrate implementation choices

---------

Co-authored-by: Tzu-ping Chung <tp@astronomer.io>
2026-09-26 20:39:34 +08:00
Jason(Zhe-You) Liu 9876a4b469 Java SDK: Honor TaskFlow arg bindings sent by the supervisor (#71188) 2026-09-25 13:27:58 +08:00
Jason(Zhe-You) Liu 9611649802 Add taskflow-binding capability to the Lang SDK compatibility matrix (#73314) 2026-09-18 18:31:17 +08:00
Jason(Zhe-You) Liu 1efcf23514 Add Java SDK interface-design ADRs for mixed-lang and native Dags (#72019) 2026-09-16 11:53:26 +08:00
PoAn Yang 2678bc8e3a Java SDK: Add setVariable and deleteVariable to the task Client (#72676)
* Java SDK: Add setVariable and deleteVariable to the task Client

Signed-off-by: PoAn Yang <payang@apache.org>

* Remove null description case

Signed-off-by: PoAn Yang <payang@apache.org>

---------

Signed-off-by: PoAn Yang <payang@apache.org>
2026-09-14 15:39:25 +08:00
dependabot[bot]andTzu-ping Chung b738c5aa3f Bump the java-sdk-dependency-updates group across 1 directory with 5 updates (#72527)
* Bump the java-sdk-dependency-updates group across 1 directory with 5 updates

Bumps the java-sdk-dependency-updates group with 4 updates in the /java-sdk directory: [com.github.spotbugs:spotbugs-annotations](https://github.com/spotbugs/spotbugs), [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core), [com.fasterxml.jackson.dataformat:jackson-dataformat-yaml](https://github.com/FasterXML/jackson-dataformats-text) and com.fasterxml.jackson.datatype:jackson-datatype-jsr310.


Updates `com.github.spotbugs:spotbugs-annotations` from 4.10.3 to 4.10.4
- [Release notes](https://github.com/spotbugs/spotbugs/releases)
- [Changelog](https://github.com/spotbugs/spotbugs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spotbugs/spotbugs/compare/4.10.3...4.10.4)

Updates `com.fasterxml.jackson.core:jackson-core` from 2.22.1 to 2.22.2
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.22.1...jackson-core-2.22.2)

Updates `com.fasterxml.jackson.core:jackson-databind` from 2.22.1 to 2.22.2
- [Commits](https://github.com/FasterXML/jackson-databind/compare/jackson-databind-2.22.1...jackson-databind-2.22.2)

Updates `com.fasterxml.jackson.dataformat:jackson-dataformat-yaml` from 2.22.1 to 2.22.2
- [Commits](https://github.com/FasterXML/jackson-dataformats-text/compare/jackson-dataformats-text-2.22.1...jackson-dataformats-text-2.22.2)

Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.22.1 to 2.22.2

---
updated-dependencies:
- dependency-name: com.github.spotbugs:spotbugs-annotations
  dependency-version: 4.10.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: java-sdk-dependency-updates
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-version: 2.22.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: java-sdk-dependency-updates
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-version: 2.22.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: java-sdk-dependency-updates
- dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml
  dependency-version: 2.22.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: java-sdk-dependency-updates
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
  dependency-version: 2.22.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: java-sdk-dependency-updates
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add Gradle dependency verification metadata for bumped java-sdk deps

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tzu-ping Chung <tp@astronomer.io>
2026-09-10 10:17:19 +02:00
PoAn Yang 20229e47c9 Java SDK: Clearer error when a task class cannot be instantiated (#69827)
Signed-off-by: PoAn Yang <payang@apache.org>
2026-08-24 23:58:53 +08:00
Jason(Zhe-You) Liu ebca0c8edc Java SDK: Register tasks as first-class TaskDef objects (#71057)
* Java SDK: Register tasks as first-class TaskDef objects

`dag.addTask("extract", Extract.class)` stored tasks as a plain
`Map<String, Class<out Task>>`, which leaves nowhere to hang anything
else a task needs: dependency edges, task-level configuration, and
argument wiring all have to attach to a per-task object, and a map of
classes cannot carry them. Introducing that object now keeps those
follow-ups additive instead of forcing another break of the registration
API later.

The annotation surface keeps `Builder.Dag` / `Builder.Task`, and the
interface users implement keeps the `Task` name, so the definition
objects are `DagDef` and `TaskDef` -- a pairing that stays unambiguous
next to `Task` at a use site. The SDK is pre-1.0, so the old
string-keyed overload is removed outright rather than deprecated.

The KubernetesExecutor lang-SDK example adopts the new names directly rather
than pinning to the old ones: CI now builds those artifacts from the branch
under test (#71527), so the example no longer has to compile against whatever
the SDK on main happens to expose.

* Java SDK: Clarify task ownership validation

* Java SDK: Simplify manual task registration

Manual interface-based bundles are authored directly by users, so requiring every call to wrap the task class in TaskDef adds noise to the common case while the SDK can retain first-class task definitions internally.
2026-08-21 15:00:41 +08:00
Tzu-ping Chung 474e5b598f Harden frame processing on large data (#69125) 2026-08-21 07:48:10 +08:00
Jason(Zhe-You) Liu b304b4522e Add Java SDK capability manifest and compatibility matrix (#71151)
* Add Java SDK capability manifest and compatibility matrix

The Language SDK conformance spec defines which TaskInstance states and
capabilities a Language SDK may declare, but nothing lets an SDK say what it
actually supports. Readers of the Java SDK docs cannot tell which parts of the
spec the runtime implements today — and the gaps are real and moving (native Dag
authoring, deferral, and the state stores are not there yet), so an unqualified
"see the conformance spec" overstates what a Java task can do.

The manifest is hand-authored YAML rather than something derived from the SDK's
own sources: it describes the SDK instead of being part of it, so it has no
business shipping in a user's runtime dependencies, and deriving it would mean a
JDK and a Gradle run in a hook that only ever renders a table. It therefore sits
above every subproject in settings.gradle.kts, where no source set can pick it
up. Validation carries the weight a compiler would have: unknown keys are
rejected along with missing ones, since it is the only thing standing between a
typo and a wrong published table.

A prek hook regenerates the contributor-facing README table and the Dokka module
doc from the manifest, so a capability landing in the runtime is a one-line edit
rather than three tables to update by hand. The shared schema, SDK registry, and
renderer let the Go and TypeScript SDKs declare theirs the same way.

* Keep Language SDK compatibility matrices accurate

Contradictory native-Dag declarations could pass validation while being rendered as not applicable. Published matrix tables also need to remain readable without forcing unrelated headers onto one line.
2026-08-20 15:10:20 +08:00
566e9f3c27 Bump Java SDK dependencies with Java 11 compatibility (#71670)
* Bump the java-sdk-dependency-updates group across 2 directories with 22 updates

Bumps the java-sdk-dependency-updates group with 15 updates in the /java-sdk directory:

| Package | From | To |
| --- | --- | --- |
| org.apache.logging.log4j:log4j-core | `2.26.0` | `2.26.1` |
| [com.gradleup.shadow:shadow-gradle-plugin](https://github.com/GradleUp/shadow) | `9.1.0` | `9.6.1` |
| [com.github.spotbugs:spotbugs-annotations](https://github.com/spotbugs/spotbugs) | `4.9.8` | `4.10.3` |
| [com.fasterxml.jackson.core:jackson-annotations](https://github.com/FasterXML/jackson) | `2.21` | `2.22` |
| [com.fasterxml.jackson.dataformat:jackson-dataformat-yaml](https://github.com/FasterXML/jackson-dataformats-text) | `2.21.0` | `2.22.1` |
| com.fasterxml.jackson.datatype:jackson-datatype-jsr310 | `2.21.0` | `2.22.1` |
| [io.ktor:ktor-network](https://github.com/ktorio/ktor) | `3.3.3` | `3.5.1` |
| [org.jetbrains.kotlinx:kotlinx-coroutines-core](https://github.com/Kotlin/kotlinx.coroutines) | `1.10.2` | `1.11.0` |
| [org.jetbrains.kotlinx:kotlinx-datetime](https://github.com/Kotlin/kotlinx-datetime) | `0.7.1` | `0.8.0` |
| [org.jetbrains.kotlinx:kotlinx-serialization-json](https://github.com/Kotlin/kotlinx.serialization) | `1.10.0` | `1.11.0` |
| [org.msgpack:msgpack-core](https://github.com/msgpack/msgpack-java) | `0.9.11` | `0.9.12` |
| org.jsonschema2pojo | `1.2.2` | `1.3.3` |
| [plugin.serialization](https://github.com/JetBrains/kotlin) | `2.3.0` | `2.4.10` |
| [org.jetbrains.kotlin:kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) | `2.3.0` | `2.4.10` |
| [gradle-wrapper](https://github.com/gradle/gradle) | `8.14.4` | `8.14.5` |

Bumps the java-sdk-dependency-updates group with 3 updates in the /java-sdk/scala_spark_example directory: [org.scala-lang:scala-library](https://github.com/scala/scala), org.apache.spark:spark-sql_2.13 and [org.apache.logging.log4j:log4j-bom](https://github.com/apache/logging-log4j2).

Updates `org.apache.logging.log4j:log4j-core` from 2.26.0 to 2.26.1

Updates `org.apache.logging.log4j:log4j-api` from 2.26.0 to 2.26.1

Updates `com.gradleup.shadow:shadow-gradle-plugin` from 9.1.0 to 9.6.1
- [Release notes](https://github.com/GradleUp/shadow/releases)
- [Commits](https://github.com/GradleUp/shadow/compare/9.1.0...9.6.1)

Updates `com.github.spotbugs:spotbugs-annotations` from 4.9.8 to 4.10.3
- [Release notes](https://github.com/spotbugs/spotbugs/releases)
- [Changelog](https://github.com/spotbugs/spotbugs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spotbugs/spotbugs/compare/4.9.8...4.10.3)

Updates `com.fasterxml.jackson.core:jackson-annotations` from 2.21 to 2.22
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `com.fasterxml.jackson.core:jackson-core` from 2.21.1 to 2.22.1
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.21.1...jackson-core-2.22.1)

Updates `com.fasterxml.jackson.core:jackson-databind` from 2.21.0 to 2.22.0
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `com.fasterxml.jackson.dataformat:jackson-dataformat-yaml` from 2.21.0 to 2.22.1
- [Commits](https://github.com/FasterXML/jackson-dataformats-text/compare/jackson-dataformats-text-2.21.0...jackson-dataformats-text-2.22.1)

Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.21.0 to 2.22.1

Updates `io.ktor:ktor-network` from 3.3.3 to 3.5.1
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/3.3.3...3.5.1)

Updates `org.jetbrains.kotlinx:kotlinx-coroutines-core` from 1.10.2 to 1.11.0
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.10.2...1.11.0)

Updates `org.jetbrains.kotlinx:kotlinx-datetime` from 0.7.1 to 0.8.0
- [Release notes](https://github.com/Kotlin/kotlinx-datetime/releases)
- [Changelog](https://github.com/Kotlin/kotlinx-datetime/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Kotlin/kotlinx-datetime/compare/v0.7.1...v0.8.0)

Updates `org.jetbrains.kotlinx:kotlinx-serialization-json` from 1.10.0 to 1.11.0
- [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Kotlin/kotlinx.serialization/compare/v1.10.0...v1.11.0)

Updates `org.msgpack:msgpack-core` from 0.9.11 to 0.9.12
- [Release notes](https://github.com/msgpack/msgpack-java/releases)
- [Changelog](https://github.com/msgpack/msgpack-java/blob/main/RELEASE_NOTES.md)
- [Commits](https://github.com/msgpack/msgpack-java/compare/v0.9.11...v0.9.12)

Updates `org.msgpack:jackson-dataformat-msgpack` from 0.9.11 to 0.9.12
- [Release notes](https://github.com/msgpack/msgpack-java/releases)
- [Changelog](https://github.com/msgpack/msgpack-java/blob/main/RELEASE_NOTES.md)
- [Commits](https://github.com/msgpack/msgpack-java/compare/v0.9.11...v0.9.12)

Updates `org.jsonschema2pojo` from 1.2.2 to 1.3.3

Updates `plugin.serialization` from 2.3.0 to 2.4.10
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.3.0...v2.4.10)

Updates `org.jetbrains.kotlin:kotlin-gradle-plugin` from 2.3.0 to 2.4.10
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.3.0...v2.4.10)

Updates `gradle-wrapper` from 8.14.4 to 8.14.5
- [Release notes](https://github.com/gradle/gradle/releases)
- [Commits](https://github.com/gradle/gradle/compare/v8.14.4...v8.14.5)

Updates `org.scala-lang:scala-library` from 2.13.8 to 2.13.18
- [Release notes](https://github.com/scala/scala/releases)
- [Commits](https://github.com/scala/scala/compare/v2.13.8...v2.13.18)

Updates `org.apache.spark:spark-sql_2.13` from 3.5.8 to 3.5.9

Updates `org.apache.logging.log4j:log4j-bom` from 2.26.0 to 2.26.1
- [Release notes](https://github.com/apache/logging-log4j2/releases)
- [Changelog](https://github.com/apache/logging-log4j2/blob/2.x/RELEASE-NOTES.adoc)
- [Commits](https://github.com/apache/logging-log4j2/compare/rel/2.26.0...rel/2.26.1)

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-version: 2.26.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: java-sdk-dependency-updates
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-version: 2.26.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: java-sdk-dependency-updates
- dependency-name: com.gradleup.shadow:shadow-gradle-plugin
  dependency-version: 9.6.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: java-sdk-dependency-updates
- dependency-name: com.github.spotbugs:spotbugs-annotations
  dependency-version: 4.10.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: java-sdk-dependency-updates
- dependency-name: com.fasterxml.jackson.core:jackson-annotations
  dependency-version: '2.22'
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: java-sdk-dependency-updates
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-version: 2.22.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: java-sdk-dependency-updates
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-version: 2.22.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: java-sdk-dependency-updates
- dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml
  dependency-version: 2.22.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: java-sdk-dependency-updates
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
  dependency-version: 2.22.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: java-sdk-dependency-updates
- dependency-name: io.ktor:ktor-network
  dependency-version: 3.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: java-sdk-dependency-updates
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core
  dependency-version: 1.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: java-sdk-dependency-updates
- dependency-name: org.jetbrains.kotlinx:kotlinx-datetime
  dependency-version: 0.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: java-sdk-dependency-updates
- dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-json
  dependency-version: 1.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: java-sdk-dependency-updates
- dependency-name: org.msgpack:msgpack-core
  dependency-version: 0.9.12
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: java-sdk-dependency-updates
- dependency-name: org.msgpack:jackson-dataformat-msgpack
  dependency-version: 0.9.12
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: java-sdk-dependency-updates
- dependency-name: org.jsonschema2pojo
  dependency-version: 1.3.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: java-sdk-dependency-updates
- dependency-name: plugin.serialization
  dependency-version: 2.4.10
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: java-sdk-dependency-updates
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-version: 2.4.10
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: java-sdk-dependency-updates
- dependency-name: gradle-wrapper
  dependency-version: 8.14.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: java-sdk-dependency-updates
- dependency-name: org.scala-lang:scala-library
  dependency-version: 2.13.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: java-sdk-dependency-updates
- dependency-name: org.apache.spark:spark-sql_2.13
  dependency-version: 3.5.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: java-sdk-dependency-updates
- dependency-name: org.apache.logging.log4j:log4j-bom
  dependency-version: 2.26.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: java-sdk-dependency-updates
...

Signed-off-by: dependabot[bot] <support@github.com>

* Keep shadow-gradle-plugin on 9.1.0 and refresh dependency verification metadata

shadow-gradle-plugin 9.6.1 declares org.gradle.plugin.api-version 9.2.0 and
Java 17 compatibility, but the java-sdk plugin project compiles against Java 11
on Gradle 8.14.5, so resolution fails outright. 9.1.0 is the last release that
supports Java 11, which is what the pin's comment already recorded.

Gradle strict verification rejects any artifact absent from
verification-metadata.xml, and the remaining bumps in this group resolve
artifacts the committed file does not describe.

* Store gradlew.bat with LF endings as .gitattributes requires

The regenerated wrapper landed in the repository with CRLF bytes, but
java-sdk/.gitattributes marks *.bat as 'text eol=crlf', meaning LF in the
object store and CRLF on checkout. The mismatch left the file permanently
dirty in every working tree and blocked rebases. Windows checkouts still
get CRLF.

* Keep Java SDK dependency updates compatible with Java 11

Keep jsonschema2pojo and Shadow at versions that load on Java 11. Use published Jackson coordinates, align dependency submission on Gradle 8.14.5, and regenerate verification metadata from the resolved graph.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2026-08-17 09:48:52 +08:00
dependabot[bot] ff48a4381a Bump the java-sdk-security-updates group across 1 directory with 3 updates (#71602)
Bumps the java-sdk-security-updates group with 2 updates in the /java-sdk directory: [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core) and [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson).


Updates `org.apache.logging.log4j:log4j-api` from 2.26.0 to 2.26.1

Updates `com.fasterxml.jackson.core:jackson-core` from 2.21.1 to 2.21.4
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.21.1...jackson-core-2.21.4)

Updates `com.fasterxml.jackson.core:jackson-databind` from 2.21.0 to 2.21.5
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-version: 2.26.1
  dependency-type: direct:production
  dependency-group: java-sdk-security-updates
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-version: 2.21.4
  dependency-type: direct:production
  dependency-group: java-sdk-security-updates
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-version: 2.21.5
  dependency-type: direct:production
  dependency-group: java-sdk-security-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-14 17:31:38 +02:00
Jason(Zhe-You) Liu 956b7f866a Verify Java SDK build dependencies (#71400)
The Java SDK build trusted whatever its configured repositories returned, so a
replaced or shadowed artifact could execute during a build -- including in the
buildSrc code that configures every published module -- without anything
failing. Pinning checksums turns that substitution into a build error, and
declaring repositories in one place gives reviewers a single spot to audit
where bytes may come from.

Checksums alone are trust-on-first-use: they prove an artifact has not changed
since it was recorded, not that it was ever trustworthy. The README therefore
documents the independent cross-check required when regenerating the metadata,
and names the inputs this deliberately does not cover -- the auto-provisioned
JDK toolchain and the downloaded Supervisor Schema -- so the guarantee is not
read as broader than it is.
2026-08-11 17:39:48 +08:00
PoAn Yang abd837a382 Java SDK: Change coordinator comm to use multiplexing (#69254)
Serializing each client's whole send → receive → deserialize round trip
behind one lock (#69080) allows only a single request in flight at a
time, so a task issuing concurrent calls over the shared comm socket
pays a full, serialized round trip per call.
Every frame already carries a request id, so a single background
dispatcher can read the socket and route each response by id, with the
lock guarding only the write.

Signed-off-by: PoAn Yang <payang@apache.org>
2026-07-30 13:54:30 +08:00
Jason(Zhe-You) Liu 38d94ba818 Move Lang-SDK ADRs from java-sdk/adr to airflow-core/adr/lang-sdk (#70156)
* Move Lang-SDK ADRs from java-sdk/adr to airflow-core/adr/lang-sdk

* Unwrap ADR list line breaks in Lang-SDK ADR index

Manual line wrapping in the bullet list made the rendered Markdown
harder to scan; one line per entry reads better.
2026-07-22 22:04:17 +08:00
Jason(Zhe-You) Liu ad3244c1f2 Add ADR-0006: no Lang-SDK source display for mixed-language (@task.stub) Dag (#70059)
* Add ADR-0006: no Lang-SDK source display for stub DAGs

* Drop the per-Dag source slicing argument from ADR-0006

That point argued against per-Dag filtering of the source view, but that
shape is essentially the upcoming per-file get_source_code on the AIP-85
DagImporter interface, so it is not a reason for this decision and would
read as pre-judging that work.
2026-07-20 23:20:40 +08:00
PoAn Yang 41ed94591e Java SDK: Throw MissingXComException instead of NPE for absent XComs (#69257)
Signed-off-by: PoAn Yang <payang@apache.org>
2026-07-18 20:05:29 +08:00
PoAn Yang fe9d8650ef Add Dag run context fields to the Java SDK Context (#69100) 2026-07-17 11:03:17 +08:00
Andrew Chang a52424284b Add build toolchain reference to Java SDK README (#69670) 2026-07-12 18:22:32 +09:00
Tzu-ping Chung da4643cce3 Mention min Java version in Java SDK README (#69691) 2026-07-10 16:26:57 +09:00
Tzu-ping Chung 9f3e12e9d5 Tidy up post-release instructions (#69686) 2026-07-10 13:53:46 +08:00
Tzu-ping Chung b0300009a4 Verify Java SDK artifact integrity continuously (#69643) 2026-07-09 20:38:00 +08:00
Tzu-ping Chung fa8c4ff841 Add post-vote step to do a GitHub Release (#69647) 2026-07-09 20:37:42 +08:00
Tzu-ping Chung 889b28b5f4 Fix false positive in verification step (#69648) 2026-07-09 15:56:58 +08:00
Tzu-ping Chung 1494cdfd72 Add back explicit dependencies to ktlint (#69637) 2026-07-09 14:09:14 +08:00
Tzu-ping Chung f0953fb1b1 Fix more Java SDK build edge cases (#69628) 2026-07-09 11:12:18 +08:00
Jason(Zhe-You) LiuandTP 162952b3d3 Fix Java SDK RC2 blockers: source packaging, jar LICENSE/NOTICE, BOM gap (#69582)
* Exclude the full Gradle wrapper from the Java SDK source release

Only gradle-wrapper.jar was excluded from the sourceRelease tarball
(LEGAL-570), but gradlew, gradlew.bat, and gradle-wrapper.properties
still shipped, drawing a binding -1 in the 1.0.0-beta1 RC2 vote. The
wrapper stays tracked in git; only the git-archive output used by
sourceRelease now omits it. Document both ways to build an extracted
source package without the wrapper, add a release-verification
checklist, and add a vote-email template with the full 8-artifact
staged list so future RCs don't repeat the RC2 feedback.

* Add LICENSE/NOTICE and reproducible archives to Java SDK jars

Staged convenience-binary jars (main, sources, javadoc, test-fixtures)
were missing META-INF/LICENSE and META-INF/NOTICE, violating ASF
release policy for distributed binaries. Builds were also not
byte-reproducible: jar entries carried wall-clock timestamps, blocking
GitHub-driven publishing. Centralizing both fixes in the
airflow-jvm-conventions plugin, applied by every jar-producing module
(sdk, jul, log4j2, slf4j, jpl, processor, plugin), covers all modules
without per-module duplication.

* Manage airflow-sdk-jpl version in the Java SDK BOM

The BOM constrained sdk, jul, log4j2, processor, and slf4j but not
jpl, even though jpl is published to Nexus and the bundled example
module depends on it. Consumers pulling in jpl via the BOM alone had
no version constraint to resolve against.

* Manage airflow-sdk-gradle-plugin version in the Java SDK BOM

airflow-sdk-gradle-plugin publishes under the same org.apache.airflow
Maven coordinate convention as the other SDK artifacts, but was left
out of the BOM's constraints when airflow-sdk-jpl was added — the same
gap the jpl fix was closing. Consumers importing airflow-sdk-bom still
got no version pin for the plugin artifact.

* Use rc<N> placeholder in Java SDK release verification clone example

* Keep wrapper properties in the archive

* Add verification in BOM to not miss subprojects

* Touch up on Java SDK verification process

---------

Co-authored-by: TP <uranusjr@apache.org>
2026-07-08 21:54:45 +09:00
Tzu-ping Chung 4e4c69aab7 Additional setup for Java SDK release (#69444) 2026-07-07 23:46:00 +08:00
Tzu-ping Chung 9ec780dbc8 Sync supervisor schema with remote source-of-truth (#69527) 2026-07-07 23:45:46 +08:00
PoAn Yang fa9e5c7aac Fix Java SDK numeric XCom casting and remove unused XCom key field (#68983)
* Fix Java SDK numeric XCom casting

Generate accessors that widen through Number instead: primitive params use
((Number) x).intValue(), and boxed params use Optional.ofNullable(...).orElse(null)
so an absent XCom stays null. Add a java_xcom_casting_example DAG and processor
tests covering int->long->double widening and an absent boxed value.

Signed-off-by: PoAn Yang <payang@apache.org>

* Remove unused key field from Java SDK Builder.XCom annotation

Signed-off-by: PoAn Yang <payang@apache.org>

* Add float cross-type coverage to Java SDK XCom casting tests

Signed-off-by: PoAn Yang <payang@apache.org>

* Remove unused comment

Signed-off-by: PoAn Yang <payang@apache.org>

---------

Signed-off-by: PoAn Yang <payang@apache.org>
2026-07-02 14:34:19 +09:00
PoAn Yang 687134f380 Java SDK: Serialize coordinator client send/receive for thread safety (#69080)
* Java SDK: Serialize coordinator client send/receive for thread safety

A Java task may call the SDK client from multiple threads. Every call goes through
one request/response channel to the supervisor. So it must be thread safe.

Signed-off-by: PoAn Yang <payang@apache.org>

* Move requestId outside the lock

Signed-off-by: PoAn Yang <payang@apache.org>

---------

Signed-off-by: PoAn Yang <payang@apache.org>
2026-07-01 19:14:46 +09:00
Jason(Zhe-You) Liu d0b456cdf9 Add Scala Spark ETL example to Java-SDK e2e tests (#68939)
* Add Scala Spark ETL example bundle to the Java SDK e2e tests

## Why

Demonstrate and regression-test that the Java SDK can run a real Scala +
Apache Spark workload, with task logs routed into Airflow via Log4j 2.

## What

- Add `java-sdk/scala_spark_example`: a standalone Scala + Spark 3.5 (local
  mode) ETL bundle whose three tasks pass scalar results over XCom and log
  through Log4j 2 (`airflow-sdk-log4j2`).
- Run it inside the existing `java_sdk` e2e via a second coordinator and queue
  (`scala-jdk` / `scala`) with its own `jars_root`, keeping the Java example
  bundle Spark-free.
- Pin the e2e worker JRE to Java 17 and pass Spark's `--add-opens` JVM args.
- Add `TestJavaSDKScalaSparkExample` asserting the tasks succeed and the XComs
  match the fixed dataset (5 rows, total revenue 1000).

* Avoid copying jars for docker build

* Verify the Scala Spark transform stage in the Java-SDK e2e test

The e2e test asserted only the extract and load XComs, so the aggregation
stage in the middle of the pipeline could regress without the test noticing.
Assert its XCom as well, drop the unused dataset constants, and note why the
transform reads the upstream count it does not reuse.

* Carry Spark's full Java 17 module options in the Scala Spark e2e test

The Scala Spark coordinator launched the bundle JVM with a hand-curated
subset of Spark's Java 17 module openings. Spark normally injects its full
default set through its own launcher, which the raw JavaCoordinator launch
bypasses. The subset is enough for the toy aggregation but omits openings
that real Spark code paths need (Kryo reflection, off-heap cleaner, charset
decoding, Kerberos), so the example would mislead anyone copying it for a
non-trivial Spark workload. Mirror Spark 3.5.8's full default module option
set instead.

* Standardize Scala Spark example layout and document Spark JVM options

Review feedback on the Scala Spark e2e example asked to make the bundle
source layout consistent -- it mixed the Maven-standard src/main/resources
with flat src/scala and src/resources -- so the whole tree now follows the
standard src/main/{scala,resources} convention. It also asked that the JDK
module options Spark needs under the Java SDK be documented where users can
find them, not only buried in the e2e test, and that comments restating the
code be trimmed.
2026-07-01 17:39:42 +09:00
PoAn Yang 4b25735cfc Java SDK: Catch Throwable so task Errors are logged and fail cleanly (#68988) 2026-06-27 12:13:45 +09:00
Jason(Zhe-You) Liu 275730a9cf Java-SDK: replace AirflowJulHandler.install() with setup() (#68986)
* Java SDK: replace AirflowJulHandler.install() with setup()

install() only added the handler and left JUL's default ConsoleHandler in
place, so every task log record was also written to stderr, which Airflow
captures as task.stderr at ERROR level: each line appeared twice and INFO
records were mislabeled as errors. setup() clears the root logger's handlers
before installing AirflowJulHandler so records flow only through Airflow.
Renamed per review feedback on #68938; the SDK is experimental, so no
deprecation path is needed.

* Java SDK: let AirflowJulHandler.setup() keep existing root handlers

Clearing every root handler is the right default, but it forecloses setups
where a user has intentionally attached their own handler (for example a
FileHandler that mirrors logs to disk) that does not conflict with Airflow's
task-log and task.stderr capture. Raised in review on #68986. A clean=true
default preserves the de-duplicating behaviour while clean=false adds the
AirflowJulHandler alongside the existing handlers. Both paths stay idempotent
so repeated calls never install more than one AirflowJulHandler.
2026-06-26 11:58:51 +09:00
Tzu-ping Chung 9dcbe41dd4 Remove stray instruction on example (#68841) 2026-06-23 04:52:03 +08:00
Tzu-ping Chung f24c5b0bc7 Implement SLF4Jm JUL, and Log4J2 providers for Java SDK (#68725) 2026-06-22 20:02:49 +08:00
Tzu-ping Chung a527de7aba Agent skills for Java SDK and new language SDK (#68603) 2026-06-22 15:08:20 +08:00
Tzu-ping Chung 92a2b0d724 Some more notes for Java SDK publishing (#68440) 2026-06-16 14:43:30 +08:00
07a7a5297d Java-SDK: support UP_FOR_RETRY in coordinator mode with e2e coverage (#68555)
* Fix Java SDK not retrying failed tasks

* Verify Java SDK UP_FOR_RETRY end-to-end in e2e bundle

Make the Java example bundle's 'load' task fail on its first attempt and
succeed on the retry (retries=1), wire it into the annotation example Dag,
and assert end-to-end that the task passes through UP_FOR_RETRY and ends
success on try_number 2. This exercises the RetryTask path the Java
coordinator now returns.

* Add RetryTask reference in contributing-docs/30_new_language_sdk.rst

* Split load and python_task_2 dep syntax

* Simplify failed-or-retry conditional

* Fix CI error

---------

Co-authored-by: Arnav <a.purohit1903@gmail.com>
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2026-06-16 07:42:46 +08:00
Tzu-ping Chung 2d1aaab9ec Use pre-commit hook to keep Java versions in sync (#68448) 2026-06-13 04:39:10 +08:00
Tzu-ping Chung 390fc454bb Java gradle plugin and project split (#68380) 2026-06-12 17:26:52 +08:00
Jason(Zhe-You) Liu 36c439c39c Fix Java-SDK connection port casting (#68433) 2026-06-12 16:20:54 +08:00
Kaxil Naik 872427c253 Version the worker-bound TaskInstance fields in the execution API schema (#68390)
The supervisor's task routing (added in #65958) reads queue, pool_slots and
priority_weight from the TaskInstance it receives, but those fields lived in
a TaskInstanceDTO duplicated between airflow-core and task-sdk and kept in
sync by an AST-comparison prek hook, outside the versioned execution API
schema the Task SDK datamodels are generated from.

Add the three fields to the execution API TaskInstance schema (with a Cadwyn
version change) and regenerate the SDK datamodels, so the generated
TaskInstance carries everything the supervisor needs. Re-point StartupDetails
and the coordinator interfaces at the generated model, fold the core
TaskInstanceDTO into a subclass of the schema model that only adds the
executor-side fields, and drop the duplicated task-sdk DTO and the sync hook.

The unused parent_context_carrier field (no readers or writers) is removed.

* Keep pool_slots and priority_weight executor-side; only queue joins the schema

The supervisor only routes on queue; pool_slots and priority_weight are
executor concerns (queued-workload priority ordering and edge concurrency
slot accounting) that the worker never reads. Keep them on the executor
DTO, serialized as before, and add only queue to the worker-facing schema.

The generated TaskInstance no longer accepts pool_slots/priority_weight
kwargs, its queue is Optional in the generated typing, and the DTO now
validates the inherited hostname field that the ECS adoption test's mock
did not set.
2026-06-11 19:39:21 +01:00
Tzu-ping Chung 9c5843e7a2 Harden Java process exit (#68216) 2026-06-08 19:22:58 +08:00
Tzu-ping Chung 82d157698b Bump to snapshot for release (#68205)
* Bump to snapshot for release

* Fix spotless errors

* Fix cred logic
2026-06-08 18:33:18 +08:00
Tzu-ping Chung 2b1ada2369 Run spotless against Java files in static checks (#68211) 2026-06-08 18:32:59 +08:00
Tzu-ping Chung 2e16d6542e Fix cred configs in publish workflow (#68073) 2026-06-08 14:22:43 +08:00