Skip to content

Commit 1719f44

Browse files
chore: Update generation configuration at Fri Sep 27 02:24:50 UTC 2024 (#3302)
* chore: Update generation configuration at Sat Aug 24 02:16:11 UTC 2024 * chore: Update generation configuration at Tue Aug 27 02:17:36 UTC 2024 * chore: Update generation configuration at Wed Aug 28 02:18:15 UTC 2024 * chore: Update generation configuration at Thu Aug 29 02:19:05 UTC 2024 * chore: generate libraries at Thu Aug 29 02:19:34 UTC 2024 * chore: Update generation configuration at Fri Aug 30 02:19:50 UTC 2024 * chore: Update generation configuration at Sat Aug 31 02:32:13 UTC 2024 * chore: Update generation configuration at Wed Sep 4 02:19:51 UTC 2024 * chore: Update generation configuration at Thu Sep 5 02:20:21 UTC 2024 * chore: Update generation configuration at Fri Sep 6 02:20:09 UTC 2024 * chore: Update generation configuration at Sat Sep 7 02:18:29 UTC 2024 * chore: Update generation configuration at Sun Sep 8 02:23:55 UTC 2024 * chore: Update generation configuration at Tue Sep 10 02:21:14 UTC 2024 * chore: Update generation configuration at Tue Sep 10 19:32:36 UTC 2024 * chore: generate libraries at Tue Sep 10 19:33:01 UTC 2024 * chore: Update generation configuration at Wed Sep 11 02:20:26 UTC 2024 * chore: Update generation configuration at Thu Sep 12 02:20:51 UTC 2024 * chore: Update generation configuration at Fri Sep 13 02:21:29 UTC 2024 * chore: Update generation configuration at Sat Sep 14 02:19:43 UTC 2024 * chore: Update generation configuration at Mon Sep 16 02:26:06 UTC 2024 * chore: Update generation configuration at Tue Sep 17 02:09:22 UTC 2024 * chore: Update generation configuration at Wed Sep 18 02:21:23 UTC 2024 * chore: Update generation configuration at Thu Sep 19 02:23:01 UTC 2024 * chore: generate libraries at Thu Sep 19 02:23:29 UTC 2024 * chore: Update generation configuration at Fri Sep 20 02:22:38 UTC 2024 * chore: generate libraries at Fri Sep 20 02:24:34 UTC 2024 * chore: Update generation configuration at Sat Sep 21 02:21:05 UTC 2024 * chore: Update generation configuration at Tue Sep 24 02:24:46 UTC 2024 * chore: Update generation configuration at Wed Sep 25 02:25:21 UTC 2024 * update gen script * chore: generate libraries at Wed Sep 25 23:54:38 UTC 2024 * chore: Update generation configuration at Thu Sep 26 02:24:15 UTC 2024 * chore: Update generation configuration at Fri Sep 27 02:24:50 UTC 2024 --------- Co-authored-by: Joe Wang <[email protected]>
1 parent e3cafd7 commit 1719f44

File tree

437 files changed

+760
-506
lines changed

Some content is hidden

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

437 files changed

+760
-506
lines changed

.github/scripts/hermetic_library_generation.sh

+22-23
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,24 @@ message="chore: generate libraries at $(date)"
6767

6868
git checkout "${target_branch}"
6969
git checkout "${current_branch}"
70-
# if the last commit doesn't contain changes to generation configuration,
71-
# do not generate again as the result will be the same.
72-
change_of_last_commit="$(git diff-tree --no-commit-id --name-only HEAD~1..HEAD -r)"
73-
if [[ ! ("${change_of_last_commit}" == *"${generation_config}"*) ]]; then
74-
echo "The last commit doesn't contain any changes to the generation_config.yaml, skipping the whole generation process." || true
75-
exit 0
76-
fi
70+
7771
# copy generation configuration from target branch to current branch.
7872
git show "${target_branch}":"${generation_config}" > "${baseline_generation_config}"
79-
config_diff=$(diff "${generation_config}" "${baseline_generation_config}" || true)
8073

8174
# parse image tag from the generation configuration.
8275
image_tag=$(grep "gapic_generator_version" "${generation_config}" | cut -d ':' -f 2 | xargs)
8376

77+
repo_root_dir=$(pwd)
78+
mkdir -p "${repo_root_dir}/output"
79+
# download api definitions from googleapis repository
80+
googleapis_commitish=$(grep googleapis_commitish "${generation_config}" | cut -d ":" -f 2 | xargs)
81+
api_def_dir=$(mktemp -d)
82+
git clone https://github.com/googleapis/googleapis.git "${api_def_dir}"
83+
pushd "${api_def_dir}"
84+
git checkout "${googleapis_commitish}"
85+
cp -r google/ grafeas/ "${repo_root_dir}/output"
86+
popd
87+
8488
# run hermetic code generation docker image.
8589
docker run \
8690
--rm \
@@ -90,26 +94,21 @@ docker run \
9094
--baseline-generation-config-path="${workspace_name}/${baseline_generation_config}" \
9195
--current-generation-config-path="${workspace_name}/${generation_config}"
9296

97+
# remove api definitions after generation
98+
rm -rf "${api_def_dir}"
9399

94100
# commit the change to the pull request.
95-
if [[ $(basename $(pwd)) == "google-cloud-java" ]]; then
96-
git add java-* pom.xml gapic-libraries-bom/pom.xml versions.txt
97-
else
98-
# The image leaves intermediate folders and files it works with. Here we remove them
99-
rm -rdf output googleapis "${baseline_generation_config}"
100-
git add --all -- ':!pr_description.txt'
101-
fi
101+
rm -rdf output googleapis "${baseline_generation_config}"
102+
git add --all -- ':!pr_description.txt' ':!hermetic_library_generation.sh'
102103
changed_files=$(git diff --cached --name-only)
103-
if [[ "${changed_files}" == "" ]]; then
104-
echo "There is no generated code change with the generation config change ${config_diff}."
105-
echo "Skip committing to the pull request."
106-
exit 0
104+
if [[ "${changed_files}" != "" ]]; then
105+
echo "Commit changes..."
106+
git commit -m "${message}"
107+
git push
108+
else
109+
echo "There is no generated code change, skip commit."
107110
fi
108111

109-
echo "Configuration diff:"
110-
echo "${config_diff}"
111-
git commit -m "${message}"
112-
git push
113112
# set pr body if pr_description.txt is generated.
114113
if [[ -f "pr_description.txt" ]]; then
115114
pr_num=$(gh pr list -s open -H "${current_branch}" -q . --json number | jq ".[] | .number")

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
1919
<dependency>
2020
<groupId>com.google.cloud</groupId>
2121
<artifactId>libraries-bom</artifactId>
22-
<version>26.43.0</version>
22+
<version>26.44.0</version>
2323
<type>pom</type>
2424
<scope>import</scope>
2525
</dependency>
@@ -42,28 +42,28 @@ If you are using Maven without the BOM, add this to your dependencies:
4242
<dependency>
4343
<groupId>com.google.cloud</groupId>
4444
<artifactId>google-cloud-spanner</artifactId>
45-
<version>6.71.0</version>
45+
<version>6.72.0</version>
4646
</dependency>
4747

4848
```
4949

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

5252
```Groovy
53-
implementation platform('com.google.cloud:libraries-bom:26.44.0')
53+
implementation platform('com.google.cloud:libraries-bom:26.47.0')
5454
5555
implementation 'com.google.cloud:google-cloud-spanner'
5656
```
5757
If you are using Gradle without BOM, add this to your dependencies:
5858

5959
```Groovy
60-
implementation 'com.google.cloud:google-cloud-spanner:6.71.0'
60+
implementation 'com.google.cloud:google-cloud-spanner:6.73.0'
6161
```
6262

6363
If you are using SBT, add this to your dependencies:
6464

6565
```Scala
66-
libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.71.0"
66+
libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.73.0"
6767
```
6868
<!-- {x-version-update-end} -->
6969

@@ -561,6 +561,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-spanner/tree/
561561
| Restore Backup With Encryption Key | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/RestoreBackupWithEncryptionKey.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/RestoreBackupWithEncryptionKey.java) |
562562
| Set Max Commit Delay Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/SetMaxCommitDelaySample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/SetMaxCommitDelaySample.java) |
563563
| Singer Proto | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/SingerProto.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/SingerProto.java) |
564+
| Spanner Graph Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/SpannerGraphSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/SpannerGraphSample.java) |
564565
| Spanner Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/SpannerSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/SpannerSample.java) |
565566
| Statement Timeout Example | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/StatementTimeoutExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/StatementTimeoutExample.java) |
566567
| Tag Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/TagSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/TagSample.java) |
@@ -716,7 +717,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
716717
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java11.html
717718
[stability-image]: https://img.shields.io/badge/stability-stable-green
718719
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-spanner.svg
719-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.71.0
720+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.73.0
720721
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
721722
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
722723
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

generation_config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
gapic_generator_version: 2.44.0
2-
googleapis_commitish: 6f3c628e7fc39b5ca7186aba1a67ae39454d0752
3-
libraries_bom_version: 26.44.0
1+
gapic_generator_version: 2.46.1
2+
googleapis_commitish: 005df4681b89bd204a90b76168a6dc9d9e7bf4fe
3+
libraries_bom_version: 26.47.0
44
libraries:
55
- api_shortname: spanner
66
name_pretty: Cloud Spanner

google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/SpannerExecutorProxySettings.java

+15-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
5050
* build() is called, the tree of builders is called to create the complete settings object.
5151
*
52-
* <p>For example, to set the total timeout of executeActionAsync to 30 seconds:
52+
* <p>For example, to set the
53+
* [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
54+
* of executeActionAsync:
5355
*
5456
* <pre>{@code
5557
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -66,11 +68,22 @@
6668
* .executeActionAsyncSettings()
6769
* .getRetrySettings()
6870
* .toBuilder()
69-
* .setTotalTimeout(Duration.ofSeconds(30))
71+
* .setInitialRetryDelayDuration(Duration.ofSeconds(1))
72+
* .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
73+
* .setMaxAttempts(5)
74+
* .setMaxRetryDelayDuration(Duration.ofSeconds(30))
75+
* .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
76+
* .setRetryDelayMultiplier(1.3)
77+
* .setRpcTimeoutMultiplier(1.5)
78+
* .setTotalTimeoutDuration(Duration.ofSeconds(300))
7079
* .build());
7180
* SpannerExecutorProxySettings spannerExecutorProxySettings =
7281
* spannerExecutorProxySettingsBuilder.build();
7382
* }</pre>
83+
*
84+
* Please refer to the [Client Side Retry
85+
* Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
86+
* additional support in setting retries.
7487
*/
7588
@Generated("by gapic-generator-java")
7689
public class SpannerExecutorProxySettings extends ClientSettings<SpannerExecutorProxySettings> {

google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/SpannerExecutorProxyStubSettings.java

+15-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@
5858
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
5959
* build() is called, the tree of builders is called to create the complete settings object.
6060
*
61-
* <p>For example, to set the total timeout of executeActionAsync to 30 seconds:
61+
* <p>For example, to set the
62+
* [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
63+
* of executeActionAsync:
6264
*
6365
* <pre>{@code
6466
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -75,11 +77,22 @@
7577
* .executeActionAsyncSettings()
7678
* .getRetrySettings()
7779
* .toBuilder()
78-
* .setTotalTimeout(Duration.ofSeconds(30))
80+
* .setInitialRetryDelayDuration(Duration.ofSeconds(1))
81+
* .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
82+
* .setMaxAttempts(5)
83+
* .setMaxRetryDelayDuration(Duration.ofSeconds(30))
84+
* .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
85+
* .setRetryDelayMultiplier(1.3)
86+
* .setRpcTimeoutMultiplier(1.5)
87+
* .setTotalTimeoutDuration(Duration.ofSeconds(300))
7988
* .build());
8089
* SpannerExecutorProxyStubSettings spannerExecutorProxySettings =
8190
* spannerExecutorProxySettingsBuilder.build();
8291
* }</pre>
92+
*
93+
* Please refer to the [Client Side Retry
94+
* Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
95+
* additional support in setting retries.
8396
*/
8497
@Generated("by gapic-generator-java")
8598
public class SpannerExecutorProxyStubSettings

google-cloud-spanner-executor/src/main/resources/META-INF/native-image/com.google.cloud.spanner.executor.v1/reflect-config.json

+18
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,24 @@
305305
"allDeclaredClasses": true,
306306
"allPublicClasses": true
307307
},
308+
{
309+
"name": "com.google.api.PythonSettings$ExperimentalFeatures",
310+
"queryAllDeclaredConstructors": true,
311+
"queryAllPublicConstructors": true,
312+
"queryAllDeclaredMethods": true,
313+
"allPublicMethods": true,
314+
"allDeclaredClasses": true,
315+
"allPublicClasses": true
316+
},
317+
{
318+
"name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder",
319+
"queryAllDeclaredConstructors": true,
320+
"queryAllPublicConstructors": true,
321+
"queryAllDeclaredMethods": true,
322+
"allPublicMethods": true,
323+
"allDeclaredClasses": true,
324+
"allPublicClasses": true
325+
},
308326
{
309327
"name": "com.google.api.ResourceDescriptor",
310328
"queryAllDeclaredConstructors": true,

google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminSettings.java

+40-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@
101101
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
102102
* build() is called, the tree of builders is called to create the complete settings object.
103103
*
104-
* <p>For example, to set the total timeout of getDatabase to 30 seconds:
104+
* <p>For example, to set the
105+
* [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
106+
* of getDatabase:
105107
*
106108
* <pre>{@code
107109
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -117,10 +119,46 @@
117119
* .getDatabaseSettings()
118120
* .getRetrySettings()
119121
* .toBuilder()
120-
* .setTotalTimeout(Duration.ofSeconds(30))
122+
* .setInitialRetryDelayDuration(Duration.ofSeconds(1))
123+
* .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
124+
* .setMaxAttempts(5)
125+
* .setMaxRetryDelayDuration(Duration.ofSeconds(30))
126+
* .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
127+
* .setRetryDelayMultiplier(1.3)
128+
* .setRpcTimeoutMultiplier(1.5)
129+
* .setTotalTimeoutDuration(Duration.ofSeconds(300))
121130
* .build());
122131
* DatabaseAdminSettings databaseAdminSettings = databaseAdminSettingsBuilder.build();
123132
* }</pre>
133+
*
134+
* Please refer to the [Client Side Retry
135+
* Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
136+
* additional support in setting retries.
137+
*
138+
* <p>To configure the RetrySettings of a Long Running Operation method, create an
139+
* OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
140+
* configure the RetrySettings for createDatabase:
141+
*
142+
* <pre>{@code
143+
* // This snippet has been automatically generated and should be regarded as a code template only.
144+
* // It will require modifications to work:
145+
* // - It may require correct/in-range values for request initialization.
146+
* // - It may require specifying regional endpoints when creating the service client as shown in
147+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
148+
* DatabaseAdminSettings.Builder databaseAdminSettingsBuilder = DatabaseAdminSettings.newBuilder();
149+
* TimedRetryAlgorithm timedRetryAlgorithm =
150+
* OperationalTimedPollAlgorithm.create(
151+
* RetrySettings.newBuilder()
152+
* .setInitialRetryDelayDuration(Duration.ofMillis(500))
153+
* .setRetryDelayMultiplier(1.5)
154+
* .setMaxRetryDelay(Duration.ofMillis(5000))
155+
* .setTotalTimeoutDuration(Duration.ofHours(24))
156+
* .build());
157+
* databaseAdminSettingsBuilder
158+
* .createClusterOperationSettings()
159+
* .setPollingAlgorithm(timedRetryAlgorithm)
160+
* .build();
161+
* }</pre>
124162
*/
125163
@Generated("by gapic-generator-java")
126164
public class DatabaseAdminSettings extends ClientSettings<DatabaseAdminSettings> {

0 commit comments

Comments
 (0)