Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit d235323

Browse files
fix: migrate to grpc_service_config (#194)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/9c18038c-d1ba-45ab-9ded-a79e3b7a4d1b/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 317872942 Source-Link: googleapis/googleapis@df995b6
1 parent 13615ff commit d235323

3 files changed

Lines changed: 22 additions & 26 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
1717
<dependency>
1818
<groupId>com.google.cloud</groupId>
1919
<artifactId>libraries-bom</artifactId>
20-
<version>7.0.0</version>
20+
<version>7.0.1</version>
2121
<type>pom</type>
2222
<scope>import</scope>
2323
</dependency>
@@ -47,11 +47,11 @@ If you are using Maven without BOM, add this to your dependencies:
4747

4848
If you are using Gradle, add this to your dependencies
4949
```Groovy
50-
compile 'com.google.cloud:google-cloud-containeranalysis:1.1.0'
50+
compile 'com.google.cloud:google-cloud-containeranalysis:1.0.0'
5151
```
5252
If you are using SBT, add this to your dependencies
5353
```Scala
54-
libraryDependencies += "com.google.cloud" % "google-cloud-containeranalysis" % "1.1.0"
54+
libraryDependencies += "com.google.cloud" % "google-cloud-containeranalysis" % "1.0.0"
5555
```
5656
[//]: # ({x-version-update-end})
5757

google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/ContainerAnalysisStubSettings.java

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,9 @@ public static class Builder extends StubSettings.Builder<ContainerAnalysisStubSe
193193
static {
194194
ImmutableMap.Builder<String, ImmutableSet<StatusCode.Code>> definitions =
195195
ImmutableMap.builder();
196+
definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
196197
definitions.put(
197-
"idempotent",
198-
ImmutableSet.copyOf(
199-
Lists.<StatusCode.Code>newArrayList(
200-
StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
201-
definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
198+
"no_retry_1_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
202199
RETRYABLE_CODE_DEFINITIONS = definitions.build();
203200
}
204201

@@ -207,17 +204,16 @@ public static class Builder extends StubSettings.Builder<ContainerAnalysisStubSe
207204
static {
208205
ImmutableMap.Builder<String, RetrySettings> definitions = ImmutableMap.builder();
209206
RetrySettings settings = null;
207+
settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
208+
definitions.put("no_retry_params", settings);
210209
settings =
211210
RetrySettings.newBuilder()
212-
.setInitialRetryDelay(Duration.ofMillis(100L))
213-
.setRetryDelayMultiplier(1.3)
214-
.setMaxRetryDelay(Duration.ofMillis(60000L))
215-
.setInitialRpcTimeout(Duration.ofMillis(20000L))
211+
.setInitialRpcTimeout(Duration.ofMillis(30000L))
216212
.setRpcTimeoutMultiplier(1.0)
217-
.setMaxRpcTimeout(Duration.ofMillis(20000L))
218-
.setTotalTimeout(Duration.ofMillis(600000L))
213+
.setMaxRpcTimeout(Duration.ofMillis(30000L))
214+
.setTotalTimeout(Duration.ofMillis(30000L))
219215
.build();
220-
definitions.put("default", settings);
216+
definitions.put("no_retry_1_params", settings);
221217
RETRY_PARAM_DEFINITIONS = definitions.build();
222218
}
223219

@@ -254,18 +250,18 @@ private static Builder initDefaults(Builder builder) {
254250

255251
builder
256252
.setIamPolicySettings()
257-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
258-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
253+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
254+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
259255

260256
builder
261257
.getIamPolicySettings()
262-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
263-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
258+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
259+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
264260

265261
builder
266262
.testIamPermissionsSettings()
267-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
268-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
263+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
264+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
269265

270266
return builder;
271267
}

synth.metadata

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/java-containeranalysis.git",
7-
"sha": "9223f7d5d08204f350fbf8e96024115dd38e7168"
7+
"sha": "7cc6a757b4f24e59a15915c1913304ffe921f0ea"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "googleapis",
1313
"remote": "https://github.com/googleapis/googleapis.git",
14-
"sha": "c4e37010d74071851ff24121f522e802231ac86e",
15-
"internalRef": "313460921"
14+
"sha": "df995b638ec02863323051599f1b4c41102ce211",
15+
"internalRef": "317872942"
1616
}
1717
},
1818
{
1919
"git": {
2020
"name": "googleapis",
2121
"remote": "https://github.com/googleapis/googleapis.git",
22-
"sha": "c4e37010d74071851ff24121f522e802231ac86e",
23-
"internalRef": "313460921"
22+
"sha": "df995b638ec02863323051599f1b4c41102ce211",
23+
"internalRef": "317872942"
2424
}
2525
},
2626
{

0 commit comments

Comments
 (0)