Skip to content
This repository has been archived by the owner on Apr 2, 2023. It is now read-only.

Commit

Permalink
Bump graalvm.version from 21.1.0 to 21.2.0 (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Aug 3, 2021
1 parent 744dff5 commit 0187a87
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 23 deletions.
1 change: 1 addition & 0 deletions .cloudbuild/graal-build-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ gu install native-image
--threads 3 \
--batch-mode \
--quiet \
--projects \!com.example:cloud-functions-sample \
--file google-cloud-graalvm-samples
26 changes: 13 additions & 13 deletions .cloudbuild/graal-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ steps:
fi
# Build the sample images
- name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
entrypoint: bash
args: ['./.cloudbuild/graal-build-script.sh']

Expand Down Expand Up @@ -48,50 +48,50 @@ steps:
waitFor: [spanner-emulator, firestore-emulator, datastore-emulator, bigtable-emulator]

# Run the tests
- name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/bigquery-sample/target/com.example.bigquerysampleapplication' ]

- name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [
'./google-cloud-graalvm-samples/graalvm-samples-client-library/cloud-sql-sample/target/com.example.cloudsqlsampleapplication',
'-Dinstance=cloud-graalvm-support-ci:us-east1:test-instance',
'-Dpassword=root'
]

- name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/pubsub-sample/target/com.example.pubsubsampleapplication' ]

- name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/storage-sample/target/com.example.storagesampleapplication' ]

- name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/logging-sample/target/com.example.loggingsampleapplication' ]

- name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/secretmanager-sample/target/com.example.secretmanagersampleapplication' ]

- name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/tasks-sample/target/com.example.taskssampleapplication' ]

- name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/trace-sample/target/com.example.tracesampleapplication' ]

- name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/firestore-sample/target/com.example.firestoresampleapplication' ]
env:
- 'FIRESTORE_EMULATOR_HOST=firestore-emulator:9010'

- name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/spanner-sample/target/com.example.spannersampleapplication' ]
env:
- 'SPANNER_EMULATOR_HOST=spanner-emulator:9010'

- name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/bigtable-sample/target/com.example.bigtablesampleapplication' ]
env:
- 'BIGTABLE_EMULATOR_HOST=bigtable-emulator:9010'

- name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/datastore-sample/target/com.example.datastoresampleapplication' ]
env:
- 'DATASTORE_EMULATOR_HOST=http://datastore-emulator:9010'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Set up GraalVM Compiler
uses: rinx/setup-graalvm-ce@v0.0.5
with:
graalvm-version: "21.0.0.2"
graalvm-version: "21.2.0"
java-version: "java11"
native-image: "true"

Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ This dependency contains the GraalVM configurations to provide out-of-the-box su

To compile with GraalVM (native-image), ensure the client library version in your project is supported by `google-cloud-graalvm-support`.

| GraalVM Support version | *`libraries-bom` version | `grpc-netty-shaded` version |
|-------------------------|:-------------------------|-----------------------------|
| `0.4.0` | `11.0.0` or later | `1.32.1` or later |
| GraalVM Support version | GraalVM Compiler Version | *`libraries-bom` version | `grpc-netty-shaded` version |
|-------------------------|--------------------------|:-------------------------|-----------------------------|
| `0.5.0` | `>= 21.2.0` | `20.8.0` or later | `1.39.0` or later |
| `0.4.0` | `>= 21.0.0` | `11.0.0` or later | `1.32.1` or later |

Typically, you can just depend on the latest versions of the client libraries to get something working if you are not sure about what versions of (transitive) dependencies are being used by your project.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>com.example</groupId>
<artifactId>cloud-functions-sample</artifactId>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.logging.Logger;
import org.graalvm.nativeimage.ImageSingletons;
import org.graalvm.nativeimage.hosted.Feature.FeatureAccess;
import org.graalvm.nativeimage.hosted.RuntimeReflection;
import org.graalvm.nativeimage.impl.RuntimeReflectionSupport;

/**
* Internal class offering helper methods for registering methods/classes for reflection.
Expand Down Expand Up @@ -125,12 +123,10 @@ public static void registerForUnsafeFieldAccess(
FeatureAccess access, String className, String... fields) {
Class<?> clazz = access.findClassByName(className);
if (clazz != null) {
RuntimeReflectionSupport reflectionSupport =
ImageSingletons.lookup(RuntimeReflectionSupport.class);
RuntimeReflection.register(clazz);
for (String fieldName : fields) {
try {
reflectionSupport.register(false, true, clazz.getDeclaredField(fieldName));
RuntimeReflection.register(clazz.getDeclaredField(fieldName));
} catch (NoSuchFieldException ex) {
LOGGER.warning("Failed to register field " + fieldName + " for class " + className);
LOGGER.warning(ex.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ Args = -H:+AllowIncompleteClasspath --report-unsupported-elements-at-runtime \
io.grpc.netty.shaded.io.grpc.netty,\
io.grpc.netty.shaded.io.netty.channel.epoll,\
io.grpc.netty.shaded.io.netty.channel.unix,\
io.grpc.internal.RetriableStream,\
com.google.api.client.googleapis.services.AbstractGoogleClientRequest$ApiClientVersion,\
com.google.cloud.firestore.FirestoreImpl
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<graalvm.version>21.1.0</graalvm.version>
<graalvm.version>21.2.0</graalvm.version>
</properties>

<name>Google Cloud GraalVM Support Parent</name>
Expand Down

0 comments on commit 0187a87

Please sign in to comment.