From c2ee30ec0a23f6dc649347ca2c62346ee1e2df52 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 30 Jun 2020 20:49:24 -0700 Subject: [PATCH 1/2] changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. --- README.md | 1 + synth.metadata | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 29516292..e3564dec 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,7 @@ has instructions for running the samples. | Endpoints Delete | [source code](https://github.com/googleapis/java-servicedirectory/blob/master/samples/snippets/src/main/java/com/example/servicedirectory/EndpointsDelete.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-servicedirectory&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/servicedirectory/EndpointsDelete.java) | | Namespaces Create | [source code](https://github.com/googleapis/java-servicedirectory/blob/master/samples/snippets/src/main/java/com/example/servicedirectory/NamespacesCreate.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-servicedirectory&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/servicedirectory/NamespacesCreate.java) | | Namespaces Delete | [source code](https://github.com/googleapis/java-servicedirectory/blob/master/samples/snippets/src/main/java/com/example/servicedirectory/NamespacesDelete.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-servicedirectory&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/servicedirectory/NamespacesDelete.java) | +| Quickstart | [source code](https://github.com/googleapis/java-servicedirectory/blob/master/samples/snippets/src/main/java/com/example/servicedirectory/Quickstart.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-servicedirectory&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/servicedirectory/Quickstart.java) | | Services Create | [source code](https://github.com/googleapis/java-servicedirectory/blob/master/samples/snippets/src/main/java/com/example/servicedirectory/ServicesCreate.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-servicedirectory&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/servicedirectory/ServicesCreate.java) | | Services Delete | [source code](https://github.com/googleapis/java-servicedirectory/blob/master/samples/snippets/src/main/java/com/example/servicedirectory/ServicesDelete.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-servicedirectory&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/servicedirectory/ServicesDelete.java) | | Services Resolve | [source code](https://github.com/googleapis/java-servicedirectory/blob/master/samples/snippets/src/main/java/com/example/servicedirectory/ServicesResolve.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-servicedirectory&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/servicedirectory/ServicesResolve.java) | diff --git a/synth.metadata b/synth.metadata index 5f48aff9..aa04441d 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-servicedirectory.git", - "sha": "4a8381b2f84c3459ecb5bdc847d6e292f6451910" + "sha": "d5ebd3914ef2a4d69e6f7efc181b5ae9a49411ba" } }, { From d15baa901244164826d8a6dcfd47bd4710a10794 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 30 Jun 2020 20:58:26 -0700 Subject: [PATCH 2/2] fix: migrate servicedirectory/v1beta1 to grpc_service_config PiperOrigin-RevId: 319092903 Source-Author: Google APIs Source-Date: Tue Jun 30 13:56:05 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 98d6efce2ba341bcb6e5319e082a9109b51555c7 Source-Link: https://github.com/googleapis/googleapis/commit/98d6efce2ba341bcb6e5319e082a9109b51555c7 --- .../stub/LookupServiceStubSettings.java | 38 +++++-- .../stub/RegistrationServiceStubSettings.java | 106 ++++++++++-------- synth.metadata | 4 +- 3 files changed, 92 insertions(+), 56 deletions(-) diff --git a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/LookupServiceStubSettings.java b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/LookupServiceStubSettings.java index 6be148e4..e3d4d4a7 100644 --- a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/LookupServiceStubSettings.java +++ b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/LookupServiceStubSettings.java @@ -174,11 +174,16 @@ 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.UNKNOWN))); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_2_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.UNAVAILABLE, StatusCode.Code.UNKNOWN))); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -189,15 +194,28 @@ 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.UNKNOWN))); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_2_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.UNAVAILABLE, StatusCode.Code.UNKNOWN))); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -541,15 +546,28 @@ public static class Builder RetrySettings settings = null; settings = RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(15000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(15000L)) + .setTotalTimeout(Duration.ofMillis(15000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) .setRetryDelayMultiplier(1.3) .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(20000L)) + .setInitialRpcTimeout(Duration.ofMillis(15000L)) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(20000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) + .setMaxRpcTimeout(Duration.ofMillis(15000L)) + .setTotalTimeout(Duration.ofMillis(15000L)) .build(); - definitions.put("default", settings); + definitions.put("retry_policy_2_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); RETRY_PARAM_DEFINITIONS = definitions.build(); } @@ -633,93 +651,93 @@ private static Builder initDefaults(Builder builder) { builder .createNamespaceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .listNamespacesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .getNamespaceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .updateNamespaceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .deleteNamespaceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .createServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .listServicesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .getServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .updateServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .deleteServiceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .createEndpointSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .listEndpointsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .getEndpointSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .updateEndpointSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .deleteEndpointSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .getIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .setIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .testIamPermissionsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); return builder; } diff --git a/synth.metadata b/synth.metadata index aa04441d..e18b27f9 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c4e37010d74071851ff24121f522e802231ac86e", - "internalRef": "313460921" + "sha": "98d6efce2ba341bcb6e5319e082a9109b51555c7", + "internalRef": "319092903" } }, {