Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ggj] generate example of ApiCallContext.withRetrySettings on client #700

Open
noahdietz opened this issue Mar 23, 2021 · 1 comment
Open
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@noahdietz
Copy link
Contributor

googleapis/gax-java#1238 introduced a new feature to the ApiCallContext that allows end users to supply RetrySetttings to be used for a single method invocation. The examples and documentation in the PR are generic, and show how to create an entirely new RetrySettings instance to supply via withRetrySettings, but there is API specific documentation that ggj could generate that would greatly help users. We should generate a single, client-level example of configuring RetrySettings via the ApiCallContext in the GAPIC layer that utilizes that GAPIC's StubSettings class as a base RetrySettings to modify. An example usage is as follows:

LanguageServiceClient client = LanguageServiceClient.create();

// In order to adjust the RetrySettings on a per-call basis, modify the default settings
// and supply it via the ApiCallContext.
RetrySettings retrySettings =
  client
    .getSettings()
      .analyzeSentimentSettings()
      .getRetrySettings()
        .toBuilder()
          .setTotalTimeout(Duration.ofSeconds(10L))
          .builder();

ApiCallContext callContext = GrpcCallContext.createDefault().withRetrySettings(retrySettings);

client.analyzeSentimentCallable().call(request, callContext);

Note: The spacing is probably off there.

A similar existing example in LanguageServiceStubSettings.

I'm thinking it would be generated in this client-level doc comment block somewhere.

cc: @miraleung

@noahdietz noahdietz added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Mar 23, 2021
@noahdietz
Copy link
Contributor Author

cc @olavloite we are going to try to generate specific examples of using withRetrySettings for GAPICs.

@blakeli0 blakeli0 added the priority: p3 Desirable enhancement or fix. May not be included in next release. label Oct 26, 2022
suztomo pushed a commit that referenced this issue Mar 21, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.api.grpc:grpc-google-iam-v1](https://togithub.com/googleapis/java-iam) | `1.3.4` -> `1.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:grpc-google-iam-v1/1.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:grpc-google-iam-v1/1.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:grpc-google-iam-v1/1.4.0/compatibility-slim/1.3.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:grpc-google-iam-v1/1.4.0/confidence-slim/1.3.4)](https://docs.renovatebot.com/merge-confidence/) |
| [com.google.api.grpc:proto-google-iam-v1](https://togithub.com/googleapis/java-iam) | `1.3.4` -> `1.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-iam-v1/1.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-iam-v1/1.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-iam-v1/1.4.0/compatibility-slim/1.3.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-iam-v1/1.4.0/confidence-slim/1.3.4)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/java-iam</summary>

### [`v1.4.0`](https://togithub.com/googleapis/java-iam/blob/HEAD/CHANGELOG.md#&#8203;140-httpsgithubcomgoogleapisjava-iamcomparev134v140-2022-05-19)

[Compare Source](https://togithub.com/googleapis/java-iam/compare/v1.3.4...v1.4.0)

##### Features

-   add build scripts for native image testing in Java 17 ([#&#8203;1440](https://togithub.com/googleapis/java-iam/issues/1440)) ([#&#8203;350](https://togithub.com/googleapis/java-iam/issues/350)) ([e83f148](https://togithub.com/googleapis/java-iam/commit/e83f148350c6e208f0290bf100f5b35461024073))

##### Dependencies

-   update dependency com.google.api:api-common to v2.2.0 ([#&#8203;348](https://togithub.com/googleapis/java-iam/issues/348)) ([2013a52](https://togithub.com/googleapis/java-iam/commit/2013a526838de4d21694d59d256f48bf5976b109))
-   update dependency com.google.cloud:google-cloud-shared-dependencies to v2.12.0 ([#&#8203;349](https://togithub.com/googleapis/java-iam/issues/349)) ([e458fbe](https://togithub.com/googleapis/java-iam/commit/e458fbe851f27fd2a3c0ea487f71ddccc88173f7))

##### [1.3.4](https://togithub.com/googleapis/java-iam/compare/v1.3.3...v1.3.4) (2022-05-10)

##### Dependencies

-   update dependency io.grpc:grpc-protobuf to v1.46.0 ([#&#8203;340](https://togithub.com/googleapis/java-iam/issues/340)) ([8ed87ef](https://togithub.com/googleapis/java-iam/commit/8ed87ef24ba184a1b1b386554aca94ae1fbbf9e6))
-   update dependency io.grpc:grpc-stub to v1.46.0 ([#&#8203;341](https://togithub.com/googleapis/java-iam/issues/341)) ([92c7276](https://togithub.com/googleapis/java-iam/commit/92c72768d6ea7715da121c5504b95e598de770a0))

##### [1.3.3](https://togithub.com/googleapis/java-iam/compare/v1.3.2...v1.3.3) (2022-04-22)

##### Dependencies

-   update dependency com.google.protobuf:protobuf-java to v3.20.1 ([#&#8203;337](https://togithub.com/googleapis/java-iam/issues/337)) ([83302e1](https://togithub.com/googleapis/java-iam/commit/83302e12860ca82234bd3f74234c373164e27ffb))

##### [1.3.2](https://togithub.com/googleapis/java-iam/compare/v1.3.1...v1.3.2) (2022-04-15)

##### Dependencies

-   update dependency com.google.cloud:google-cloud-shared-dependencies to v2.10.0 ([#&#8203;332](https://togithub.com/googleapis/java-iam/issues/332)) ([78e6341](https://togithub.com/googleapis/java-iam/commit/78e6341388c63e6eabeb5fbb3ab21bbdc965ddef))

##### [1.3.1](https://togithub.com/googleapis/java-iam/compare/v1.3.0...v1.3.1) (2022-04-11)

##### Dependencies

-   revert dependency com.google.protobuf:protobuf-java to v3.19.4 ([#&#8203;329](https://togithub.com/googleapis/java-iam/issues/329)) ([0e679c5](https://togithub.com/googleapis/java-iam/commit/0e679c5b63ac438f3f3f53b5a920c876450e0a94))

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-shared-dependencies).
suztomo pushed a commit that referenced this issue Mar 21, 2023
🤖 I have created a release *beep* *boop*
---


## [2.5.0](googleapis/java-core@v2.4.0...v2.5.0) (2022-02-02)


### Features

* add limit support to ReadChannel ([#688](googleapis/java-core#688)) ([9543eb2](googleapis/java-core@9543eb2))


### Bug Fixes

* **java:** Initialize AsyncSSLPrivateKeyMethod (a grpc netty class) at run-time ([#702](googleapis/java-core#702)) ([af1c9b3](googleapis/java-core@af1c9b3))


### Dependencies

* update dependency com.google.api:gax-bom to v2.12.0 ([#698](googleapis/java-core#698)) ([34bbad8](googleapis/java-core@34bbad8))
* update dependency com.google.protobuf:protobuf-bom to v3.19.4 ([#699](googleapis/java-core#699)) ([9e2f077](googleapis/java-core@9e2f077))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants