-
Notifications
You must be signed in to change notification settings - Fork 123
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
samples: adds samples for CMEK #989
Conversation
Here is the summary of changes. You are about to add 3 region tags.
This comment is generated by snippet-bot.
|
Codecov Report
@@ Coverage Diff @@
## master #989 +/- ##
============================================
+ Coverage 85.07% 85.14% +0.06%
- Complexity 2617 2621 +4
============================================
Files 154 154
Lines 14319 14329 +10
Branches 1331 1334 +3
============================================
+ Hits 12182 12200 +18
+ Misses 1569 1565 -4
+ Partials 568 564 -4
Continue to review full report at Codecov.
|
samples/snippets/src/main/java/com/example/spanner/CreateBackupWithEncryptionKey.java
Outdated
Show resolved
Hide resolved
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.
More in general: This adds additional backup and restore operations to the total set of integration tests. Backup and restore operations can take a long time, so is this something that we really want?
samples/snippets/src/main/java/com/example/spanner/CreateBackupWithEncryptionKey.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/spanner/CreateDatabaseWithEncryptionKey.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/spanner/CreateBackupWithEncryptionKey.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/spanner/CreateBackupWithEncryptionKey.java
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/spanner/RestoreBackupWithEncryptionKey.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/test/java/com/example/spanner/DatabaseIdGenerator.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/test/java/com/example/spanner/EncryptionKeyIT.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/test/java/com/example/spanner/EncryptionKeyIT.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/test/java/com/example/spanner/SampleRunner.java
Outdated
Show resolved
Hide resolved
4f59387
to
422c379
Compare
@olavloite that is a good question. I think that it is important to have these sample tests even if the backup / restore operations take a long time. However, I think we should move the samples tests to be executed in the nightly build only. This way we do not impact the day to day operation. |
422c379
to
53c15db
Compare
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
Adds samples to create an encrypted database, to create an encrypted backup and to restore to an encrypted database.
53c15db
to
df8ec2a
Compare
samples/snippets/src/main/java/com/example/spanner/CreateBackupWithEncryptionKey.java
Outdated
Show resolved
Hide resolved
Prints out the user provided key in the encrypted backup sample, instead of printing out the Backup.encryption_info.kms_key_version. This should align with the key that we are printing on the other samples (instead of printing a key version).
Verifies that the key used in the create backup is returned in the response correctly.
Adds samples to create an encrypted database, to create an encrypted backup and to restore to an encrypted database.