From 8ce670a487a192807ccfd58613fc271d9402ca7c Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Tue, 25 Oct 2022 16:04:14 -0400 Subject: [PATCH] fix(java): restore native image configurations (#1844) This configuration was added in https://togithub.com/googleapis/java-bigquerystorage/pull/1488 but was removed by owlbot in https://togithub.com/googleapis/java-bigquerystorage/pull/1543. The build script changes were excluded from https://togithub.com/googleapis/java-bigquerystorage/pull/1362 so this missing configuration was only caught through manual testing by running `mvn test -Pnative`. This PR restores both changes. --- .github/.OwlBot.yaml | 1 + .kokoro/build.sh | 10 ++++++++++ .../google-cloud-bigquerystorage/reflect-config.json | 7 +++++++ 3 files changed, 18 insertions(+) create mode 100644 google-cloud-bigquerystorage/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-bigquerystorage/reflect-config.json diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index dbe80cd9e4..2c9814a26a 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -83,6 +83,7 @@ deep-preserve-regex: - "/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/Exceptions.java" - "/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorker.java" - "/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPool.java" +- "/google-cloud-bigquerystorage/src/main/resources/META-INF/native-image/" deep-copy-regex: - source: "/google/cloud/bigquery/storage/(v.*)/.*-java/proto-google-.*/src" diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 238abf9950..7a773764c8 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -68,6 +68,16 @@ integration) verify RETURN_CODE=$? ;; +graalvm) + # Run Unit and Integration Tests with Native Image + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test + RETURN_CODE=$? + ;; +graalvm17) + # Run Unit and Integration Tests with Native Image + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test + RETURN_CODE=$? + ;; samples) SAMPLES_DIR=samples # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. diff --git a/google-cloud-bigquerystorage/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-bigquerystorage/reflect-config.json b/google-cloud-bigquerystorage/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-bigquerystorage/reflect-config.json new file mode 100644 index 0000000000..e10630f8cf --- /dev/null +++ b/google-cloud-bigquerystorage/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-bigquerystorage/reflect-config.json @@ -0,0 +1,7 @@ +[ + { + "name":"java.lang.Object", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "methods":[{"name":"","parameterTypes":[] }]} +] \ No newline at end of file