Skip to content

Commit ce89e22

Browse files
lqiu96cloud-java-botdiegomarquezp
authored
ci: Add graalvm presubmit configs (#3077)
* ci: Add graalvm presubmit configs * chore: Update graalmv build command * chore: Update graalmv build command * chore: Set return code * chore: Add GraalVM configs * chore: Use customNative profile * chore: Remove junit-vintage-engine * chore: Add additional graalvm config for java.base * chore: Add Java 17 configs * chore: Add back junit-vintage-engine * chore: Add back junit-vintage-engine * chore: Use versions defined in native-shared-configs * chore: Add reflect config files * chore: generate libraries at Fri Aug 22 15:49:23 UTC 2025 * chore: Add resource config files * chore: Move graalvm configs to the biquerystorage pom * chore: Add owlbot preserve for native files * Revert "chore: generate libraries at Fri Aug 22 15:49:23 UTC 2025" This reverts commit e9d88de407e4c87e51713c824375c4e80266f248. * chore: generate libraries at Fri Aug 22 20:36:16 UTC 2025 * chore: Add owlbot preserve for native files * Revert "chore: generate libraries at Fri Aug 22 20:36:16 UTC 2025" This reverts commit dbd7d162881f868000df727e6b96f35574f12709. * chore: generate libraries at Fri Aug 22 20:53:57 UTC 2025 * chore: Add owlbot preserve for native files * Revert "chore: generate libraries at Fri Aug 22 20:53:57 UTC 2025" This reverts commit 197baaeafdd3471a476ac43938f5b3e175328857. * chore: generate libraries at Fri Aug 22 21:00:47 UTC 2025 * chore: Add owlbot preserve for native files * Revert "chore: generate libraries at Fri Aug 22 21:00:47 UTC 2025" This reverts commit 3895102924f8eafd03cfd868ba116598515c5a29. * chore: generate libraries at Fri Aug 22 21:05:56 UTC 2025 * chore: Add owlbot preserve for native files * Revert "chore: generate libraries at Fri Aug 22 21:05:56 UTC 2025" This reverts commit b7890e1a7603edc345ed93a7bc36260cf5aaf50e. * chore: generate libraries at Fri Aug 22 21:10:38 UTC 2025 * chore: Add owlbot preserve for native files * Revert "chore: generate libraries at Fri Aug 22 21:10:38 UTC 2025" This reverts commit 2c8526da11e5a0c5e8929dd32646197829743296. * chore: generate libraries at Fri Aug 22 21:14:57 UTC 2025 * chore: Add owlbot preserve for native files * Revert "chore: generate libraries at Fri Aug 22 21:14:57 UTC 2025" This reverts commit d947a602efb50498301669cab1c1dbe9ef5507bc. * chore: generate libraries at Fri Aug 22 21:27:40 UTC 2025 * Revert "chore: generate libraries at Fri Aug 22 21:27:40 UTC 2025" This reverts commit 8a4a65922bbc452d813a6754bc6a20c6c550f399. * fix: add native-image folder both for deletion and transfer exclusions * chore: Add autovalue configs to graalvm * chore: Update to bq build.sh file * Revert "chore: Add autovalue configs to graalvm" This reverts commit b9e44441c8e7bfe88ca8af34a9fd782a35ac6514. * chore: Add compiler configs * chore: Update autovalue configs * chore: Add arrow open configs * chore: Update GraalVM configs --------- Co-authored-by: cloud-java-bot <cloud-java-bot@google.com> Co-authored-by: diegomarquezp <diegomarquezp@google.com>
1 parent f85118c commit ce89e22

File tree

18 files changed

+807
-88
lines changed

18 files changed

+807
-88
lines changed

java-bigquerystorage/.github/.OwlBot-hermetic.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ deep-preserve-regex:
8585
- "/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/Exceptions.java"
8686
- "/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorker.java"
8787
- "/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPool.java"
88+
- "/owl-bot-staging/.*/google-cloud-bigquerystorage/src/main/resources/META-INF/native-image/"
8889
- "/google-cloud-bigquerystorage/src/main/resources/META-INF/native-image/"
8990
- "/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/Singletons.java"
9091

java-bigquerystorage/.kokoro/build.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ echo ${JOB_TYPE}
2929

3030
# attempt to install 3 times with exponential backoff (starting with 10 seconds)
3131
retry_with_backoff 3 10 \
32-
mvn install -B -V -U \
32+
mvn install -B -V -ntp \
3333
-DskipTests=true \
3434
-Dclirr.skip=true \
3535
-Denforcer.skip=true \
@@ -74,12 +74,7 @@ integration)
7474
;;
7575
graalvm)
7676
# Run Unit and Integration Tests with Native Image
77-
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -PcustomNative -Penable-integration-tests test
78-
RETURN_CODE=$?
79-
;;
80-
graalvm17)
81-
# Run Unit and Integration Tests with Native Image
82-
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -PcustomNative -Penable-integration-tests test
77+
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -PcustomNative test
8378
RETURN_CODE=$?
8479
;;
8580
samples)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.52.0"
7+
}
8+
9+
env_vars: {
10+
key: "JOB_TYPE"
11+
value: "graalvm"
12+
}
13+
14+
# TODO: remove this after we've migrated all tests and scripts
15+
env_vars: {
16+
key: "GCLOUD_PROJECT"
17+
value: "gcloud-devel"
18+
}
19+
20+
env_vars: {
21+
key: "GOOGLE_CLOUD_PROJECT"
22+
value: "gcloud-devel"
23+
}
24+
25+
env_vars: {
26+
key: "GOOGLE_APPLICATION_CREDENTIALS"
27+
value: "secret_manager/java-it-service-account"
28+
}
29+
30+
env_vars: {
31+
key: "SECRET_MANAGER_KEYS"
32+
value: "java-it-service-account"
33+
}
34+
35+
env_vars: {
36+
key: "ENABLE_FLAKYBOT"
37+
value: "false"
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.52.0"
7+
}
8+
9+
env_vars: {
10+
key: "JOB_TYPE"
11+
value: "graalvm"
12+
}
13+
14+
# TODO: remove this after we've migrated all tests and scripts
15+
env_vars: {
16+
key: "GCLOUD_PROJECT"
17+
value: "gcloud-devel"
18+
}
19+
20+
env_vars: {
21+
key: "GOOGLE_CLOUD_PROJECT"
22+
value: "gcloud-devel"
23+
}
24+
25+
env_vars: {
26+
key: "GOOGLE_APPLICATION_CREDENTIALS"
27+
value: "secret_manager/java-it-service-account"
28+
}
29+
30+
env_vars: {
31+
key: "SECRET_MANAGER_KEYS"
32+
value: "java-it-service-account"
33+
}
34+
35+
env_vars: {
36+
key: "ENABLE_FLAKYBOT"
37+
value: "false"
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.52.0"
7+
}
8+
9+
env_vars: {
10+
key: "JOB_TYPE"
11+
value: "graalvm"
12+
}
13+
14+
# TODO: remove this after we've migrated all tests and scripts
15+
env_vars: {
16+
key: "GCLOUD_PROJECT"
17+
value: "gcloud-devel"
18+
}
19+
20+
env_vars: {
21+
key: "GOOGLE_CLOUD_PROJECT"
22+
value: "gcloud-devel"
23+
}
24+
25+
env_vars: {
26+
key: "GOOGLE_APPLICATION_CREDENTIALS"
27+
value: "secret_manager/java-it-service-account"
28+
}
29+
30+
env_vars: {
31+
key: "SECRET_MANAGER_KEYS"
32+
value: "java-it-service-account"
33+
}
34+
35+
env_vars: {
36+
key: "ENABLE_FLAKYBOT"
37+
value: "false"
38+
}

