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

samples: adds samples for CMEK #989

Merged
merged 8 commits into from Mar 25, 2021
Merged

samples: adds samples for CMEK #989

merged 8 commits into from Mar 25, 2021

Conversation

thiagotnunes
Copy link
Contributor

Adds samples to create an encrypted database, to create an encrypted backup and to restore to an encrypted database.

@thiagotnunes thiagotnunes requested a review from a team as a code owner March 18, 2021 01:07
@thiagotnunes thiagotnunes requested a review from a team March 18, 2021 01:07
@thiagotnunes thiagotnunes requested a review from a team as a code owner March 18, 2021 01:07
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Mar 18, 2021
@product-auto-label product-auto-label bot added api: spanner Issues related to the googleapis/java-spanner API. samples Issues that are directly related to samples. labels Mar 18, 2021
@snippet-bot
Copy link

snippet-bot bot commented Mar 18, 2021

Here is the summary of changes.

You are about to add 3 region tags.

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

@codecov
Copy link

codecov bot commented Mar 18, 2021

Codecov Report

Merging #989 (4a7b0d5) into master (459a477) will increase coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@             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     
Impacted Files Coverage Δ Complexity Δ
...ava/com/google/cloud/spanner/v1/SpannerClient.java 86.52% <0.00%> (ø) 49.00% <0.00%> (ø%)
.../com/google/cloud/spanner/AbstractReadContext.java 86.54% <0.00%> (ø) 42.00% <0.00%> (ø%)
...om/google/cloud/spanner/TransactionRunnerImpl.java 86.07% <0.00%> (+0.14%) 10.00% <0.00%> (ø%)
...ain/java/com/google/cloud/spanner/SessionPool.java 89.12% <0.00%> (+0.19%) 73.00% <0.00%> (+1.00%)
...m/google/cloud/spanner/connection/SpannerPool.java 87.89% <0.00%> (+0.52%) 33.00% <0.00%> (ø%)
...ud/spanner/SessionPoolAsyncTransactionManager.java 87.21% <0.00%> (+1.50%) 14.00% <0.00%> (+2.00%)
.../google/cloud/spanner/SpannerExceptionFactory.java 87.96% <0.00%> (+2.77%) 48.00% <0.00%> (+2.00%)
...a/com/google/cloud/spanner/SpannerRetryHelper.java 84.61% <0.00%> (+3.66%) 3.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 459a477...4a7b0d5. Read the comment docs.

Base automatically changed from cmek to master March 18, 2021 04:58
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.

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?

@thiagotnunes
Copy link
Contributor Author

@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.

@google-cla
Copy link

google-cla bot commented Mar 19, 2021

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Mar 19, 2021
Adds samples to create an encrypted database, to create an encrypted
backup and to restore to an encrypted database.
@google-cla google-cla bot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Mar 19, 2021
@kurtisvg kurtisvg removed their assignment Mar 19, 2021
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.
@thiagotnunes thiagotnunes marked this pull request as ready for review March 25, 2021 01:41
@thiagotnunes thiagotnunes merged commit 9132c21 into master Mar 25, 2021
@thiagotnunes thiagotnunes deleted the cmek-samples branch March 25, 2021 03:31
olavloite added a commit that referenced this pull request Apr 8, 2021
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. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants