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

Commit 30cb933

Browse files
fix: migrate to grpc_service_config (#183)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/a3e09c0b-006d-4d98-8e96-744af862718e/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 317698083 Source-Link: googleapis/googleapis@e2022be
1 parent 1026e15 commit 30cb933

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

README.md

+1-1
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>

google-cloud-iamcredentials/src/main/java/com/google/cloud/iam/credentials/v1/stub/IamCredentialsStubSettings.java

+17-15
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,11 @@ public static class Builder extends StubSettings.Builder<IamCredentialsStubSetti
208208
ImmutableMap.Builder<String, ImmutableSet<StatusCode.Code>> definitions =
209209
ImmutableMap.builder();
210210
definitions.put(
211-
"idempotent",
211+
"retry_policy_1_codes",
212212
ImmutableSet.copyOf(
213213
Lists.<StatusCode.Code>newArrayList(
214-
StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
215-
definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
214+
StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED)));
215+
definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
216216
RETRYABLE_CODE_DEFINITIONS = definitions.build();
217217
}
218218

@@ -226,12 +226,14 @@ public static class Builder extends StubSettings.Builder<IamCredentialsStubSetti
226226
.setInitialRetryDelay(Duration.ofMillis(100L))
227227
.setRetryDelayMultiplier(1.3)
228228
.setMaxRetryDelay(Duration.ofMillis(60000L))
229-
.setInitialRpcTimeout(Duration.ofMillis(20000L))
229+
.setInitialRpcTimeout(Duration.ofMillis(60000L))
230230
.setRpcTimeoutMultiplier(1.0)
231-
.setMaxRpcTimeout(Duration.ofMillis(20000L))
232-
.setTotalTimeout(Duration.ofMillis(600000L))
231+
.setMaxRpcTimeout(Duration.ofMillis(60000L))
232+
.setTotalTimeout(Duration.ofMillis(60000L))
233233
.build();
234-
definitions.put("default", settings);
234+
definitions.put("retry_policy_1_params", settings);
235+
settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
236+
definitions.put("no_retry_params", settings);
235237
RETRY_PARAM_DEFINITIONS = definitions.build();
236238
}
237239

@@ -273,23 +275,23 @@ private static Builder initDefaults(Builder builder) {
273275

274276
builder
275277
.generateAccessTokenSettings()
276-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
277-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
278+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
279+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
278280

279281
builder
280282
.generateIdTokenSettings()
281-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
282-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
283+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
284+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
283285

284286
builder
285287
.signBlobSettings()
286-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
287-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
288+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
289+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
288290

289291
builder
290292
.signJwtSettings()
291-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
292-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
293+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
294+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
293295

294296
return builder;
295297
}

synth.metadata

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/java-iamcredentials.git",
7-
"sha": "b99221b17b17537c81175bc2b877e8bb91840760"
7+
"sha": "1026e15ec0cfaf083690d79f74cbc323d772ffeb"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "googleapis",
1313
"remote": "https://github.com/googleapis/googleapis.git",
14-
"sha": "c4e37010d74071851ff24121f522e802231ac86e",
15-
"internalRef": "313460921"
14+
"sha": "e2022bea2cd3273b0e42e0ac034d08c16aaa0ea0",
15+
"internalRef": "317698083"
1616
}
1717
},
1818
{

0 commit comments

Comments
 (0)