From cc2cc159f4acca0bd41770fa16854e861f88551b Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Mon, 18 Oct 2021 14:25:27 -0700 Subject: [PATCH 1/2] changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. --- .../src/main/java/com/google/api/RoutingParameter.java | 8 ++++---- synth.metadata | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/proto-google-common-protos/src/main/java/com/google/api/RoutingParameter.java b/proto-google-common-protos/src/main/java/com/google/api/RoutingParameter.java index 664fd4be..7cd305f1 100644 --- a/proto-google-common-protos/src/main/java/com/google/api/RoutingParameter.java +++ b/proto-google-common-protos/src/main/java/com/google/api/RoutingParameter.java @@ -319,10 +319,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getFieldBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_); } - if (!getPathTemplateBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pathTemplate_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pathTemplate_); } unknownFields.writeTo(output); @@ -334,10 +334,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getFieldBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_); } - if (!getPathTemplateBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pathTemplate_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pathTemplate_); } size += unknownFields.getSerializedSize(); diff --git a/synth.metadata b/synth.metadata index 22e23d7f..a5fe7a15 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-common-protos.git", - "sha": "08b5c8545ed6f29a11ae4d3f061df47f40234bd1" + "sha": "fe2eae8c4d902c190c6e24bd02a41dc916f36db4" } }, { @@ -46,7 +46,6 @@ ".kokoro/common.sh", ".kokoro/continuous/common.cfg", ".kokoro/continuous/java8.cfg", - ".kokoro/dependencies.sh", ".kokoro/nightly/common.cfg", ".kokoro/nightly/integration.cfg", ".kokoro/nightly/java11.cfg", From 5106562b563d57deefa9468549f19dd4cc99b690 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Mon, 18 Oct 2021 14:28:16 -0700 Subject: [PATCH 2/2] feat: Introduce Native Image testing build script changes Adds additional switch case to build.sh to accommodate native image testing. Source-Author: Daniel Zou Source-Date: Mon Oct 18 11:42:09 2021 -0400 Source-Repo: googleapis/synthtool Source-Sha: d45942be8066ad57bd0509f4a16e1fac78ecc50f Source-Link: https://github.com/googleapis/synthtool/commit/d45942be8066ad57bd0509f4a16e1fac78ecc50f --- .kokoro/build.sh | 5 +++++ .kokoro/presubmit/graalvm-native.cfg | 33 ++++++++++++++++++++++++++++ synth.metadata | 3 ++- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .kokoro/presubmit/graalvm-native.cfg diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 75da3504..6138d853 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -69,6 +69,11 @@ integration) verify RETURN_CODE=$? ;; +graalvm) + # Run Unit and Integration Tests with Native Image + mvn test -Pnative -Penable-integration-tests + 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/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg new file mode 100644 index 00000000..4c7225ec --- /dev/null +++ b/.kokoro/presubmit/graalvm-native.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvm" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} diff --git a/synth.metadata b/synth.metadata index a5fe7a15..afdcdb7f 100644 --- a/synth.metadata +++ b/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "a4be3384ccb92364795d981f2863f6986fcee620" + "sha": "d45942be8066ad57bd0509f4a16e1fac78ecc50f" } } ], @@ -58,6 +58,7 @@ ".kokoro/presubmit/clirr.cfg", ".kokoro/presubmit/common.cfg", ".kokoro/presubmit/dependencies.cfg", + ".kokoro/presubmit/graalvm-native.cfg", ".kokoro/presubmit/integration.cfg", ".kokoro/presubmit/java11.cfg", ".kokoro/presubmit/java7.cfg",