From 5439491c1c59321480fb56708dadb57edc6221bc Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Mon, 5 May 2025 11:59:24 -0400 Subject: [PATCH 1/3] fix: include gax testlib for native image testing gax-java [contains native-image configurations](https://github.com/googleapis/sdk-platform-java/blob/main/gax-java/gax/src/test/resources/META-INF/native-image/com.google.api/gax/native-image.properties) that are common to all libraries. This fixes the ongoing nightly failures with messages such as: ``` 1) If it is intended that objects of type 'jdk.proxy4.$Proxy68' are persisted in the image heap, add '--initialize-at-build-time=org.junit.Ignore,java.lang.annotation.Annotation' ``` and ``` 1) If it is intended that objects of type 'org.junit.runners.model.FrameworkField' are persisted in the image heap, add '--initialize-at-build-time=org.junit.runners.model.FrameworkField' ``` The gax testlib [includes these classes](https://github.com/googleapis/sdk-platform-java/blob/main/gax-java/gax/src/test/resources/META-INF/native-image/com.google.api/gax/native-image.properties): ``` Args=--initialize-at-build-time=java.lang.annotation.Annotation,\ org.junit.experimental.categories.Category,\ org.junit.experimental.categories.CategoryValidator,\ org.junit.Ignore,\ org.junit.runner.RunWith,\ org.junit.runners.model.FrameworkField,\ org.junit.validator.AnnotationValidator,\ org.junit.vintage.engine.discovery.FilterableIgnoringRunnerDecorator,\ org.junit.vintage.engine.discovery.IgnoringRunnerDecorator ``` --- google-cloud-jar-parent/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/google-cloud-jar-parent/pom.xml b/google-cloud-jar-parent/pom.xml index 541deac9b2d8..bc3d6d6b7634 100644 --- a/google-cloud-jar-parent/pom.xml +++ b/google-cloud-jar-parent/pom.xml @@ -70,6 +70,12 @@ + + com.google.api + gax + testlib + test + junit junit From 9a66e4a7aa66b8e128e9bc7f80484f56e5fbb0c4 Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Mon, 5 May 2025 12:16:33 -0400 Subject: [PATCH 2/3] fix: include gax testlib in specific poms --- google-cloud-jar-parent/pom.xml | 6 ------ java-dns/pom.xml | 6 ++++++ java-notification/pom.xml | 6 ++++++ java-recommender/google-cloud-recommender/pom.xml | 6 ++++++ java-samples/native-image-sample/pom.xml | 6 ++++++ java-speech/google-cloud-speech/pom.xml | 6 ++++++ 6 files changed, 30 insertions(+), 6 deletions(-) diff --git a/google-cloud-jar-parent/pom.xml b/google-cloud-jar-parent/pom.xml index bc3d6d6b7634..541deac9b2d8 100644 --- a/google-cloud-jar-parent/pom.xml +++ b/google-cloud-jar-parent/pom.xml @@ -70,12 +70,6 @@ - - com.google.api - gax - testlib - test - junit junit diff --git a/java-dns/pom.xml b/java-dns/pom.xml index c8746a6fbbbd..f4d03f5940af 100644 --- a/java-dns/pom.xml +++ b/java-dns/pom.xml @@ -75,6 +75,12 @@ threetenbp + + com.google.api + gax + testlib + test + com.google.cloud google-cloud-core diff --git a/java-notification/pom.xml b/java-notification/pom.xml index cacb633175d7..ad2bac0ad743 100644 --- a/java-notification/pom.xml +++ b/java-notification/pom.xml @@ -68,6 +68,12 @@ + + com.google.api + gax + testlib + test + junit junit diff --git a/java-recommender/google-cloud-recommender/pom.xml b/java-recommender/google-cloud-recommender/pom.xml index b4ef69816662..998881fc5c89 100644 --- a/java-recommender/google-cloud-recommender/pom.xml +++ b/java-recommender/google-cloud-recommender/pom.xml @@ -78,6 +78,12 @@ + + com.google.api + gax + testlib + test + junit junit diff --git a/java-samples/native-image-sample/pom.xml b/java-samples/native-image-sample/pom.xml index c934d61ab44c..4b879c21d680 100644 --- a/java-samples/native-image-sample/pom.xml +++ b/java-samples/native-image-sample/pom.xml @@ -34,6 +34,12 @@ com.google.cloud google-cloud-secretmanager + + com.google.api + gax + testlib + test + diff --git a/java-speech/google-cloud-speech/pom.xml b/java-speech/google-cloud-speech/pom.xml index 07e13900a259..63afa1a3d05a 100644 --- a/java-speech/google-cloud-speech/pom.xml +++ b/java-speech/google-cloud-speech/pom.xml @@ -76,6 +76,12 @@ + + com.google.api + gax + testlib + test + junit junit From 0649c9efb3ff84f3dfefab3ef43958022058b430 Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Mon, 5 May 2025 12:22:38 -0400 Subject: [PATCH 3/3] chore: run lint job on java 17 This matches the minimum supported java version by the spotify fmt plugin --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 941ff454a39c..9cdc8a6bddf0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -71,7 +71,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: temurin - java-version: 11 + java-version: 17 - run: java -version - uses: actions/cache@v4 id: mvn-cache