Skip to content

Commit

Permalink
feat: [cloudprofiler] add client side retry config for export service (
Browse files Browse the repository at this point in the history
…#10060)

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 582745175

Source-Link: https://togithub.com/googleapis/googleapis/commit/c497e8440ed4390cfa1de243f73f7114caff8782

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/d254614a635a592e19d4ddf63c5c54c242abfe6c
Copy-Tag: eyJwIjoiamF2YS1wcm9maWxlci8uT3dsQm90LnlhbWwiLCJoIjoiZDI1NDYxNGE2MzVhNTkyZTE5ZDRkZGY2M2M1YzU0YzI0MmFiZmU2YyJ9

BEGIN_NESTED_COMMIT
chore: [cloudprofiler] update go_package and Go importpath
PiperOrigin-RevId: 582685115

Source-Link: https://togithub.com/googleapis/googleapis/commit/c320b40679fccd0e84d328664fa8ce589e62861f

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/8e873fb1b1e209942ab2c1002c0fcfb881f10e59
Copy-Tag: eyJwIjoiamF2YS1wcm9maWxlci8uT3dsQm90LnlhbWwiLCJoIjoiOGU4NzNmYjFiMWUyMDk5NDJhYjJjMTAwMmMwZmNmYjg4MWYxMGU1OSJ9
END_NESTED_COMMIT
  • Loading branch information
gcf-owl-bot[bot] committed Nov 16, 2023
1 parent 2511217 commit 1961c40
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions java-profiler/README.md
Expand Up @@ -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>26.23.0</version>
<version>26.27.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-profiler.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-profiler/2.24.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-profiler/2.30.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Expand Up @@ -238,10 +238,10 @@ public static class Builder extends StubSettings.Builder<ProfilerServiceStubSett
static {
ImmutableMap.Builder<String, ImmutableSet<StatusCode.Code>> definitions =
ImmutableMap.builder();
definitions.put(
"no_retry_1_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
definitions.put(
"no_retry_2_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
definitions.put(
"no_retry_3_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}

Expand All @@ -257,15 +257,15 @@ public static class Builder extends StubSettings.Builder<ProfilerServiceStubSett
.setMaxRpcTimeout(Duration.ofMillis(3610000L))
.setTotalTimeout(Duration.ofMillis(3610000L))
.build();
definitions.put("no_retry_1_params", settings);
definitions.put("no_retry_2_params", settings);
settings =
RetrySettings.newBuilder()
.setInitialRpcTimeout(Duration.ofMillis(30000L))
.setRpcTimeoutMultiplier(1.0)
.setMaxRpcTimeout(Duration.ofMillis(30000L))
.setTotalTimeout(Duration.ofMillis(30000L))
.build();
definitions.put("no_retry_2_params", settings);
definitions.put("no_retry_3_params", settings);
RETRY_PARAM_DEFINITIONS = definitions.build();
}

Expand Down Expand Up @@ -327,18 +327,18 @@ private static Builder createHttpJsonDefault() {
private static Builder initDefaults(Builder builder) {
builder
.createProfileSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params"));

builder
.createOfflineProfileSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params"));
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params"));

builder
.updateProfileSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params"));
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params"));

return builder;
}
Expand Down
Expand Up @@ -121,13 +121,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "com\322A\212\001https://www.googleapis.com/auth/c"
+ "loud-platform,https://www.googleapis.com"
+ "/auth/monitoring,https://www.googleapis."
+ "com/auth/monitoring.writeB\332\001\n$com.google"
+ "com/auth/monitoring.writeB\324\001\n$com.google"
+ ".devtools.cloudprofiler.v2B\rProfilerProt"
+ "oP\001ZMgoogle.golang.org/genproto/googleap"
+ "is/devtools/cloudprofiler/v2;cloudprofil"
+ "er\252\002\030Google.Cloud.Profiler.V2\312\002\030Google\\C"
+ "loud\\Profiler\\V2\352\002\033Google::Cloud::Profil"
+ "er::V2b\006proto3"
+ "oP\001ZGcloud.google.com/go/cloudprofiler/a"
+ "piv2/cloudprofilerpb;cloudprofilerpb\252\002\030G"
+ "oogle.Cloud.Profiler.V2\312\002\030Google\\Cloud\\P"
+ "rofiler\\V2\352\002\033Google::Cloud::Profiler::V2"
+ "b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
Expand Down
Expand Up @@ -24,7 +24,7 @@ import "google/protobuf/duration.proto";
import "google/protobuf/field_mask.proto";

option csharp_namespace = "Google.Cloud.Profiler.V2";
option go_package = "google.golang.org/genproto/googleapis/devtools/cloudprofiler/v2;cloudprofiler";
option go_package = "cloud.google.com/go/cloudprofiler/apiv2/cloudprofilerpb;cloudprofilerpb";
option java_multiple_files = true;
option java_outer_classname = "ProfilerProto";
option java_package = "com.google.devtools.cloudprofiler.v2";
Expand Down

0 comments on commit 1961c40

Please sign in to comment.