From ba0a626fe790521d0e082373842a367dfd8de1b3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 1 Oct 2021 12:01:41 -0400 Subject: [PATCH] feat: add RPC retry information for MacSign, MacVerify, and GenerateRandomBytes (#636) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add RPC retry information for MacSign, MacVerify, and GenerateRandomBytes Committer: @bdhess PiperOrigin-RevId: 399925901 Source-Link: https://github.com/googleapis/googleapis/commit/ae7e399135b2bc16e1f1f47edb270db2cdf98bd8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3a8128528ceddba0c1775401eef57ecb582db350 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2E4MTI4NTI4Y2VkZGJhMGMxNzc1NDAxZWVmNTdlY2I1ODJkYjM1MCJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../v1/stub/KeyManagementServiceStubSettings.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/stub/KeyManagementServiceStubSettings.java b/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/stub/KeyManagementServiceStubSettings.java index dd0b91eb..dafd33dd 100644 --- a/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/stub/KeyManagementServiceStubSettings.java +++ b/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/stub/KeyManagementServiceStubSettings.java @@ -761,7 +761,6 @@ public static class Builder StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); definitions.put( "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -789,8 +788,6 @@ public static class Builder .setTotalTimeout(Duration.ofMillis(60000L)) .build(); definitions.put("no_retry_0_params", settings); - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); RETRY_PARAM_DEFINITIONS = definitions.build(); } @@ -1064,18 +1061,18 @@ private static Builder initDefaults(Builder builder) { builder .macSignSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .macVerifySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .generateRandomBytesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .setIamPolicySettings()