java-bigquerystorage/google-cloud-bigquerystorage/EnableAutoValue.txt

Whitespace-only changes.

java-bigquerystorage/google-cloud-bigquerystorage/pom.xml

Lines changed: 115 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,6 @@
4444
<groupId>org.codehaus.mojo</groupId>
4545
<artifactId>flatten-maven-plugin</artifactId>
4646
</plugin>
47-
<plugin>
48-
<groupId>org.apache.maven.plugins</groupId>
49-
<artifactId>maven-dependency-plugin</artifactId>
50-
<configuration>
51-
<usedDependencies>
52-
<dependency>com.google.auto.value:auto-value</dependency>
53-
</usedDependencies>
54-
</configuration>
55-
</plugin>
5647
</plugins>
5748
</build>
5849
<dependencies>
@@ -80,11 +71,6 @@
8071
<groupId>com.google.api</groupId>
8172
<artifactId>api-common</artifactId>
8273
</dependency>
83-
<dependency>
84-
<groupId>com.google.auto.value</groupId>
85-
<artifactId>auto-value</artifactId>
86-
<version>${auto-value.version}</version>
87-
</dependency>
8874
<dependency>
8975
<groupId>com.google.auto.value</groupId>
9076
<artifactId>auto-value-annotations</artifactId>
@@ -285,7 +271,7 @@
285271
<groupId>com.google.api.grpc</groupId>
286272
<artifactId>grpc-google-cloud-bigquerystorage-v1</artifactId>
287273
</dependency>
288-
274+
289275
<!-- Need testing utility classes for generated gRPC clients tests -->
290276
<dependency>
291277
<groupId>com.google.api</groupId>
@@ -294,4 +280,118 @@
294280
<scope>test</scope>
295281
</dependency>
296282
</dependencies>
283+
284+
<profiles>
285+
<profile>
286+
<id>arrow-config</id>
287+
<activation>
288+
<jdk>[9,)</jdk>
289+
</activation>
290+
<build>
291+
<plugins>
292+
<plugin>
293+
<groupId>org.apache.maven.plugins</groupId>
294+
<artifactId>maven-compiler-plugin</artifactId>
295+
<configuration>
296+
<encoding>UTF-8</encoding>
297+
<fork>true</fork>
298+
<compilerArgs>
299+
<arg>-J--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED</arg>
300+
<arg>-J--add-opens=java.base/java.nio=java-base,ALL-UNNAMED</arg>
301+
</compilerArgs>
302+
</configuration>
303+
</plugin>
304+
</plugins>
305+
</build>
306+
</profile>
307+
<profile>
308+
<!-- This profile is used to enable GraalVM native image testing in BQ storage-->
309+
<id>customNative</id>
310+
<dependencies>
311+
<!-- Add this dependency to resolve class org.opentest4j.TestAbortedException -->
312+
<dependency>
313+
<groupId>org.opentest4j</groupId>
314+
<artifactId>opentest4j</artifactId>
315+
<version>${opentest4j.version}</version>
316+
</dependency>
317+
<dependency>
318+
<groupId>org.junit.vintage</groupId>
319+
<artifactId>junit-vintage-engine</artifactId>
320+
<version>${junit-vintage-engine.version}</version>
321+
</dependency>
322+
</dependencies>
323+
<build>
324+
<plugins>
325+
<plugin>
326+
<groupId>org.apache.maven.plugins</groupId>
327+
<artifactId>maven-surefire-plugin</artifactId>
328+
<version>${surefire.version}</version>
329+
<dependencies>
330+
<dependency>
331+
<groupId>org.junit.vintage</groupId>
332+
<artifactId>junit-vintage-engine</artifactId>
333+
<version>${junit-vintage-engine.version}</version>
334+
</dependency>
335+
</dependencies>
336+
<configuration>
337+
<!-- Include all tests during native image testing. -->
338+
<excludes combine.self="override">
339+
<exclude>**/ITBigQueryWrite*RetryTest.java</exclude>
340+
</excludes>
341+
<includes>
342+
<include>**/IT*.java</include>
343+
<!-- Enable unit tests in generated libraries for native image testing. -->
344+
<include>**/*ClientTest.java</include>
345+
</includes>
346+
</configuration>
347+
</plugin>
348+
<plugin>
349+
<groupId>org.graalvm.buildtools</groupId>
350+
<artifactId>native-maven-plugin</artifactId>
351+
<version>${native-maven-plugin.version}</version>
352+
<extensions>true</extensions>
353+
<executions>
354+
<execution>
355+
<id>test-native</id>
356+
<goals>
357+
<goal>test</goal>
358+
</goals>
359+
<phase>test</phase>
360+
</execution>
361+
</executions>
362+
<configuration>
363+
<buildArgs>
364+
<buildArg>--no-fallback</buildArg>
365+
<buildArg>--no-server</buildArg>
366+
</buildArgs>
367+
</configuration>
368+
</plugin>
369+
</plugins>
370+
</build>
371+
</profile>
372+
<profile>
373+
<id>java17</id>
374+
<activation>
375+
<jdk>[17,)</jdk>
376+
<property>
377+
<!--
378+
In Java 8 unit tests where we run tests in Java 8 after building
379+
bytecode on Java 17, we don't want to add the argLine
380+
-->
381+
<name>!jvm</name>
382+
</property>
383+
</activation>
384+
<build>
385+
<plugins>
386+
<plugin>
387+
<groupId>org.apache.maven.plugins</groupId>
388+
<artifactId>maven-surefire-plugin</artifactId>
389+
<configuration>
390+
<argLine>--add-opens=java.base/java.nio=ALL-UNNAMED</argLine>
391+
</configuration>
392+
</plugin>
393+
</plugins>
394+
</build>
395+
</profile>
396+
</profiles>
297397
</project>

0 commit comments

Comments
 (0)