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

Commit 3a2ddcf

Browse files
fix(v1beta1): migrate to grpc_service_config (#195)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/0ba72398-8b4b-493a-ae02-9b0d0d5410e7/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 321573684 Source-Link: googleapis/googleapis@fe31253
1 parent 448334a commit 3a2ddcf

File tree

5 files changed

+39
-39
lines changed

5 files changed

+39
-39
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
2020
<dependency>
2121
<groupId>com.google.cloud</groupId>
2222
<artifactId>libraries-bom</artifactId>
23-
<version>7.0.0</version>
23+
<version>8.1.0</version>
2424
<type>pom</type>
2525
<scope>import</scope>
2626
</dependency>

google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorGroupServiceStubSettings.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ public static class Builder extends StubSettings.Builder<ErrorGroupServiceStubSe
181181
ImmutableMap.Builder<String, ImmutableSet<StatusCode.Code>> definitions =
182182
ImmutableMap.builder();
183183
definitions.put(
184-
"idempotent",
184+
"retry_policy_1_codes",
185185
ImmutableSet.copyOf(
186186
Lists.<StatusCode.Code>newArrayList(
187-
StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
188-
definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
187+
StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED)));
188+
definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
189189
RETRYABLE_CODE_DEFINITIONS = definitions.build();
190190
}
191191

@@ -199,12 +199,14 @@ public static class Builder extends StubSettings.Builder<ErrorGroupServiceStubSe
199199
.setInitialRetryDelay(Duration.ofMillis(100L))
200200
.setRetryDelayMultiplier(1.3)
201201
.setMaxRetryDelay(Duration.ofMillis(60000L))
202-
.setInitialRpcTimeout(Duration.ofMillis(20000L))
202+
.setInitialRpcTimeout(Duration.ofMillis(600000L))
203203
.setRpcTimeoutMultiplier(1.0)
204-
.setMaxRpcTimeout(Duration.ofMillis(20000L))
204+
.setMaxRpcTimeout(Duration.ofMillis(600000L))
205205
.setTotalTimeout(Duration.ofMillis(600000L))
206206
.build();
207-
definitions.put("default", settings);
207+
definitions.put("retry_policy_1_params", settings);
208+
settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
209+
definitions.put("no_retry_params", settings);
208210
RETRY_PARAM_DEFINITIONS = definitions.build();
209211
}
210212

@@ -238,13 +240,13 @@ private static Builder initDefaults(Builder builder) {
238240

239241
builder
240242
.updateGroupSettings()
241-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
242-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
243+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
244+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
243245

244246
builder
245247
.getGroupSettings()
246-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
247-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
248+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
249+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
248250

249251
return builder;
250252
}

google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorStatsServiceStubSettings.java

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,11 @@ public static class Builder extends StubSettings.Builder<ErrorStatsServiceStubSe
326326
ImmutableMap.Builder<String, ImmutableSet<StatusCode.Code>> definitions =
327327
ImmutableMap.builder();
328328
definitions.put(
329-
"idempotent",
329+
"retry_policy_1_codes",
330330
ImmutableSet.copyOf(
331331
Lists.<StatusCode.Code>newArrayList(
332-
StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
333-
definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
332+
StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED)));
333+
definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
334334
RETRYABLE_CODE_DEFINITIONS = definitions.build();
335335
}
336336

@@ -344,12 +344,14 @@ public static class Builder extends StubSettings.Builder<ErrorStatsServiceStubSe
344344
.setInitialRetryDelay(Duration.ofMillis(100L))
345345
.setRetryDelayMultiplier(1.3)
346346
.setMaxRetryDelay(Duration.ofMillis(60000L))
347-
.setInitialRpcTimeout(Duration.ofMillis(20000L))
347+
.setInitialRpcTimeout(Duration.ofMillis(600000L))
348348
.setRpcTimeoutMultiplier(1.0)
349-
.setMaxRpcTimeout(Duration.ofMillis(20000L))
349+
.setMaxRpcTimeout(Duration.ofMillis(600000L))
350350
.setTotalTimeout(Duration.ofMillis(600000L))
351351
.build();
352-
definitions.put("default", settings);
352+
definitions.put("retry_policy_1_params", settings);
353+
settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
354+
definitions.put("no_retry_params", settings);
353355
RETRY_PARAM_DEFINITIONS = definitions.build();
354356
}
355357

@@ -386,18 +388,18 @@ private static Builder initDefaults(Builder builder) {
386388

387389
builder
388390
.deleteEventsSettings()
389-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
390-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
391+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
392+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
391393

392394
builder
393395
.listGroupStatsSettings()
394-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
395-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
396+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
397+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
396398

397399
builder
398400
.listEventsSettings()
399-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
400-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
401+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
402+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
401403

402404
return builder;
403405
}

google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ReportErrorsServiceStubSettings.java

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,9 @@ public static class Builder
175175
static {
176176
ImmutableMap.Builder<String, ImmutableSet<StatusCode.Code>> definitions =
177177
ImmutableMap.builder();
178+
definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
178179
definitions.put(
179-
"idempotent",
180-
ImmutableSet.copyOf(
181-
Lists.<StatusCode.Code>newArrayList(
182-
StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
183-
definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
180+
"no_retry_1_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
184181
RETRYABLE_CODE_DEFINITIONS = definitions.build();
185182
}
186183

@@ -189,17 +186,16 @@ public static class Builder
189186
static {
190187
ImmutableMap.Builder<String, RetrySettings> definitions = ImmutableMap.builder();
191188
RetrySettings settings = null;
189+
settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
190+
definitions.put("no_retry_params", settings);
192191
settings =
193192
RetrySettings.newBuilder()
194-
.setInitialRetryDelay(Duration.ofMillis(100L))
195-
.setRetryDelayMultiplier(1.3)
196-
.setMaxRetryDelay(Duration.ofMillis(60000L))
197-
.setInitialRpcTimeout(Duration.ofMillis(20000L))
193+
.setInitialRpcTimeout(Duration.ofMillis(600000L))
198194
.setRpcTimeoutMultiplier(1.0)
199-
.setMaxRpcTimeout(Duration.ofMillis(20000L))
195+
.setMaxRpcTimeout(Duration.ofMillis(600000L))
200196
.setTotalTimeout(Duration.ofMillis(600000L))
201197
.build();
202-
definitions.put("default", settings);
198+
definitions.put("no_retry_1_params", settings);
203199
RETRY_PARAM_DEFINITIONS = definitions.build();
204200
}
205201

@@ -231,8 +227,8 @@ private static Builder initDefaults(Builder builder) {
231227

232228
builder
233229
.reportErrorEventSettings()
234-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
235-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
230+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
231+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
236232

237233
return builder;
238234
}

synth.metadata

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/java-errorreporting.git",
7-
"sha": "5ea002b1d7f717d4ae7cf8b68b68bd2177b4f870"
7+
"sha": "448334a1aea40931db906bb14d2d029737867eca"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "googleapis",
1313
"remote": "https://github.com/googleapis/googleapis.git",
14-
"sha": "de8e811fc05b55cf7906c4fd65a1e174f454b02c",
15-
"internalRef": "316113675"
14+
"sha": "fe312530ec0a99b1e7e498253573ff70f2c6c6cb",
15+
"internalRef": "321573684"
1616
}
1717
},
1818
{

0 commit comments

Comments
 (0)