From 661fe83ff847dad61bf90732befabf9eef9f9706 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 22 Jun 2020 13:01:22 -0700 Subject: [PATCH] fix: migrate retry settings to grpc_service_config (#174) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/5c193786-fcd8-4a90-b8a2-1d007566f359/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 316908733 Source-Link: https://github.com/googleapis/googleapis/commit/923b983673af7348eb4e517d9e083a5aa69e1101 PiperOrigin-RevId: 316908726 Source-Link: https://github.com/googleapis/googleapis/commit/8c53b2cb792234354c13336ac7daee61333deade PiperOrigin-RevId: 316908080 Source-Link: https://github.com/googleapis/googleapis/commit/7272af32a96a42fe5bb9452360e32ae95718abc2 --- README.md | 2 +- .../tasks/v2/stub/CloudTasksStubSettings.java | 90 ++++++++------- .../v2beta2/stub/CloudTasksStubSettings.java | 108 ++++++++++-------- .../v2beta3/stub/CloudTasksStubSettings.java | 90 ++++++++------- synth.metadata | 6 +- 5 files changed, 166 insertions(+), 130 deletions(-) diff --git a/README.md b/README.md index 7d168845..a943a6ca 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 5.7.0 + 7.0.0 pom import diff --git a/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/CloudTasksStubSettings.java b/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/CloudTasksStubSettings.java index f08e9113..61719067 100644 --- a/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/CloudTasksStubSettings.java +++ b/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/CloudTasksStubSettings.java @@ -439,11 +439,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(); } @@ -456,13 +458,23 @@ 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())); + StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -494,13 +496,23 @@ 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(); } @@ -456,13 +458,23 @@ public static class Builder extends StubSettings.Builder