Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit 4430f49

Browse files
fix: migrate osconfig & agentendpoint to grpc_service_config (#55)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/de99c0b2-2a31-47d7-9319-d5e99cc10bf3/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 316127857 Source-Link: googleapis/googleapis@77e7fa1
1 parent 1611e31 commit 4430f49

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/stub/OsConfigServiceStubSettings.java

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -498,11 +498,9 @@ public static class Builder extends StubSettings.Builder<OsConfigServiceStubSett
498498
ImmutableMap.Builder<String, ImmutableSet<StatusCode.Code>> definitions =
499499
ImmutableMap.builder();
500500
definitions.put(
501-
"idempotent",
502-
ImmutableSet.copyOf(
503-
Lists.<StatusCode.Code>newArrayList(
504-
StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
505-
definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
501+
"retry_policy_1_codes",
502+
ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList(StatusCode.Code.UNAVAILABLE)));
503+
definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
506504
RETRYABLE_CODE_DEFINITIONS = definitions.build();
507505
}
508506

@@ -513,15 +511,17 @@ public static class Builder extends StubSettings.Builder<OsConfigServiceStubSett
513511
RetrySettings settings = null;
514512
settings =
515513
RetrySettings.newBuilder()
516-
.setInitialRetryDelay(Duration.ofMillis(100L))
514+
.setInitialRetryDelay(Duration.ofMillis(1000L))
517515
.setRetryDelayMultiplier(1.3)
518516
.setMaxRetryDelay(Duration.ofMillis(60000L))
519-
.setInitialRpcTimeout(Duration.ofMillis(20000L))
517+
.setInitialRpcTimeout(Duration.ofMillis(60000L))
520518
.setRpcTimeoutMultiplier(1.0)
521-
.setMaxRpcTimeout(Duration.ofMillis(20000L))
522-
.setTotalTimeout(Duration.ofMillis(600000L))
519+
.setMaxRpcTimeout(Duration.ofMillis(60000L))
520+
.setTotalTimeout(Duration.ofMillis(60000L))
523521
.build();
524-
definitions.put("default", settings);
522+
definitions.put("retry_policy_1_params", settings);
523+
settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
524+
definitions.put("no_retry_params", settings);
525525
RETRY_PARAM_DEFINITIONS = definitions.build();
526526
}
527527

@@ -580,48 +580,48 @@ private static Builder initDefaults(Builder builder) {
580580

581581
builder
582582
.executePatchJobSettings()
583-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
584-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
583+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
584+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
585585

586586
builder
587587
.getPatchJobSettings()
588-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
589-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
588+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
589+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
590590

591591
builder
592592
.cancelPatchJobSettings()
593-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
594-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
593+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
594+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
595595

596596
builder
597597
.listPatchJobsSettings()
598-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
599-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
598+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
599+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
600600

601601
builder
602602
.listPatchJobInstanceDetailsSettings()
603-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
604-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
603+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
604+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
605605

606606
builder
607607
.createPatchDeploymentSettings()
608-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
609-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
608+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
609+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
610610

611611
builder
612612
.getPatchDeploymentSettings()
613-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
614-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
613+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
614+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
615615

616616
builder
617617
.listPatchDeploymentsSettings()
618-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
619-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
618+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
619+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
620620

621621
builder
622622
.deletePatchDeploymentSettings()
623-
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
624-
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
623+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
624+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
625625

626626
return builder;
627627
}

synth.metadata

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/java-os-config.git",
7-
"sha": "af151619b8c207cbddb42122304044704116f951"
7+
"sha": "1611e31c13bfaa107b603b05b6b4bc35a2c1f228"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "googleapis",
1313
"remote": "https://github.com/googleapis/googleapis.git",
14-
"sha": "c4e37010d74071851ff24121f522e802231ac86e",
15-
"internalRef": "313460921"
14+
"sha": "77e7fa104755fbf38b02502fc406fd3bbac7afb6",
15+
"internalRef": "316127857"
1616
}
1717
},
1818
{

0 commit comments

Comments
 (0)