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 samples for using timeouts #8255
base: main
Are you sure you want to change the base?
Conversation
Adds samples for running queries and updates with timeouts. This is one of the most frequently asked questions for the Spring Data Spanner project.
@@ -41,5 +45,22 @@ public void runRepositoryExample() { | |||
int deletedLastNameCount = this.singerRepository.deleteByLastName("a last name"); | |||
} | |||
|
|||
public void runRepositoryTimeoutExample() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on the style guide https://googlecloudplatform.github.io/samples-style-guide/, we typically have samples in individual files with separate region tags. Can you update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've split them into separate sample files.
We also expect tests for each sample |
Here is the summary of changes. You are about to add 2 region tags.
This comment is generated by snippet-bot.
|
There are no tests or test infrastructure at all set up for this project, which makes adding tests for these samples difficult. |
It is a part of our policy for samples to have tests: https://googlecloudplatform.github.io/samples-style-guide/#testing. Without tests samples are not maintainable. The api-spanner-java team owns the spanner samples, therefore without explicit consent from this owner we may not be able to accept these samples. |
Specifically the Spring Data Spanner project is maintained by a different team. @meltsufin Could you chime in here, please? Do you know whether there's a specific reason that there are no tests set up for these samples? Or are there any plans for doing so? |
We have tests for Spring Data Spanner samples the we maintain in spring-cloud-gcp. We do not maintain java-docs-samples repo, however. |
@anguillanneuf Would you mind merging this PR? I don't think I have permission to merge anything in this repo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not familiar with the demand. There is no issue external or internal referenced here.
I would suggest to avoid adding region tags before you register it and to follow region tag guidelines. I cannot add internal go-link here. Please, search for "region tag" for internal doc.
|
||
package com.example.spanner; | ||
|
||
// [START spanner_spring_data_repository_timeout_sample] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, do not create new region tag without registering it with http://devrel
Adds samples for running queries and updates with timeouts. This is one of the most frequently asked questions for the Spring Data Spanner project.