GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Copy backup samples by asthamohta · Pull Request #1802 · googleapis/java-spanner

This repository was archived by the owner on Aug 30, 2026. It is now read-only.

Conversation

@asthamohta

@asthamohta asthamohta commented Apr 4, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@asthamohta
asthamohta requested a review from a team 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

snippet-bot Bot commented Apr 4, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 1 region tag.
  • samples/snippets/src/main/java/com/example/spanner/CopyBackupSample.java:19, tag spanner_copy_backup

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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Apr 4, 2022
@blunderbuss-gcf blunderbuss-gcf Bot assigned kolea2 Apr 4, 2022
@asthamohta
asthamohta force-pushed the copy-backup-samples branch from c370f35 to e6d042b Compare April 4, 2022 10:37
@asthamohta
asthamohta requested review from olavloite and thiagotnunes April 4, 2022 11:00
@ansh0l ansh0l unassigned kolea2 Apr 4, 2022
olavloite
olavloite reviewed Apr 5, 2022
View reviewed changes

@olavloite olavloite left a comment

Copy link
Copy Markdown
Contributor

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread samples/snippets/src/main/java/com/example/spanner/CopyBackupSample.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread samples/snippets/src/main/java/com/example/spanner/CopyBackupSample.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread samples/snippets/src/main/java/com/example/spanner/CopyBackupSample.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread samples/snippets/src/main/java/com/example/spanner/SpannerSample.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread samples/snippets/src/test/java/com/example/spanner/SpannerSampleIT.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@asthamohta

asthamohta commented Apr 5, 2022

Copy link
Copy Markdown
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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

thiagotnunes
thiagotnunes reviewed Apr 5, 2022
View reviewed changes
Comment thread samples/snippets/src/test/java/com/example/spanner/SpannerSampleIT.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread samples/snippets/src/main/java/com/example/spanner/CopyBackupSample.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread samples/snippets/src/main/java/com/example/spanner/CopyBackupSample.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread samples/snippets/src/main/java/com/example/spanner/SpannerSample.java

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

@thiagotnunes thiagotnunes Apr 5, 2022

Copy link
Copy Markdown
Contributor

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@asthamohta asthamohta Apr 21, 2022

Copy link
Copy Markdown
Contributor Author

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@thiagotnunes thiagotnunes Apr 22, 2022

Copy link
Copy Markdown
Contributor

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.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ansh0l

ansh0l commented Apr 11, 2022

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ansh0l
ansh0l previously requested changes Apr 11, 2022
View reviewed changes

@ansh0l ansh0l left a comment

Copy link
Copy Markdown
Contributor

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.

Update the PR description

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@asthamohta
asthamohta requested a review from a team 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 force-pushed the copy-backup-samples branch from f36e29f to 474dfa8 Compare April 21, 2022 08:59
@asthamohta asthamohta added the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 21, 2022
@asthamohta
asthamohta requested a review from thiagotnunes April 21, 2022 10:14
@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 requested review from ansh0l and olavloite April 21, 2022 10:14
thiagotnunes
thiagotnunes reviewed Apr 22, 2022
View reviewed changes
Comment thread README.md Outdated

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

@thiagotnunes thiagotnunes Apr 22, 2022

Copy link
Copy Markdown
Contributor

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@asthamohta asthamohta Apr 22, 2022

Copy link
Copy Markdown
Contributor Author

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@thiagotnunes thiagotnunes Apr 22, 2022

Copy link
Copy Markdown
Contributor

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.

Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google-cloud-spanner/pom.xml
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>1.34</version>
<version>1.35</version>

@thiagotnunes thiagotnunes Apr 22, 2022

Copy link
Copy Markdown
Contributor

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread samples/install-without-bom/pom.xml
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner</artifactId>
<version>6.21.2</version>
<version>6.23.2</version>

@thiagotnunes thiagotnunes Apr 22, 2022

Copy link
Copy Markdown
Contributor

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.

This is already part of this PR: https://github.com/googleapis/java-spanner/pull/1788/files

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread samples/snippets/pom.xml
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>25.0.0</version>
<version>25.1.0</version>

@thiagotnunes thiagotnunes Apr 22, 2022

Copy link
Copy Markdown
Contributor

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.

This should happen automatically in another PR (from dependabot)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread samples/snippets/src/main/java/com/example/spanner/SpannerSample.java

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

@thiagotnunes thiagotnunes Apr 22, 2022

Copy link
Copy Markdown
Contributor

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.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
asthamohta added 5 commits April 22, 2022 12:03
@asthamohta
Revert "removing samples"
cbc0e65
This reverts commit b06a3df.
@asthamohta
removing samples
ede01f2
@asthamohta
changes to samples
1e983da
@asthamohta
linting
44ff9d1
@asthamohta
changes as per comments
1c76896
asthamohta and others added 7 commits April 22, 2022 12:03
@asthamohta @olavloite
Update samples/snippets/src/main/java/com/example/spanner/SpannerSamp…
b02cdf1
…le.java

Co-authored-by: Knut Olav Løite <[email protected]>
@asthamohta @olavloite
Update samples/snippets/src/main/java/com/example/spanner/CopyBackupS…
50f18da
…ample.java

Co-authored-by: Knut Olav Løite <[email protected]>
@asthamohta
don't merge
8917d66
@asthamohta
Revert "don't merge"
bb39c9f
This reverts commit cdf4d17.
@asthamohta
linting
a3139b0
@gcf-owl-bot @asthamohta
🦉 Updates from OwlBot post-processor
885c9a6
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
@asthamohta
linting
0920a95
@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
@asthamohta
asthamohta force-pushed the copy-backup-samples branch from d9d234b to 0920a95 Compare April 22, 2022 06:39
@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
@gcf-owl-bot
🦉 Updates from OwlBot post-processor
3c14217
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
olavloite
olavloite approved these changes Apr 22, 2022
View reviewed changes
Comment thread samples/snippets/src/main/java/com/example/spanner/SpannerSample.java
OffsetDateTime.now().getOffset()).toString()));
expireTime.getSeconds(),
expireTime.getNanos(),
OffsetDateTime.now().getOffset()).toString()));

@olavloite olavloite Apr 22, 2022

Copy link
Copy Markdown
Contributor

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.

super nit: the .toString() is superfluous

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@blunderbuss-gcf blunderbuss-gcf Bot assigned prash-mi Apr 22, 2022
@asthamohta
asthamohta dismissed ansh0l’s stale review April 22, 2022 08:03

Done

@asthamohta
asthamohta merged commit 787ccad into googleapis:main Apr 22, 2022
@release-please release-please Bot mentioned this pull request Apr 22, 2022
chore(main): release 6.24.0 #1846
Merged
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@ansh0l ansh0l Awaiting requested review from ansh0l
2 more reviewers
@thiagotnunes thiagotnunes thiagotnunes left review comments
@olavloite olavloite olavloite approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@prash-mi prash-mi

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

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@asthamohta @ansh0l @thiagotnunes @olavloite @prash-mi @kolea2
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.