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

Commit dbfed4d

Browse files
fix: Fix service namespace in grpc_service_config (#157)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/a345ccba-8a24-4c06-840c-fcbe9eb93e77/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 360443299 Source-Link: googleapis/googleapis@7cef880
1 parent 6fa3303 commit dbfed4d

File tree

2 files changed

+46
-20
lines changed

2 files changed

+46
-20
lines changed

google-cloud-functions/src/main/java/com/google/cloud/functions/v1/stub/CloudFunctionsServiceStubSettings.java

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,13 @@ public static class Builder
392392
static {
393393
ImmutableMap.Builder<String, ImmutableSet<StatusCode.Code>> definitions =
394394
ImmutableMap.builder();
395+
definitions.put(
396+
"retry_policy_0_codes",
397+
ImmutableSet.copyOf(
398+
Lists.<StatusCode.Code>newArrayList(
399+
StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED)));
400+
definitions.put(
401+
"no_retry_1_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
395402
definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
396403
RETRYABLE_CODE_DEFINITIONS = definitions.build();
397404
}
@@ -401,6 +408,25 @@ public static class Builder
401408
static {
402409
ImmutableMap.Builder<String, RetrySettings> definitions = ImmutableMap.builder();
403410
RetrySettings settings = null;
411+
settings =
412+
RetrySettings.newBuilder()
413+
.setInitialRetryDelay(Duration.ofMillis(100L))
414+
.setRetryDelayMultiplier(1.3)
415+
.setMaxRetryDelay(Duration.ofMillis(60000L))
416+
.setInitialRpcTimeout(Duration.ofMillis(600000L))
417+
.setRpcTimeoutMultiplier(1.0)
418+
.setMaxRpcTimeout(Duration.ofMillis(600000L))
419+
.setTotalTimeout(Duration.ofMillis(600000L))
420+
.build();
421+
definitions.put("retry_policy_0_params", settings);
422+
settings =
423+
RetrySettings.newBuilder()
424+
.setInitialRpcTimeout(Duration.ofMillis(600000L))
425+
.setRpcTimeoutMultiplier(1.0)
426+
.setMaxRpcTimeout(Duration.ofMillis(600000L))
427+
.setTotalTimeout(Duration.ofMillis(600000L))
428+
.build();
429+
definitions.put("no_retry_1_params", settings);
404430
settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
405431
definitions.put("no_retry_params", settings);
406432
RETRY_PARAM_DEFINITIONS = definitions.build();
@@ -491,33 +517,33 @@ private static Builder createDefault() {
491517
private static Builder initDefaults(Builder builder) {
492518
builder
493519
.listFunctionsSettings()
494-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
495-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
520+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
521+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
496522

497523
builder
498524
.getFunctionSettings()
499-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
500-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
525+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
526+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
501527

502528
builder
503529
.createFunctionSettings()
504-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
505-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
530+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
531+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
506532

507533
builder
508534
.updateFunctionSettings()
509-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
510-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
535+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
536+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
511537

512538
builder
513539
.deleteFunctionSettings()
514-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
515-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
540+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
541+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
516542

517543
builder
518544
.callFunctionSettings()
519-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
520-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
545+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
546+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
521547

522548
builder
523549
.generateUploadUrlSettings()
@@ -549,8 +575,8 @@ private static Builder initDefaults(Builder builder) {
549575
.setInitialCallSettings(
550576
UnaryCallSettings
551577
.<CreateFunctionRequest, OperationSnapshot>newUnaryCallSettingsBuilder()
552-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
553-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
578+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
579+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"))
554580
.build())
555581
.setResponseTransformer(
556582
ProtoOperationTransformers.ResponseTransformer.create(CloudFunction.class))
@@ -573,8 +599,8 @@ private static Builder initDefaults(Builder builder) {
573599
.setInitialCallSettings(
574600
UnaryCallSettings
575601
.<UpdateFunctionRequest, OperationSnapshot>newUnaryCallSettingsBuilder()
576-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
577-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
602+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
603+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"))
578604
.build())
579605
.setResponseTransformer(
580606
ProtoOperationTransformers.ResponseTransformer.create(CloudFunction.class))
@@ -597,8 +623,8 @@ private static Builder initDefaults(Builder builder) {
597623
.setInitialCallSettings(
598624
UnaryCallSettings
599625
.<DeleteFunctionRequest, OperationSnapshot>newUnaryCallSettingsBuilder()
600-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
601-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
626+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
627+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"))
602628
.build())
603629
.setResponseTransformer(
604630
ProtoOperationTransformers.ResponseTransformer.create(Empty.class))

synth.metadata

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"git": {
1212
"name": "googleapis",
1313
"remote": "https://github.com/googleapis/googleapis.git",
14-
"sha": "f6dd7e47620566925a4b3f1ce029e74e1b2f2516",
15-
"internalRef": "359781040"
14+
"sha": "7cef8809d337ff0d59b1ba11d302e42952e9c3c2",
15+
"internalRef": "360443299"
1616
}
1717
},
1818
{

0 commit comments

Comments
 (0)