From 037f5a0bc751ef1c7ff5af649400fea56777437e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 11 Jun 2020 11:00:45 -0700 Subject: [PATCH] fix: update retry policies for all clients (#209) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/e66d5b32-5d3a-4216-853d-260a1b0f526f/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 315789780 Source-Link: https://github.com/googleapis/googleapis/commit/a8ebb52bc3b8ff0e41cb34b19c1c9a8af2a9c9eb PiperOrigin-RevId: 315789764 Source-Link: https://github.com/googleapis/googleapis/commit/00de455b588d7203012fec514d91b0eb63e41af3 PiperOrigin-RevId: 315777943 Source-Link: https://github.com/googleapis/googleapis/commit/203ed2605b5806578e9aeb63388bc6aa9bbac659 PiperOrigin-RevId: 315775276 Source-Link: https://github.com/googleapis/googleapis/commit/8a81e7e3ea5bdf30e406cc06dc90948574ba1058 --- .../stub/AssetServiceStubSettings.java | 36 ++++++++++----- .../stub/AssetServiceStubSettings.java | 22 +++++----- .../stub/AssetServiceStubSettings.java | 44 ++++++++++++------- .../stub/AssetServiceStubSettings.java | 40 ++++++++++------- synth.metadata | 20 ++++----- 5 files changed, 99 insertions(+), 63 deletions(-) diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStubSettings.java index dd04d34ef..e3ab77b21 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStubSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/AssetServiceStubSettings.java @@ -204,11 +204,13 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "idempotent", + "retry_policy_1_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -222,12 +224,22 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(ExportAssetsResponse.class)) diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java index 69aac38be..2573fb95e 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java @@ -343,11 +343,11 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "idempotent", + "retry_policy_1_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -361,12 +361,14 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "idempotent", + "retry_policy_1_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -227,12 +229,22 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "idempotent", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + "retry_policy_1_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -232,12 +232,22 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create( diff --git a/synth.metadata b/synth.metadata index cf67bf0b8..4cf4abd7e 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,40 +11,40 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c4e37010d74071851ff24121f522e802231ac86e", - "internalRef": "313460921" + "sha": "a8ebb52bc3b8ff0e41cb34b19c1c9a8af2a9c9eb", + "internalRef": "315789780" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c4e37010d74071851ff24121f522e802231ac86e", - "internalRef": "313460921" + "sha": "a8ebb52bc3b8ff0e41cb34b19c1c9a8af2a9c9eb", + "internalRef": "315789780" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c4e37010d74071851ff24121f522e802231ac86e", - "internalRef": "313460921" + "sha": "a8ebb52bc3b8ff0e41cb34b19c1c9a8af2a9c9eb", + "internalRef": "315789780" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c4e37010d74071851ff24121f522e802231ac86e", - "internalRef": "313460921" + "sha": "a8ebb52bc3b8ff0e41cb34b19c1c9a8af2a9c9eb", + "internalRef": "315789780" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c4e37010d74071851ff24121f522e802231ac86e", - "internalRef": "313460921" + "sha": "a8ebb52bc3b8ff0e41cb34b19c1c9a8af2a9c9eb", + "internalRef": "315789780" } }, {