Skip to content

Commit 7cce5b5

Browse files
chore: Update generation configuration at Thu Apr 24 02:28:57 UTC 2025 (#1790)
* chore: Update generation configuration at Wed Apr 23 17:13:26 UTC 2025 * chore: generate libraries at Wed Apr 23 17:14:00 UTC 2025 * chore: Update generation configuration at Thu Apr 24 02:28:57 UTC 2025 * chore: manually update generation configuration * chore: generate libraries at Thu Apr 24 14:52:36 UTC 2025 * chore: update libraries bom version to the latest * chore: generate libraries at Thu Apr 24 14:58:18 UTC 2025 * chore: remove old kokoro jobs --------- Co-authored-by: Diego Marquez <[email protected]>
1 parent 0b96d0c commit 7cce5b5

File tree

189 files changed

+4011
-602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+4011
-602
lines changed

.github/generated-files-bot.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ externalManifests:
66
file: '.github/readme/synth.metadata/synth.metadata'
77
jsonpath: '$.generatedFiles[*]'
88
ignoreAuthors:
9+
- 'cloud-java-bot'
910
- 'renovate-bot'
1011
- 'yoshi-automation'
1112
- 'release-please[bot]'

.github/scripts/update_generation_config.sh

+9-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,15 @@ set -e
1515
function get_latest_released_version() {
1616
local group_id=$1
1717
local artifact_id=$2
18-
latest=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json" | jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' | sort -V | tail -n 1)
19-
echo "${latest}"
18+
json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json")
19+
latest=$(jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' <<< "${json_content}" | sort -V | tail -n 1)
20+
if [[ -z "${latest}" ]]; then
21+
echo "The latest version of ${group_id}:${artifact_id} is empty."
22+
echo "The returned json from maven.org is invalid: ${json_content}"
23+
exit 1
24+
else
25+
echo "${latest}"
26+
fi
2027
}
2128

2229
# Update a key to a new value in the generation config.

.github/sync-repo-settings.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ branchProtectionRules:
1515
- units (11)
1616
- 'Kokoro - Test: Integration'
1717
- cla/google
18-
- 'Kokoro - Test: Java GraalVM Native Image'
19-
- 'Kokoro - Test: Java 17 GraalVM Native Image'
18+
- 'Kokoro - Test: Java GraalVM Native Image A'
19+
- 'Kokoro - Test: Java GraalVM Native Image B'
20+
- 'Kokoro - Test: Java GraalVM Native Image C'
2021
- javadoc
2122
- library_generation
2223
- unmanaged_dependency_check

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
- uses: actions/setup-java@v4
105105
with:
106106
distribution: temurin
107-
java-version: 11
107+
java-version: 17
108108
- run: java -version
109109
- run: .kokoro/build.sh
110110
env:

.github/workflows/hermetic_library_generation.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
fetch-depth: 0
3939
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
40-
- uses: googleapis/sdk-platform-java/.github/scripts@v2.55.1
40+
- uses: googleapis/sdk-platform-java/.github/scripts@v2.56.2
4141
if: env.SHOULD_RUN == 'true'
4242
with:
4343
base_ref: ${{ github.base_ref }}

.github/workflows/renovate_config_check.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
renovate_bot_config_validation:
10-
runs-on: ubuntu-22.04
10+
runs-on: ubuntu-24.04
1111

1212
steps:
1313
- name: Checkout code
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Node.js
1717
uses: actions/setup-node@v4
1818
with:
19-
node-version: '20'
19+
node-version: '22'
2020

2121
- name: Install Renovate and Config Validator
2222
run: |

.github/workflows/samples.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- uses: actions/setup-java@v4
2525
with:
2626
distribution: temurin
27-
java-version: 8
27+
java-version: 17
2828
- name: Run checkstyle
2929
run: mvn -P lint --quiet --batch-mode checkstyle:check
3030
working-directory: samples/snippets

.github/workflows/update_generation_config.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ on:
2121

2222
jobs:
2323
update-generation-config:
24-
runs-on: ubuntu-22.04
24+
runs-on: ubuntu-24.04
2525
env:
2626
# the branch into which the pull request is merged
2727
base_branch: main
2828
steps:
2929
- uses: actions/checkout@v4
3030
with:
31+
fetch-depth: 0
3132
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
3233
- name: Update params in generation config to latest
3334
shell: bash
@@ -36,7 +37,8 @@ jobs:
3637
[ -z "$(git config user.email)" ] && git config --global user.email "[email protected]"
3738
[ -z "$(git config user.name)" ] && git config --global user.name "cloud-java-bot"
3839
bash .github/scripts/update_generation_config.sh \
39-
--base_branch "${base_branch}"\
40+
--base_branch "${base_branch}" \
4041
--repo ${{ github.repository }}
4142
env:
4243
GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
44+

.kokoro/build.sh

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
2-
# Copyright 2019 Google LLC
2+
# Copyright 2025 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
66
# You may obtain a copy of the License at
77
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
8+
# https://www.apache.org/licenses/LICENSE-2.0
99
#
1010
# Unless required by applicable law or agreed to in writing, software
1111
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -42,21 +42,22 @@ if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTI
4242
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS})
4343
fi
4444

