Skip to content

Commit 11bfd90

Browse files
chore: Update generation configuration at Sun Apr 27 02:31:07 UTC 2025 (#3834)
* chore: Update generation configuration at Wed Apr 23 17:11:13 UTC 2025 * chore: Update generation configuration at Thu Apr 24 02:30:05 UTC 2025 * fix: manually update generator versions * chore: update libraries bom, fix unparsable file * chore: generate libraries at Thu Apr 24 15:01:58 UTC 2025 * chore: generate libraries at Thu Apr 24 15:05:17 UTC 2025 * chore: generate libraries at Thu Apr 24 15:08:27 UTC 2025 * chore: generate libraries at Thu Apr 24 15:11:40 UTC 2025 * chore: use spotify fmt plugin in build.sh * chore: remove old graalvm jobs * chore: Update generation configuration at Fri Apr 25 02:30:09 UTC 2025 * chore: Update generation configuration at Sat Apr 26 02:28:07 UTC 2025 * chore: Update generation configuration at Sun Apr 27 02:31:07 UTC 2025 --------- Co-authored-by: Diego Marquez <[email protected]>
1 parent 5783116 commit 11bfd90

File tree

579 files changed

+14896
-2250
lines changed

Some content is hidden

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

579 files changed

+14896
-2250
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/trusted-contribution.yml

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
trustedContributors:
22
- renovate-bot
33
- gcf-owl-bot[bot]
4+
5+
annotations:
6+
- type: comment
7+
text: "/gcbrun"
8+
- type: label
9+
text: "kokoro:force-run"

.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/update_generation_config.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ test)
8282
RETURN_CODE=$?
8383
;;
8484
lint)
85-
mvn com.coveo:fmt-maven-plugin:check
85+
mvn com.spotify.fmt:fmt-maven-plugin:check
8686
RETURN_CODE=$?
8787
;;
8888
javadoc)

.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
@@ -30,4 +30,9 @@ env_vars: {
3030
env_vars: {
3131
key: "SECRET_MANAGER_KEYS"
3232
value: "java-it-service-account"
33+
}
34+
35+
env_vars: {
36+
key: "IT_SERVICE_ACCOUNT_EMAIL"
37+
3338
}
+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+
}

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Code in this repo is formatted with
8484
[google-java-format](https://github.com/google/google-java-format).
8585
To run formatting on your project, you can run:
8686
```
87-
mvn com.coveo:fmt-maven-plugin:format
87+
mvn com.spotify.fmt:fmt-maven-plugin:format
8888
```
8989

9090
[1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account

README.md

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

5151
```Groovy
52-
implementation platform('com.google.cloud:libraries-bom:26.57.0')
52+
implementation platform('com.google.cloud:libraries-bom:26.59.0')
5353
5454
implementation 'com.google.cloud:google-cloud-spanner'
5555
```

benchmarks/src/main/java/com/google/cloud/spanner/benchmark/LatencyBenchmark.java

+10-4
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ public static void main(String[] args) throws ParseException {
4848
String.format("projects/%s/instances/%s/databases/%s", project, instance, database);
4949
} else {
5050
throw new IllegalArgumentException(
51-
"You must either set all the environment variables SPANNER_CLIENT_BENCHMARK_GOOGLE_CLOUD_PROJECT, SPANNER_CLIENT_BENCHMARK_SPANNER_INSTANCE and SPANNER_CLIENT_BENCHMARK_SPANNER_DATABASE, or specify a value for the command line argument --database");
51+
"You must either set all the environment variables"
52+
+ " SPANNER_CLIENT_BENCHMARK_GOOGLE_CLOUD_PROJECT,"
53+
+ " SPANNER_CLIENT_BENCHMARK_SPANNER_INSTANCE and"
54+
+ " SPANNER_CLIENT_BENCHMARK_SPANNER_DATABASE, or specify a value for the command"
55+
+ " line argument --database");
5256
}
5357

5458
LatencyBenchmark benchmark = new LatencyBenchmark(DatabaseId.of(fullyQualifiedDatabase));
@@ -69,13 +73,15 @@ private static CommandLine parseCommandLine(String[] args) throws ParseException
6973
"w",
7074
"wait",
7175
true,
72-
"The wait time in milliseconds between each query that is executed by each client. Defaults to 0. "
73-
+ "Set this to for example 1000 to have each client execute 1 query per second.");
76+
"The wait time in milliseconds between each query that is executed by each client. Defaults"
77+
+ " to 0. Set this to for example 1000 to have each client execute 1 query per"
78+
+ " second.");
7479
options.addOption(
7580
"t",
7681
"transaction",
7782
true,
78-
"The type of transaction to execute. Must be either READ_ONLY or READ_WRITE. Defaults to READ_ONLY.");
83+
"The type of transaction to execute. Must be either READ_ONLY or READ_WRITE. Defaults to"
84+
+ " READ_ONLY.");
7985
options.addOption("m", "multiplexed", true, "Use multiplexed sessions. Defaults to false.");
8086
options.addOption("w", "wait", true, "Wait time in millis. Defaults to zero.");
8187
options.addOption("name", true, "Name of this test run");

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: 0c142cc0ed988797104f3c934b0d5cfe0906b948
3-
libraries_bom_version: 26.57.0
1+
gapic_generator_version: 2.56.2
2+
googleapis_commitish: 2eec62dc7ed836c8d9f73fb313afb8f48c361bef
3+
libraries_bom_version: 26.59.0
44
libraries:
55
- api_shortname: spanner
66
name_pretty: Cloud Spanner

google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ public synchronized boolean finish(Mode finishMode) throws Exception {
424424
}
425425
}
426426
}
427+
427428
/**
428429
* All the context in which SpannerActions are executed. It stores the current running transaction
429430
* and table metadata, shared by all the action executor and protected by a lock. There will only
@@ -790,7 +791,7 @@ private synchronized Spanner getClient(boolean useMultiplexedSession) throws IOE
790791
if (client != null) {
791792
return client;
792793
}
793-
client = getClient(/*timeoutSeconds=*/ 0, useMultiplexedSession);
794+
client = getClient(/* timeoutSeconds= */ 0, useMultiplexedSession);
794795
return client;
795796
}
796797

@@ -1021,7 +1022,7 @@ private Status executeAction(
10211022
return executeFinishTxn(action.getFinish(), outcomeSender, executionContext);
10221023
} else if (action.hasMutation()) {
10231024
return executeMutation(
1024-
action.getMutation(), outcomeSender, executionContext, /*isWrite=*/ false);
1025+
action.getMutation(), outcomeSender, executionContext, /* isWrite= */ false);
10251026
} else if (action.hasRead()) {
10261027
return executeRead(
10271028
useMultiplexedSession, action.getRead(), outcomeSender, executionContext);
@@ -1035,7 +1036,7 @@ private Status executeAction(
10351036
return executeCloudBatchDmlUpdates(action.getBatchDml(), outcomeSender, executionContext);
10361037
} else if (action.hasWrite()) {
10371038
return executeMutation(
1038-
action.getWrite().getMutation(), outcomeSender, executionContext, /*isWrite=*/ true);
1039+
action.getWrite().getMutation(), outcomeSender, executionContext, /* isWrite= */ true);
10391040
} else if (action.hasStartBatchTxn()) {
10401041
if (dbPath == null) {
10411042
throw SpannerExceptionFactory.newSpannerException(
@@ -3197,7 +3198,7 @@ private static com.google.cloud.spanner.KeyRange keyRangeProtoToCloudKeyRange(
31973198
return KeyRange.openClosed(start, end);
31983199
case OPEN_OPEN:
31993200
return KeyRange.openOpen(start, end);
3200-
// Unreachable.
3201+
// Unreachable.
32013202
default:
32023203
throw SpannerExceptionFactory.newSpannerException(
32033204
ErrorCode.INVALID_ARGUMENT, "Unrecognized key range type");
@@ -3250,7 +3251,7 @@ private static com.google.cloud.spanner.Key keyProtoToCloudKey(
32503251
case BYTES:
32513252
cloudKey.append(toByteArray(part.getBytesValue()));
32523253
break;
3253-
// Unreachable
3254+
// Unreachable
32543255
default:
32553256
throw SpannerExceptionFactory.newSpannerException(
32563257
ErrorCode.INVALID_ARGUMENT, "Unsupported key part type: " + type.getCode().name());

google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudExecutor.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,9 @@ private Status flush() {
368368
LOGGER.log(
369369
Level.INFO,
370370
String.format(
371-
"OutcomeSender with action ID %s for change stream %s and partition token %s is "
372-
+ "sending data change records with the following transaction id/record sequence "
373-
+ "combinations: %s and partition tokens: %s",
371+
"OutcomeSender with action ID %s for change stream %s and partition token %s is"
372+
+ " sending data change records with the following transaction id/record"
373+
+ " sequence combinations: %s and partition tokens: %s",
374374
this.changeStreamForQuery,
375375
this.partitionTokenForQuery,
376376
actionId,

google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudExecutorImpl.java

+2-9
Original file line numberDiff line numberDiff line change
@@ -91,21 +91,14 @@ public void onNext(SpannerAsyncActionRequest request) {
9191
SessionPoolOptions.Builder sessionPoolOptionsBuilder;
9292
if (request.getAction().getSpannerOptions().hasSessionPoolOptions()) {
9393
sessionPoolOptionsBuilder =
94-
request
95-
.getAction()
96-
.getSpannerOptions()
97-
.getSessionPoolOptions()
98-
.toBuilder()
94+
request.getAction().getSpannerOptions().getSessionPoolOptions().toBuilder()
9995
.setUseMultiplexed(true);
10096
} else {
10197
sessionPoolOptionsBuilder = SessionPoolOptions.newBuilder().setUseMultiplexed(true);
10298
}
10399

104100
SpannerOptions.Builder optionsBuilder =
105-
request
106-
.getAction()
107-
.getSpannerOptions()
108-
.toBuilder()
101+
request.getAction().getSpannerOptions().toBuilder()
109102
.setSessionPoolOptions(sessionPoolOptionsBuilder);
110103
SpannerAction.Builder actionBuilder =
111104
request.getAction().toBuilder().setSpannerOptions(optionsBuilder);

google-cloud-spanner-executor/src/test/java/com/google/cloud/spanner/executor/v1/MockSpannerExecutorProxyImpl.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ public void onNext(SpannerAsyncActionRequest value) {
7777
responseObserver.onError(
7878
new IllegalArgumentException(
7979
String.format(
80-
"Unrecognized response type %s for method ExecuteActionAsync, expected %s or %s",
80+
"Unrecognized response type %s for method ExecuteActionAsync, expected %s"
81+
+ " or %s",
8182
response == null ? "null" : response.getClass().getName(),
8283
SpannerAsyncActionResponse.class.getName(),
8384
Exception.class.getName())));

google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractReadContext.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ ResultSet executeQueryInternalWithOptions(
793793
options.hasPrefetchChunks() ? options.prefetchChunks() : defaultPrefetchChunks;
794794
final ExecuteSqlRequest.Builder request =
795795
getExecuteSqlRequestBuilder(
796-
statement, queryMode, options, /* withTransactionSelector = */ false);
796+
statement, queryMode, options, /* withTransactionSelector= */ false);
797797
ResumableStreamIterator stream =
798798
new ResumableStreamIterator(
799799
MAX_BUFFERED_CHUNKS,
@@ -1036,7 +1036,7 @@ CloseableIterator<PartialResultSet> startStream(
10361036
getTransactionChannelHint(),
10371037
isRouteToLeader());
10381038
session.markUsed(clock.instant());
1039-
stream.setCall(call, /* withBeginTransaction = */ builder.getTransaction().hasBegin());
1039+
stream.setCall(call, /* withBeginTransaction= */ builder.getTransaction().hasBegin());
10401040
return stream;
10411041
}
10421042

google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSetImpl.java

+3
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ private enum State {
9191

9292
private final BlockingDeque<Struct> buffer;
9393
private Struct currentRow;
94+
9495
/** Supplies the underlying synchronous {@link ResultSet} that will be producing the rows. */
9596
private final Supplier<ResultSet> delegateResultSet;
9697

@@ -137,11 +138,13 @@ private enum State {
137138
* production of rows that are put into the buffer is only paused once the buffer is full.
138139
*/
139140
private volatile CountDownLatch pausedLatch = new CountDownLatch(1);
141+
140142
/**
141143
* This variable is used to pause the producer when the buffer is full and the consumer needs some
142144
* time to catch up.
143145
*/
144146
private volatile CountDownLatch bufferConsumptionLatch = new CountDownLatch(0);
147+
145148
/**
146149
* This variable is used to pause the producer when all rows have been put into the buffer, but
147150
* the consumer (the callback) has not yet received and processed all rows.

google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncTransactionManagerImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private ApiFuture<TransactionContext> internalBeginAsync(
106106

107107
txn =
108108
session.newTransaction(
109-
options, /* previousTransactionId = */ multiplexedSessionPreviousTransactionId);
109+
options, /* previousTransactionId= */ multiplexedSessionPreviousTransactionId);
110110
if (firstAttempt) {
111111
session.setActive(this);
112112
}

google-cloud-spanner/src/main/java/com/google/cloud/spanner/BatchClient.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,6 @@ public interface BatchClient {
6767
*/
6868
default String getDatabaseRole() {
6969
throw new UnsupportedOperationException("method should be overwritten");
70-
};
70+
}
71+
;
7172
}

0 commit comments

Comments
 (0)