Skip to content

chore: Update generation configuration at Thu Apr 24 02:28:57 UTC 2025 #1790

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/generated-files-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ externalManifests:
file: '.github/readme/synth.metadata/synth.metadata'
jsonpath: '$.generatedFiles[*]'
ignoreAuthors:
- 'cloud-java-bot'
- 'renovate-bot'
- 'yoshi-automation'
- 'release-please[bot]'
Expand Down
11 changes: 9 additions & 2 deletions .github/scripts/update_generation_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@ set -e
function get_latest_released_version() {
local group_id=$1
local artifact_id=$2
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)
echo "${latest}"
json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json")
latest=$(jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' <<< "${json_content}" | sort -V | tail -n 1)
if [[ -z "${latest}" ]]; then
echo "The latest version of ${group_id}:${artifact_id} is empty."
echo "The returned json from maven.org is invalid: ${json_content}"
exit 1
else
echo "${latest}"
fi
}

# Update a key to a new value in the generation config.
Expand Down
5 changes: 3 additions & 2 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ branchProtectionRules:
- units (11)
- 'Kokoro - Test: Integration'
- cla/google
- 'Kokoro - Test: Java GraalVM Native Image'
- 'Kokoro - Test: Java 17 GraalVM Native Image'
- 'Kokoro - Test: Java GraalVM Native Image A'
- 'Kokoro - Test: Java GraalVM Native Image B'
- 'Kokoro - Test: Java GraalVM Native Image C'
- javadoc
- library_generation
- unmanaged_dependency_check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17
- run: java -version
- run: .kokoro/build.sh
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hermetic_library_generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
- uses: googleapis/sdk-platform-java/.github/scripts@v2.55.1
- uses: googleapis/sdk-platform-java/.github/scripts@v2.56.2
if: env.SHOULD_RUN == 'true'
with:
base_ref: ${{ github.base_ref }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/renovate_config_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
renovate_bot_config_validation:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Checkout code
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'

- name: Install Renovate and Config Validator
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/samples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 17
- name: Run checkstyle
run: mvn -P lint --quiet --batch-mode checkstyle:check
working-directory: samples/snippets
6 changes: 4 additions & 2 deletions .github/workflows/update_generation_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ on:

jobs:
update-generation-config:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
# the branch into which the pull request is merged
base_branch: main
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
- name: Update params in generation config to latest
shell: bash
Expand All @@ -36,7 +37,8 @@ jobs:
[ -z "$(git config user.email)" ] && git config --global user.email "[email protected]"
[ -z "$(git config user.name)" ] && git config --global user.name "cloud-java-bot"
bash .github/scripts/update_generation_config.sh \
--base_branch "${base_branch}"\
--base_branch "${base_branch}" \
--repo ${{ github.repository }}
env:
GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}

24 changes: 12 additions & 12 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash
# Copyright 2019 Google LLC
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand Down Expand Up @@ -42,21 +42,22 @@ if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTI
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS})
fi


RETURN_CODE=0
set +e

case ${JOB_TYPE} in
test)
echo "SUREFIRE_JVM_OPT: ${SUREFIRE_JVM_OPT}"
mvn test -B -ntp -Dclirr.skip=true -Denforcer.skip=true ${SUREFIRE_JVM_OPT}
mvn test -B -ntp -Dfmt.skip=true -Dclirr.skip=true -Denforcer.skip=true ${SUREFIRE_JVM_OPT}
RETURN_CODE=$?
;;
lint)
mvn com.coveo:fmt-maven-plugin:check -B -ntp
mvn com.spotify.fmt:fmt-maven-plugin:check -B -ntp
RETURN_CODE=$?
;;
javadoc)
mvn javadoc:javadoc javadoc:test-javadoc -B -ntp
mvn javadoc:javadoc javadoc:test-javadoc -B -ntp -Dfmt.skip=true
RETURN_CODE=$?
;;
integration)
Expand All @@ -66,18 +67,16 @@ integration)
-DtrimStackTrace=false \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dcheckstyle.skip=true \
-DskipUnitTests=true \
-Dfmt.skip=true \
-fae \
verify
RETURN_CODE=$?
;;
graalvm)
# Run Unit and Integration Tests with Native Image
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
RETURN_CODE=$?
;;
graalvm17)
# Run Unit and Integration Tests with Native Image
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test -Dfmt.skip=true
RETURN_CODE=$?
;;
samples)
Expand All @@ -101,6 +100,7 @@ samples)
-DtrimStackTrace=false \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dfmt.skip=true \
-fae \
verify
RETURN_CODE=$?
Expand All @@ -110,7 +110,7 @@ samples)
fi
;;
clirr)
mvn -B -ntp -Denforcer.skip=true clirr:check
mvn -B -ntp -Dfmt.skip=true -Denforcer.skip=true clirr:check
RETURN_CODE=$?
;;
*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.45.1"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.46.2" # {x-version-update:google-cloud-shared-dependencies:current}
}

env_vars: {
Expand Down Expand Up @@ -31,3 +31,8 @@ env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}

env_vars: {
key: "IT_SERVICE_ACCOUNT_EMAIL"
value: "[email protected]"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.45.1"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.46.2" # {x-version-update:google-cloud-shared-dependencies:current}
}

env_vars: {
key: "JOB_TYPE"
value: "graalvm17"
value: "graalvm"
}

# TODO: remove this after we've migrated all tests and scripts
Expand All @@ -31,3 +31,8 @@ env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}

env_vars: {
key: "IT_SERVICE_ACCOUNT_EMAIL"
value: "[email protected]"
}
38 changes: 38 additions & 0 deletions .kokoro/presubmit/graalvm-native-c.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.46.2" # {x-version-update:google-cloud-shared-dependencies:current}
}

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"
}

env_vars: {
key: "IT_SERVICE_ACCOUNT_EMAIL"
value: "[email protected]"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ If you are using Maven without the BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies:

```Groovy
implementation platform('com.google.cloud:libraries-bom:26.56.0')
implementation platform('com.google.cloud:libraries-bom:26.59.0')

implementation 'com.google.cloud:google-cloud-logging'
```
Expand Down
6 changes: 3 additions & 3 deletions generation_config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
gapic_generator_version: 2.55.1
googleapis_commitish: bc7f715d7f58afe381fbc244a8bcde7f0afa11ed
libraries_bom_version: 26.56.0
gapic_generator_version: 2.56.2
googleapis_commitish: 261895f1d8ced9564f4cf872f7f4f9a1f4c615d3
libraries_bom_version: 26.59.0
libraries:
- api_shortname: logging
name_pretty: Cloud Logging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class Context {
private final String traceId;
private final String spanId;
private final boolean traceSampled;

/** A builder for {@see Context} objects. */
public static final class Builder {
private HttpRequest.Builder requestBuilder = HttpRequest.newBuilder();
Expand Down Expand Up @@ -185,7 +186,8 @@ public Builder loadW3CTraceParentContext(String traceParent) {
Matcher validator = W3C_TRACE_CONTEXT_FORMAT.matcher(Ascii.toLowerCase(traceParent));
if (!validator.matches()) {
throw new IllegalArgumentException(
"Invalid format of the header value. The value does not match W3C Trace Context version \"00\"");
"Invalid format of the header value. The value does not match W3C Trace Context"
+ " version \"00\"");
}
List<String> fields = Splitter.on('-').splitToList(traceParent);
setTraceId(fields.get(1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,9 @@ public Void apply(UnaryCallSettings.Builder<?, ?> builder) {
.setBatchingSettings(
batchingSettings != null
? batchingSettings
: defaultBatchSettings
.toBuilder()
: defaultBatchSettings.toBuilder()
.setFlowControlSettings(
defaultBatchSettings
.getFlowControlSettings()
.toBuilder()
defaultBatchSettings.getFlowControlSettings().toBuilder()
.setLimitExceededBehavior(LimitExceededBehavior.Block)
.build())
.build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ public void testBuilder() {
public void testToBuilder() {
compareExclusion(EXCLUSION, EXCLUSION.toBuilder().build());
Exclusion exclusion =
EXCLUSION
.toBuilder()
EXCLUSION.toBuilder()
.setName(NEW_EXCLUSION_NAME)
.setDisabled(NEW_DISABLED)
.setDescription(NEW_DESCRIPTION)
Expand All @@ -76,8 +75,7 @@ public void testToBuilder() {
assertEquals(NEW_EXCLUSION_CREATED_TIME, exclusion.getCreateTime());

exclusion =
exclusion
.toBuilder()
exclusion.toBuilder()
.setName(EXCLUSION_NAME)
.setDescription(DESCRIPTION)
.setFilter(EXCLUSION_FILTER)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ public void testBuilderDefaultValues() {
public void testToBuilder() {
compareHttpRequest(HTTP_REQUEST, HTTP_REQUEST.toBuilder().build());
HttpRequest httpRequest =
HTTP_REQUEST
.toBuilder()
HTTP_REQUEST.toBuilder()
.setRequestMethod(RequestMethod.POST)
.setRequestUrl("http://www.other-example.com")
.setRequestSize(4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,7 @@ public void testToBuilder() {
.setStatus(500)
.build();
LogEntry logEntry =
STRING_ENTRY
.toBuilder()
STRING_ENTRY.toBuilder()
.setPayload(StringPayload.of("otherPayload"))
.setLogName("otherLogName")
.setResource(MonitoredResource.newBuilder("global").build())
Expand Down Expand Up @@ -298,8 +297,7 @@ public void testToBuilder() {
new SourceLocation.Builder().setFile("hey.java").build(), logEntry.getSourceLocation());
assertEquals(StringPayload.of("otherPayload"), logEntry.getPayload());
logEntry =
logEntry
.toBuilder()
logEntry.toBuilder()
.setPayload(STRING_PAYLOAD)
.setLogName(LOG_NAME)
.setResource(RESOURCE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ public void testBuilder() {
public void testToBuilder() {
compareMetricInfo(METRIC_INFO, METRIC_INFO.toBuilder().build());
MetricInfo metricInfo =
METRIC_INFO
.toBuilder()
METRIC_INFO.toBuilder()
.setName(NEW_NAME)
.setDescription(NEW_DESCRIPTION)
.setFilter(NEW_FILTER)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ public void testBuilder() {
initializeExpectedMetric(2);
replay(logging);
Metric builtMetric =
expectedMetric
.toBuilder()
expectedMetric.toBuilder()
.setName(NEW_NAME)
.setFilter(NEW_FILTER)
.setDescription(NEW_DESCRIPTION)
Expand Down
Loading