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

feat: Copy backup samples #1802

Merged
merged 13 commits into from
Apr 22, 2022
Merged

Conversation

asthamohta
Copy link
Contributor

@asthamohta asthamohta commented Apr 4, 2022

Adding the following samples for Copy Backup:

  1. Copy Backup from source database
  2. Use max expire time for backups
  3. Get database options for copy backup

@asthamohta asthamohta requested a review from a team as a code owner April 4, 2022 05:08
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner API. label Apr 4, 2022
@snippet-bot
Copy link

snippet-bot bot commented Apr 4, 2022

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Apr 4, 2022
Copy link
Collaborator

@olavloite olavloite left a comment

Choose a reason for hiding this comment

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

There's no integration test for the CopyBackup sample. Is that intentional?

@asthamohta
Copy link
Contributor Author

@olavloite yes, because I notices not all samples have an IT and this is a very long running function so decided to go with this

@@ -1659,21 +1660,23 @@ static void cancelCreateBackup(
// [END spanner_cancel_backup_create]

// [START spanner_list_backup_operations]
static void listBackupOperations(InstanceAdminClient instanceAdminClient, DatabaseId databaseId) {
static void listBackupOperations(
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this a breaking change? Maybe customers won't care because it is in the sample , but I don't know what the policy is here. Yoshi team might know

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@olavloite pointed out that this is a non public method and hence can't be called so this will not be a breaking change

Copy link
Contributor

Choose a reason for hiding this comment

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

That is true, but we publish these samples in our public documentation, so we would be changing the signature. Anyway, if your team is ok with this, I am ok.

@ansh0l
Copy link
Contributor

ansh0l commented Apr 11, 2022

@asthamohta : can you update the PR to provide the description in the right format?

ansh0l
ansh0l previously requested changes Apr 11, 2022
Copy link
Contributor

@ansh0l ansh0l left a comment

Choose a reason for hiding this comment

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

Update the PR description

@asthamohta asthamohta requested a review from a team as a code owner April 21, 2022 06:12
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Apr 21, 2022
@asthamohta asthamohta added the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 21, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 21, 2022
@asthamohta asthamohta added the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 21, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 21, 2022
README.md Outdated
```

If you are using SBT, add this to your dependencies

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.23.0"
libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.23.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I don't think these version updates should be part of this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I didn't do this. After I raised the PR, the changes in this file came automatically after I raised the PR. I only changes the install-without-bom. I'll try merging the other PR with the version change and remove these files

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

@@ -343,7 +343,7 @@
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>1.34</version>
<version>1.35</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

This should happen automatically no? Why do we need to update jmh here?

@@ -32,7 +32,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner</artifactId>
<version>6.21.2</version>
<version>6.23.2</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -33,7 +33,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>25.0.0</version>
<version>25.1.0</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

This should happen automatically in another PR (from dependabot)

@@ -1659,21 +1660,23 @@ static void cancelCreateBackup(
// [END spanner_cancel_backup_create]

// [START spanner_list_backup_operations]
static void listBackupOperations(InstanceAdminClient instanceAdminClient, DatabaseId databaseId) {
static void listBackupOperations(
Copy link
Contributor

Choose a reason for hiding this comment

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

That is true, but we publish these samples in our public documentation, so we would be changing the signature. Anyway, if your team is ok with this, I am ok.

@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Apr 22, 2022
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: l Pull request size is large. labels Apr 22, 2022
@asthamohta asthamohta added the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 22, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 22, 2022
OffsetDateTime.now().getOffset()).toString()));
expireTime.getSeconds(),
expireTime.getNanos(),
OffsetDateTime.now().getOffset()).toString()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

super nit: the .toString() is superfluous

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. samples Issues that are directly related to samples. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants