feat: Copy backup samples#1802
Conversation
|
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
c370f35 to
e6d042b
Compare
olavloite
left a comment
There was a problem hiding this comment.
There's no integration test for the CopyBackup sample. Is that intentional?
samples/snippets/src/main/java/com/example/spanner/CopyBackupSample.java
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/spanner/CopyBackupSample.java
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/spanner/CopyBackupSample.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/spanner/SpannerSample.java
Outdated
Show resolved
Hide resolved
|
@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 |
samples/snippets/src/test/java/com/example/spanner/SpannerSampleIT.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/spanner/CopyBackupSample.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/spanner/CopyBackupSample.java
Outdated
Show resolved
Hide resolved
|
|
||
| // [START spanner_list_backup_operations] | ||
| static void listBackupOperations(InstanceAdminClient instanceAdminClient, DatabaseId databaseId) { | ||
| static void listBackupOperations( |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
@olavloite pointed out that this is a non public method and hence can't be called so this will not be a breaking change
There was a problem hiding this comment.
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.
|
@asthamohta : can you update the PR to provide the description in the right format? |
ansh0l
left a comment
There was a problem hiding this comment.
Update the PR description
f36e29f to
474dfa8
Compare
README.md
Outdated
|
|
||
| ```Scala | ||
| libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.23.0" | ||
| libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.23.2" |
There was a problem hiding this comment.
nit: I don't think these version updates should be part of this PR
There was a problem hiding this comment.
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
| <groupId>org.openjdk.jmh</groupId> | ||
| <artifactId>jmh-core</artifactId> | ||
| <version>1.34</version> | ||
| <version>1.35</version> |
There was a problem hiding this comment.
This should happen automatically no? Why do we need to update jmh here?
| <groupId>com.google.cloud</groupId> | ||
| <artifactId>google-cloud-spanner</artifactId> | ||
| <version>6.21.2</version> | ||
| <version>6.23.2</version> |
There was a problem hiding this comment.
This is already part of this PR: https://github.com/googleapis/java-spanner/pull/1788/files
| <groupId>com.google.cloud</groupId> | ||
| <artifactId>libraries-bom</artifactId> | ||
| <version>25.0.0</version> | ||
| <version>25.1.0</version> |
There was a problem hiding this comment.
This should happen automatically in another PR (from dependabot)
|
|
||
| // [START spanner_list_backup_operations] | ||
| static void listBackupOperations(InstanceAdminClient instanceAdminClient, DatabaseId databaseId) { | ||
| static void listBackupOperations( |
There was a problem hiding this comment.
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.
…le.java Co-authored-by: Knut Olav Løite <koloite@gmail.com>
…ample.java Co-authored-by: Knut Olav Løite <koloite@gmail.com>
This reverts commit cdf4d17.
d9d234b to
0920a95
Compare
| OffsetDateTime.now().getOffset()).toString())); | ||
| expireTime.getSeconds(), | ||
| expireTime.getNanos(), | ||
| OffsetDateTime.now().getOffset()).toString())); |
There was a problem hiding this comment.
super nit: the .toString() is superfluous
Adding the following samples for Copy Backup: