googleapis / nodejs-spanner

Node.js client for Google Cloud Spanner: the world’s first fully managed relational database service to offer both strong consistency and horizontal scalability.
https://cloud.google.com/spanner/
Apache License 2.0
135 stars 99 forks source link

feat: allow multiple KMS keys to create CMEK database/backup #2099

Open hwin16 opened 2 weeks ago

hwin16 commented 2 weeks ago

Add kms_key_names field to create database/create backup code snippets.

snippet-bot[bot] commented 2 weeks ago

Here is the summary of changes.

You are about to add 4 region tags. - [samples/backups-copy-with-multiple-kms-keys.js:28](https://github.com/hwin16/nodejs-spanner/blob/e76e72cef3fc04976182d5baf220de4b6ddc45b6/samples/backups-copy-with-multiple-kms-keys.js#L28), tag `spanner_copy_backup_with_MR_CMEK` - [samples/backups-create-with-multiple-kms-keys.js:25](https://github.com/hwin16/nodejs-spanner/blob/e76e72cef3fc04976182d5baf220de4b6ddc45b6/samples/backups-create-with-multiple-kms-keys.js#L25), tag `spanner_create_backup_with_MR_CMEK` - [samples/backups-restore-with-multiple-kms-keys.js:25](https://github.com/hwin16/nodejs-spanner/blob/e76e72cef3fc04976182d5baf220de4b6ddc45b6/samples/backups-restore-with-multiple-kms-keys.js#L25), tag `spanner_restore_backup_with_MR_CMEK` - [samples/database-create-with-multiple-kms-keys.js:23](https://github.com/hwin16/nodejs-spanner/blob/e76e72cef3fc04976182d5baf220de4b6ddc45b6/samples/database-create-with-multiple-kms-keys.js#L23), tag `spanner_create_database_with_MR_CMEK`

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:

surbhigarg92 commented 2 weeks ago

Samples are missing Integration tests . Please add corresponding integration test for these samples.

hwin16 commented 5 days ago

@surbhigarg92 , Added integration tests. I have ran my test using 'span-cloud-testing' project and it passed. When you have approved the merge request and kokoro presubmit uses a different project, test cases will fail. Then, I will leave a todo and skip the test.

Screenshot 2024-09-07 at 11 46 23 PM

harshachinta commented 1 day ago

Had an offline discussion with @hwin16 . We will remove skipping tests and the PR will fail. We will merge this once the backend is ready.