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

docs: add sample for timeout for one RPC #707

Merged
merged 6 commits into from Jan 6, 2021

Conversation

olavloite
Copy link
Collaborator

Adds a sample for setting a timeout for a single RPC.

Fixes GoogleCloudPlatform/java-docs-samples#3805

Adds a sample for setting a timeout for a single RPC.

Fixes GoogleCloudPlatform/java-docs-samples#3805
@olavloite olavloite requested a review from a team as a code owner December 10, 2020 13:15
@olavloite olavloite requested a review from a team December 10, 2020 13:15
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 10, 2020
@product-auto-label product-auto-label bot added api: spanner Issues related to the googleapis/java-spanner API. samples Issues that are directly related to samples. labels Dec 10, 2020
@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 10, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 10, 2020
@eaball35
Copy link
Contributor

Screen Shot 2020-12-10 at 9 00 28 AM

@olavloite
Copy link
Collaborator Author

@eaball35 These RESOURCE_EXHAUSTED errors have been mitigated by #669, which is included in version 3.1.0. The sample builds are currently using version 3.0.4. I'm afraid the only possible mitigation at this moment is retrying the test run.

@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 10, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 10, 2020
@eaball35 eaball35 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 10, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 10, 2020
@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 10, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 10, 2020
Copy link
Contributor

@lesv lesv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing can't possibly ever work.

@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 11, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 11, 2020
@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 11, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 11, 2020
@codecov
Copy link

codecov bot commented Dec 14, 2020

Codecov Report

Merging #707 (e6a34d9) into master (d49517f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #707   +/-   ##
=========================================
  Coverage     85.05%   85.05%           
  Complexity     2556     2556           
=========================================
  Files           142      142           
  Lines         13930    13930           
  Branches       1326     1326           
=========================================
  Hits          11848    11848           
  Misses         1526     1526           
  Partials        556      556           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d49517f...e6a34d9. Read the comment docs.

@olavloite olavloite requested a review from lesv December 14, 2020 11:33
@olavloite
Copy link
Collaborator Author

@lesv Would you mind taking a second look at this PR? The PR is currently blocked from merging as you requested changes.

@lesv
Copy link
Contributor

lesv commented Jan 5, 2021

@olavloite Apologies for the delay, what I'm concerned about is that we might test with many PR's / java version tests running at the same time, I'm concerned that you will have collisons.

I was probably stuck on table names of Singers & Venues, but that's not really the problem since you are creating an instance and then deleting it. The code in createTestDatabase appears to use EnvVar, it's unclear if that's unique. It also falls back to using the last instanceId, but that looks like it should at least have a while in there somewhere, and actually go to a next id rather than the last one to have something unique.

I'm going to release my objection so you can move forward - again I missed the email or I'd have responded earlier. Apologies.

If you believe I'm wrong in my concern, feel free to merge, if not could you fix it and explain where my understanding is flawed?

@lesv
Copy link
Contributor

lesv commented Jan 6, 2021

I found the discussion. LGTM

@thiagotnunes thiagotnunes merged commit 056f54f into master Jan 6, 2021
@thiagotnunes thiagotnunes deleted the add-sample-for-timeout branch January 6, 2021 00:08
thiagotnunes pushed a commit that referenced this pull request May 6, 2021
* docs: add sample for timeout for one RPC

Adds a sample for setting a timeout for a single RPC.

Fixes GoogleCloudPlatform/java-docs-samples#3805

* fix: fix import order

* fix: format code with the correct formatter plugin

* fix: delete test data after each test

* fix: auto-throttle admin requests
ansh0l pushed a commit to ansh0l/java-spanner that referenced this pull request Nov 10, 2022
This is an auto-generated regeneration of the .pb.go files by
cloud.google.com/go/internal/gapicgen. Once this PR is submitted, genbot will
update the corresponding PR to depend on the newer version of go-genproto, and
assign reviewers. Whilst this or any regen PR is open in go-genproto, genbot
will not create any more regeneration PRs. If all regen PRs are closed,
gapicgen will create a new set of regeneration PRs once per night.

If you have been assigned to review this PR, please:

- Ensure that CI is passing. If it's failing, it requires your manual attention.
- Approve and submit this PR if you believe it's ready to ship. That will prompt
genbot to assign reviewers to the google-cloud-go PR.

Corresponding google-cloud-go PR: googleapis/google-cloud-go#5018

Changes:

chore(mediatranslation): Update mediatranslation BUILD.bazel package name to google-cloud-media-translation
  PiperOrigin-RevId: 404908282
  Source-Link: googleapis/googleapis@59736be

chore(recaptchaenterprise): Update mediatranslation BUILD.bazel package name to google-cloud-recaptcha-enterprise
  PiperOrigin-RevId: 404908163
  Source-Link: googleapis/googleapis@7eea02b

docs(dialogflow): clarified meaning of the legacy editions docs: clarified semantic of the streaming APIs
  PiperOrigin-RevId: 404815104
  Source-Link: googleapis/googleapis@bb1f3e9

docs: fix docstring formatting
  Committer: @parthea
  PiperOrigin-RevId: 404756337
  Source-Link: googleapis/googleapis@f034e5f
rajatbhatta pushed a commit to rajatbhatta/java-spanner that referenced this pull request Nov 17, 2022
…jdbc to v2.5.8 (googleapis#707)

[![WhiteSource 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.cloud:google-cloud-spanner-jdbc](https://togithub.com/googleapis/java-spanner-jdbc) | `2.5.6` -> `2.5.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-jdbc/2.5.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-jdbc/2.5.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-jdbc/2.5.8/compatibility-slim/2.5.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-jdbc/2.5.8/confidence-slim/2.5.6)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/java-spanner-jdbc</summary>

### [`v2.5.8`](https://togithub.com/googleapis/java-spanner-jdbc/blob/HEAD/CHANGELOG.md#&#8203;258-httpswwwgithubcomgoogleapisjava-spanner-jdbccomparev257v258-2022-01-07)

[Compare Source](https://togithub.com/googleapis/java-spanner-jdbc/compare/v2.5.7...v2.5.8)

### [`v2.5.7`](https://togithub.com/googleapis/java-spanner-jdbc/blob/HEAD/CHANGELOG.md#&#8203;257-httpswwwgithubcomgoogleapisjava-spanner-jdbccomparev256v257-2022-01-07)

[Compare Source](https://togithub.com/googleapis/java-spanner-jdbc/compare/v2.5.6...v2.5.7)

</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 this update again.

---

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

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spanner: update the code sample to set timeout at method level
5 participants