45+
4546
RETURN_CODE=0
4647
set +e
4748

4849
case ${JOB_TYPE} in
4950
test)
5051
echo "SUREFIRE_JVM_OPT: ${SUREFIRE_JVM_OPT}"
51-
mvn test -B -ntp -Dclirr.skip=true -Denforcer.skip=true ${SUREFIRE_JVM_OPT}
52+
mvn test -B -ntp -Dfmt.skip=true -Dclirr.skip=true -Denforcer.skip=true ${SUREFIRE_JVM_OPT}
5253
RETURN_CODE=$?
5354
;;
5455
lint)
55-
mvn com.coveo:fmt-maven-plugin:check -B -ntp
56+
mvn com.spotify.fmt:fmt-maven-plugin:check -B -ntp
5657
RETURN_CODE=$?
5758
;;
5859
javadoc)
59-
mvn javadoc:javadoc javadoc:test-javadoc -B -ntp
60+
mvn javadoc:javadoc javadoc:test-javadoc -B -ntp -Dfmt.skip=true
6061
RETURN_CODE=$?
6162
;;
6263
integration)
@@ -66,18 +67,16 @@ integration)
6667
-DtrimStackTrace=false \
6768
-Dclirr.skip=true \
6869
-Denforcer.skip=true \
70+
-Dcheckstyle.skip=true \
71+
-DskipUnitTests=true \
72+
-Dfmt.skip=true \
6973
-fae \
7074
verify
7175
RETURN_CODE=$?
7276
;;
7377
graalvm)
7478
# Run Unit and Integration Tests with Native Image
75-
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
76-
RETURN_CODE=$?
77-
;;
78-
graalvm17)
79-
# Run Unit and Integration Tests with Native Image
80-
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
79+
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test -Dfmt.skip=true
8180
RETURN_CODE=$?
8281
;;
8382
samples)
@@ -101,6 +100,7 @@ samples)
101100
-DtrimStackTrace=false \
102101
-Dclirr.skip=true \
103102
-Denforcer.skip=true \
103+
-Dfmt.skip=true \
104104
-fae \
105105
verify
106106
RETURN_CODE=$?
@@ -110,7 +110,7 @@ samples)
110110
fi
111111
;;
112112
clirr)
113-
mvn -B -ntp -Denforcer.skip=true clirr:check
113+
mvn -B -ntp -Dfmt.skip=true -Denforcer.skip=true clirr:check
114114
RETURN_CODE=$?
115115
;;
116116
*)

.kokoro/presubmit/graalvm-native.cfg renamed to .kokoro/presubmit/graalvm-native-a.cfg

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Configure the docker image for kokoro-trampoline.
44
env_vars: {
55
key: "TRAMPOLINE_IMAGE"
6-
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.45.1"
6+
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.46.2" # {x-version-update:google-cloud-shared-dependencies:current}
77
}
88

99
env_vars: {
@@ -31,3 +31,8 @@ env_vars: {
3131
key: "SECRET_MANAGER_KEYS"
3232
value: "java-it-service-account"
3333
}
34+
35+
env_vars: {
36+
key: "IT_SERVICE_ACCOUNT_EMAIL"
37+
38+
}

.kokoro/presubmit/graalvm-native-17.cfg renamed to .kokoro/presubmit/graalvm-native-b.cfg

+7-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
# Configure the docker image for kokoro-trampoline.
44
env_vars: {
55
key: "TRAMPOLINE_IMAGE"
6-
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.45.1"
6+
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.46.2" # {x-version-update:google-cloud-shared-dependencies:current}
77
}
88

99
env_vars: {
1010
key: "JOB_TYPE"
11-
value: "graalvm17"
11+
value: "graalvm"
1212
}
1313

1414
# TODO: remove this after we've migrated all tests and scripts
@@ -31,3 +31,8 @@ env_vars: {
3131
key: "SECRET_MANAGER_KEYS"
3232
value: "java-it-service-account"
3333
}
34+
35+
env_vars: {
36+
key: "IT_SERVICE_ACCOUNT_EMAIL"
37+
38+
}
+38
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.46.2" # {x-version-update:google-cloud-shared-dependencies:current}
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: "IT_SERVICE_ACCOUNT_EMAIL"
37+
38+
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ If you are using Maven without the BOM, add this to your dependencies:
5151
If you are using Gradle 5.x or later, add this to your dependencies:
5252

5353
```Groovy
54-
implementation platform('com.google.cloud:libraries-bom:26.56.0')
54+
implementation platform('com.google.cloud:libraries-bom:26.59.0')
5555
5656
implementation 'com.google.cloud:google-cloud-logging'
5757
```

generation_config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
gapic_generator_version: 2.55.1
2-
googleapis_commitish: bc7f715d7f58afe381fbc244a8bcde7f0afa11ed
3-
libraries_bom_version: 26.56.0
1+
gapic_generator_version: 2.56.2
2+
googleapis_commitish: 261895f1d8ced9564f4cf872f7f4f9a1f4c615d3
3+
libraries_bom_version: 26.59.0
44
libraries:
55
- api_shortname: logging
66
name_pretty: Cloud Logging

google-cloud-logging/src/main/java/com/google/cloud/logging/Context.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public class Context {
4343
private final String traceId;
4444
private final String spanId;
4545
private final boolean traceSampled;
46+
4647
/** A builder for {@see Context} objects. */
4748
public static final class Builder {
4849
private HttpRequest.Builder requestBuilder = HttpRequest.newBuilder();
@@ -185,7 +186,8 @@ public Builder loadW3CTraceParentContext(String traceParent) {
185186
Matcher validator = W3C_TRACE_CONTEXT_FORMAT.matcher(Ascii.toLowerCase(traceParent));
186187
if (!validator.matches()) {
187188
throw new IllegalArgumentException(
188-
"Invalid format of the header value. The value does not match W3C Trace Context version \"00\"");
189+
"Invalid format of the header value. The value does not match W3C Trace Context"
190+
+ " version \"00\"");
189191
}
190192
List<String> fields = Splitter.on('-').splitToList(traceParent);
191193
setTraceId(fields.get(1));

google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/GrpcLoggingRpc.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,9 @@ public Void apply(UnaryCallSettings.Builder<?, ?> builder) {
179179
.setBatchingSettings(
180180
batchingSettings != null
181181
? batchingSettings
182-
: defaultBatchSettings
183-
.toBuilder()
182+
: defaultBatchSettings.toBuilder()
184183
.setFlowControlSettings(
185-
defaultBatchSettings
186-
.getFlowControlSettings()
187-
.toBuilder()
184+
defaultBatchSettings.getFlowControlSettings().toBuilder()
188185
.setLimitExceededBehavior(LimitExceededBehavior.Block)
189186
.build())
190187
.build());

google-cloud-logging/src/test/java/com/google/cloud/logging/ExclusionTest.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ public void testBuilder() {
6161
public void testToBuilder() {
6262
compareExclusion(EXCLUSION, EXCLUSION.toBuilder().build());
6363
Exclusion exclusion =
64-
EXCLUSION
65-
.toBuilder()
64+
EXCLUSION.toBuilder()
6665
.setName(NEW_EXCLUSION_NAME)
6766
.setDisabled(NEW_DISABLED)
6867
.setDescription(NEW_DESCRIPTION)
@@ -76,8 +75,7 @@ public void testToBuilder() {
7675
assertEquals(NEW_EXCLUSION_CREATED_TIME, exclusion.getCreateTime());
7776

7877
exclusion =
79-
exclusion
80-
.toBuilder()
78+
exclusion.toBuilder()
8179
.setName(EXCLUSION_NAME)
8280
.setDescription(DESCRIPTION)
8381
.setFilter(EXCLUSION_FILTER)

google-cloud-logging/src/test/java/com/google/cloud/logging/HttpRequestTest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ public void testBuilderDefaultValues() {
102102
public void testToBuilder() {
103103
compareHttpRequest(HTTP_REQUEST, HTTP_REQUEST.toBuilder().build());
104104
HttpRequest httpRequest =
105-
HTTP_REQUEST
106-
.toBuilder()
105+
HTTP_REQUEST.toBuilder()
107106
.setRequestMethod(RequestMethod.POST)
108107
.setRequestUrl("http://www.other-example.com")
109108
.setRequestSize(4)

google-cloud-logging/src/test/java/com/google/cloud/logging/LogEntryTest.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,7 @@ public void testToBuilder() {
264264
.setStatus(500)
265265
.build();
266266
LogEntry logEntry =
267-
STRING_ENTRY
268-
.toBuilder()
267+
STRING_ENTRY.toBuilder()
269268
.setPayload(StringPayload.of("otherPayload"))
270269
.setLogName("otherLogName")
271270
.setResource(MonitoredResource.newBuilder("global").build())
@@ -298,8 +297,7 @@ public void testToBuilder() {
298297
new SourceLocation.Builder().setFile("hey.java").build(), logEntry.getSourceLocation());
299298
assertEquals(StringPayload.of("otherPayload"), logEntry.getPayload());
300299
logEntry =
301-
logEntry
302-
.toBuilder()
300+
logEntry.toBuilder()
303301
.setPayload(STRING_PAYLOAD)
304302
.setLogName(LOG_NAME)
305303
.setResource(RESOURCE)

google-cloud-logging/src/test/java/com/google/cloud/logging/MetricInfoTest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ public void testBuilder() {
5454
public void testToBuilder() {
5555
compareMetricInfo(METRIC_INFO, METRIC_INFO.toBuilder().build());
5656
MetricInfo metricInfo =
57-
METRIC_INFO
58-
.toBuilder()
57+
METRIC_INFO.toBuilder()
5958
.setName(NEW_NAME)
6059
.setDescription(NEW_DESCRIPTION)
6160
.setFilter(NEW_FILTER)

google-cloud-logging/src/test/java/com/google/cloud/logging/MetricTest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ public void testBuilder() {
7272
initializeExpectedMetric(2);
7373
replay(logging);
7474
Metric builtMetric =
75-
expectedMetric
76-
.toBuilder()
75+
expectedMetric.toBuilder()
7776
.setName(NEW_NAME)
7877
.setFilter(NEW_FILTER)
7978
.setDescription(NEW_DESCRIPTION)

0 commit comments

Comments
 (0)