Open mpeddada1 opened 2 months ago
In JDK 21, ITHttpAnnotation
fails with:
[ERROR] Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.460 s <<< FAILURE! -- in com.google.showcase.v1beta1.it.ITHttpAnnotation
Step #1: [ERROR] com.google.showcase.v1beta1.it.ITHttpAnnotation.testComplianceGroup[Compliance Group Name: Fully working conversions, no resources] -- Time elapsed: 0.031 s <<< ERROR!
Step #1: com.google.api.gax.rpc.InvalidArgumentException: Bad Request
Step #1: at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:52)
Step #1: at com.google.api.gax.httpjson.HttpJsonApiExceptionFactory.createApiException(HttpJsonApiExceptionFactory.java:76)
Step #1: at com.google.api.gax.httpjson.HttpJsonApiExceptionFactory.create(HttpJsonApiExceptionFactory.java:54)
Step #1: at com.google.api.gax.httpjson.HttpJsonExceptionCallable$ExceptionTransformingFuture.onFailure(HttpJsonExceptionCallable.java:97)
. . .
Step #1: Caused by: com.google.api.client.http.HttpResponseException: 400 Bad Request
Step #1: POST http://localhost:7469/v1beta1/repeat:body
Step #1: {"error":{"code":400,"message":"error reading body params '*': proto: syntax error (line 1:513): invalid value \u0000","details":null,"Body":"","Header":null,"Errors":null}}
Step #1: at com.google.api.client.http.HttpResponseException$Builder.build(HttpResponseException.java:293)
Step #1: at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1118)
Step #1: at com.google.api.gax.httpjson.HttpRequestRunnable.run(HttpRequestRunnable.java:115)
Step #1: ... 6 more
However, the same test passes in JDK 11.
Running the same test multiple times locally on JDK 21 shows this test to failing 15/20 times
Created issue to track ITHttpAnnotation failure in https://github.com/googleapis/sdk-platform-java/issues/2695
downstream / dependencies (11, java-spanner)
is resulting in:
[INFO] --- maven-dependency-plugin:3.5.0:analyze (default-cli) @ google-cloud-spanner ---
Error: Used undeclared dependencies found:
Error: org.graalvm.sdk:nativeimage:jar:24.0.1:provided
According to the graal/sdk CHANGELOG, the GraalVM SDK was split into smaller modules and the use of graal-sdk is deprecated. The new maven configuration to customize native image generation is:
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>nativeimage</artifactId>
<version>${graalvm.version}</version>
</dependency>
java-spanner's pom needs to be updated to ignore the provided org.graalvm.sdk:nativeimage
dependency: https://github.com/googleapis/java-spanner/blob/206534cb410c2ba2f4099a4fb5fb414e05ba07a4/google-cloud-spanner/pom.xml#L153
Do not merge until https://github.com/googleapis/sdk-platform-java/issues/2695 is resolved
Also verified locally with java-kms (logs).
Noting two significant changes in PR:
ITHttpAnnotation
test is marked as skipped in the showcase downstream check until https://github.com/googleapis/sdk-platform-java/issues/2695 is fixed.org.graalvm.sdk:nativeimage
being unaccounted for in theignoredDependencies
section of java-spanner'smaven-dependency-plugin
. We plan temporarily mark this check as optional to proceed with the update and includeorg.graalvm.sdk:nativeimage
in the maven-dependency-plugin oncesdk-platform-java-config
has been updated in the repo. See https://github.com/googleapis/java-shared-config/pull/815#issuecomment-2086565890 for context.