jason810496 opened a new pull request, #75942:
URL: https://github.com/apache/airflow/pull/75942

   The Java SDK vendors the supervisor schema so it builds from a source 
distribution with no
   network. That copy was kept fresh by downloading the version named in
   `java-sdk/gradle.properties` from the staged docs site, which has two 
problems:
   
   - **An in-progress version cannot be fetched.** The site only publishes 
released versions, so
     the first PR after a release that opens a new supervisor schema version 
cannot sync the Java
     copy at all; the download 404s.
   - **A change that leaves `api_version` alone never reaches the copy.** Both 
the Gradle task and
     the prek hook compared versions, not content, so the vendored schema 
silently fell behind.
     It is 857 lines behind today.
   
   The copy is now taken from the schema the Python Task SDK owns and compared 
by content, the way
   `sync-go-sdk-schemas` already does for the Go SDK, so any change to the 
source moves it in the
   same commit. `airflowSupervisorSchemaVersion` stays the declared version and 
is asserted against
   the source rather than used to fetch it:
   
   ```console
   $ ./scripts/ci/prek/sync_java_sdk_supervisor_schema.py
   Refreshed java-sdk/sdk/schema/schema.json from 
task-sdk/src/airflow/sdk/execution_time/schema/schema.json.
   Review the diff, then git add it and recommit.
   ```
   
   The hook now also runs when the Python schema changes, not only when the 
Java side does.
   
   The download stays as the fallback for a build with no monorepo around it, 
which is what the
   source distribution needs, so `:sdk:syncSupervisorSchema` still works 
standalone.
   
   ### Scope
   
   The 857-line change to `java-sdk/sdk/schema/schema.json` is the content the 
copy never received.
   `api_version` is unchanged at `2026-10-30`.
   
   ### Tests
   
   `scripts/tests/ci/prek/test_sync_java_sdk_supervisor_schema.py` covers the 
copy, the
   content-drift case the old hook missed, a missing copy, a declared version 
the schema disagrees
   with, an unreadable source, and the fallback. `:sdk:syncSupervisorSchema` 
was run against both a
   copy in step and a drifted one.
   


-- 
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]

Reply via email to