Skip to content
Permalink
Browse files
fix: migrate retry settings to grpc_service_config (#169)
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/51b19127-021c-490f-9add-0c6fb0ed82bf/targets

- [ ] To automatically regenerate this PR, check this box.

PiperOrigin-RevId: 317362697
Source-Link: googleapis/googleapis@5ffdbc3
PiperOrigin-RevId: 317362671
Source-Link: googleapis/googleapis@40489b3
PiperOrigin-RevId: 317323610
Source-Link: googleapis/googleapis@a75d8da
  • Loading branch information
yoshi-automation committed Jun 22, 2020
1 parent e3871d0 commit ef27c8e5076ed8d84561ccd3fd35b470bfaf6127
Showing with 504 additions and 464 deletions.
  1. +1 −1 README.md
  2. +43 −31 ...ner/src/main/java/com/google/cloud/websecurityscanner/v1/stub/WebSecurityScannerStubSettings.java
  3. +79 −78 ...tyscanner/src/main/java/com/google/cloud/websecurityscanner/v1alpha/WebSecurityScannerClient.java
  4. +13 −13 ...scanner/src/main/java/com/google/cloud/websecurityscanner/v1alpha/WebSecurityScannerSettings.java
  5. +3 −2 ...ud-websecurityscanner/src/main/java/com/google/cloud/websecurityscanner/v1alpha/package-info.java
  6. +30 −30 ...er/src/main/java/com/google/cloud/websecurityscanner/v1alpha/stub/GrpcWebSecurityScannerStub.java
  7. +4 −4 ...canner/src/main/java/com/google/cloud/websecurityscanner/v1alpha/stub/WebSecurityScannerStub.java
  8. +68 −56 ...rc/main/java/com/google/cloud/websecurityscanner/v1alpha/stub/WebSecurityScannerStubSettings.java
  9. +79 −78 ...ityscanner/src/main/java/com/google/cloud/websecurityscanner/v1beta/WebSecurityScannerClient.java
  10. +13 −13 ...yscanner/src/main/java/com/google/cloud/websecurityscanner/v1beta/WebSecurityScannerSettings.java
  11. +3 −2 ...oud-websecurityscanner/src/main/java/com/google/cloud/websecurityscanner/v1beta/package-info.java
  12. +30 −30 ...ner/src/main/java/com/google/cloud/websecurityscanner/v1beta/stub/GrpcWebSecurityScannerStub.java
  13. +4 −4 ...scanner/src/main/java/com/google/cloud/websecurityscanner/v1beta/stub/WebSecurityScannerStub.java
  14. +67 −55 ...src/main/java/com/google/cloud/websecurityscanner/v1beta/stub/WebSecurityScannerStubSettings.java
  15. +30 −30 ...anner/src/test/java/com/google/cloud/websecurityscanner/v1alpha/WebSecurityScannerClientTest.java
  16. +30 −30 ...canner/src/test/java/com/google/cloud/websecurityscanner/v1beta/WebSecurityScannerClientTest.java
  17. +7 −7 synth.metadata
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>5.7.0</version>
<version>7.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -549,11 +549,13 @@ public ApiFuture<ListFindingsPagedResponse> getFuturePagedResponse(
ImmutableMap.Builder<String, ImmutableSet<StatusCode.Code>> definitions =
ImmutableMap.builder();
definitions.put(
"idempotent",
"retry_policy_1_codes",
ImmutableSet.copyOf(
Lists.<StatusCode.Code>newArrayList(
StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
definitions.put(
"no_retry_1_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}

@@ -567,12 +569,22 @@ public ApiFuture<ListFindingsPagedResponse> getFuturePagedResponse(
.setInitialRetryDelay(Duration.ofMillis(100L))
.setRetryDelayMultiplier(1.3)
.setMaxRetryDelay(Duration.ofMillis(60000L))
.setInitialRpcTimeout(Duration.ofMillis(20000L))
.setInitialRpcTimeout(Duration.ofMillis(600000L))
.setRpcTimeoutMultiplier(1.0)
.setMaxRpcTimeout(Duration.ofMillis(600000L))
.setTotalTimeout(Duration.ofMillis(600000L))
.build();
definitions.put("retry_policy_1_params", settings);
settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
definitions.put("no_retry_params", settings);
settings =
RetrySettings.newBuilder()
.setInitialRpcTimeout(Duration.ofMillis(600000L))
.setRpcTimeoutMultiplier(1.0)
.setMaxRpcTimeout(Duration.ofMillis(20000L))
.setMaxRpcTimeout(Duration.ofMillis(600000L))
.setTotalTimeout(Duration.ofMillis(600000L))
.build();
definitions.put("default", settings);
definitions.put("no_retry_1_params", settings);
RETRY_PARAM_DEFINITIONS = definitions.build();
}

@@ -641,68 +653,68 @@ private static Builder initDefaults(Builder builder) {

builder
.createScanConfigSettings()
.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"));

builder
.deleteScanConfigSettings()
.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
.getScanConfigSettings()
.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
.listScanConfigsSettings()
.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
.updateScanConfigSettings()
.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"));

builder
.startScanRunSettings()
.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"));

builder
.getScanRunSettings()
.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
.listScanRunsSettings()
.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
.stopScanRunSettings()
.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"));

builder
.listCrawledUrlsSettings()
.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
.getFindingSettings()
.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
.listFindingsSettings()
.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
.listFindingTypeStatsSettings()
.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"));

return builder;
}

0 comments on commit ef27c8e

Please sign in to comment.