sangkyoonnam opened a new pull request, #1295:
URL: https://github.com/apache/flink-agents/pull/1295

   Linked issue: #1292
   
   ### Purpose of change
   
   As discussed in #1292, the release artifacts are built with JDK 21 so they 
contain the JDK 21 `ContinuationActionExecutor` and `ContinuationContext`, and 
the base classes keep their current bytecode targets.
   
   - `deploy_staging_jars.sh` requires JDK 21 instead of 17, and 
`create_binary_release.sh`, which builds the distribution JARs, gets the same 
check.
   - #413 pinned JDK 17 because `integrations/mcp` targets Java 17; the JDK 21 
build still compiles it to Java 17 bytecode, the same as a JDK 17 build.
   - The thin JARs of all five distributions also include 
`META-INF/versions/*/org/apache/flink/agents/**`, and the common JAR excludes 
it. Both variants now live in the thin JAR, so selection no longer depends on 
JAR order.
   
   ### Tests
   
   Runtime runs used macOS arm64 and Flink 2.3.0, with 
`--add-exports=java.base/jdk.internal.vm=ALL-UNNAMED` on JDK 21. The Java job 
reused one JDK 21-built artifact set on every JDK without rebuilding, and the 
Python job reused one wheel.
   
   - Packaging: in the JDK 21 build, the `api`, `plan` and base `runtime` 
classes are Java 11 bytecode, and only the two `META-INF/versions/21` classes 
are Java 21. Each thin and full distribution JAR has both variants and 
`Multi-Release: true`; the common JAR has neither.
   - Release scripts: both reject JDK 17. On JDK 21, `deploy_staging_jars.sh` 
with `deploy` replaced by `install` and `-Dgpg.skip` builds with 
`-Prelease,docs-and-source`, including sources and Javadoc. 
`create_binary_release.sh` with `SKIP_GPG=true` produces the five distribution 
JARs (`Build-Jdk-Spec: 21`) and the Python sdist.
   - Java job, with the full distribution JAR, common then thin, and thin then 
common in `lib`: on JDK 11 and 17 it loads the base executor, skips the chat 
call because continuation is unsupported there, and finishes; on JDK 21 it 
loads `META-INF/versions/21/.../ContinuationActionExecutor.class` from the full 
or thin JAR and finishes a `ctx.chat(...).await()` call.
   - Python job: a wheel built from that sdist, with its JARs downloaded 
through `FLINK_AGENTS_MAVEN_MIRROR` from the locally installed staging 
artifacts and matching them by SHA-256, has both variants in each thin JAR. A 
Python agent job with no dist JAR in `lib` finishes on JDK 17 and 21, and only 
the JDK 21 run logs the JDK 21 executor's thread-pool initialization.
   
   I haven't run the actual staging deploy or tested Linux or other Flink 
versions. The second phase of `deploy_staging_jars.sh` still passes 
`-Pjava-11-target`, which no longer exists, so Maven warns and reruns the `api` 
lifecycle without producing a `jdk11` classifier; this PR leaves that unchanged.
   
   ### API
   
   No.
   
   ### Documentation
   
   - [ ] `doc-needed`
   - [x] `doc-not-needed`
   - [ ] `doc-included`
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   - [x] Yes
   - [ ] No
   
   Generated-by: Claude Code 2.1.303 (Claude Opus 5.5)
   


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