Skip to content

chore: Update generation configuration at Fri Apr 25 02:28:52 UTC 2025 #1822

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 25, 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 @@ -112,7 +112,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 @@ -78,18 +79,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 @@ -113,6 +112,7 @@ samples)
-DtrimStackTrace=false \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dfmt.skip=true \
-fae \
verify
RETURN_CODE=$?
Expand All @@ -122,7 +122,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 @@ -33,6 +33,6 @@ env_vars: {
}

env_vars: {
key: "DATASTORE_PROJECT_ID"
value: "gcloud-devel"
key: "IT_SERVICE_ACCOUNT_EMAIL"
value: "it-service-account@gcloud-devel.iam.gserviceaccount.com"
}
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 @@ -33,6 +33,6 @@ env_vars: {
}

env_vars: {
key: "DATASTORE_PROJECT_ID"
value: "gcloud-devel"
key: "IT_SERVICE_ACCOUNT_EMAIL"
value: "it-service-account@gcloud-devel.iam.gserviceaccount.com"
}
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 CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Code in this repo is formatted with
[google-java-format](https://github.com/google/google-java-format).
To run formatting on your project, you can run:
```
mvn com.coveo:fmt-maven-plugin:format
mvn com.spotify.fmt:fmt-maven-plugin:format
```

[1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.56.0</version>
<version>26.59.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -41,15 +41,15 @@ If you are using Maven without the BOM, add this to your dependencies:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-datastore</artifactId>
<version>2.26.4</version>
<version>2.27.0</version>
</dependency>

```

If you are using Gradle 5.x or later, add this to your dependencies:

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

implementation 'com.google.cloud:google-cloud-datastore'
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ public synchronized File getProjectDirectory() {
static class StartupMonitor extends Thread {
private final InputStream inputStream;
private volatile boolean success = false;

/** This latch will reach 0 once server startup has completed. */
private final CountDownLatch startupCompleteLatch = new CountDownLatch(1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ public DatastoreException(String methodName, Code code, String message, Throwabl
this.code = code;
}

/** @return the canonical error code */
/**
* @return the canonical error code
*/
public Code getCode() {
return code;
}

/** @return the datastore method name */
/**
* @return the datastore method name
*/
public String getMethodName() {
return methodName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,9 @@ private static void setProjectEndpointFromEnv(DatastoreOptions.Builder options)
return;
}

/** @see #getOptionsFromEnv() */
/**
* @see #getOptionsFromEnv()
*/
public static Datastore getDatastoreFromEnv() throws GeneralSecurityException, IOException {
return DatastoreFactory.get().create(getOptionsFromEnv().build());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
class EndToEndChecksumHandler {
/** The checksum http header on http requests */
static final String HTTP_REQUEST_CHECKSUM_HEADER = "x-request-checksum-348659783";

/** The checksum http header on http responses */
static final String HTTP_RESPONSE_CHECKSUM_HEADER = "x-response-checksum-348659783";

Expand Down
Loading