Skip to content

migrate code from googleapis/python-kms - #8470

Merged
dandhlee merged 136 commits into
mainfrom
python-kms-migration
Nov 14, 2022
Merged

migrate code from googleapis/python-kms#8470
dandhlee merged 136 commits into
mainfrom
python-kms-migration

Conversation

@rsamborski

@rsamborskirsamborski commented Nov 8, 2022

Copy link
Copy Markdown
Member

Description

Samples migration from https://github.com/googleapis/python-kms

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

@product-auto-labelproduct-auto-labelBot added the samples Issues that are directly related to samples. label Nov 8, 2022
@google-cla

google-claBot commented Nov 8, 2022

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@rsamborskirsamborski self-assigned this Nov 8, 2022
@rsamborskirsamborski added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 8, 2022
@rsamborski
rsamborski marked this pull request as ready for review November 8, 2022 22:14
@rsamborski
rsamborski requested review from a team as code ownersNovember 8, 2022 22:14
@snippet-bot

snippet-botBot commented Nov 8, 2022

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 42 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

@dandhlee
dandhlee requested a review from nicainNovember 8, 2022 22:31
@dandhlee

Copy link
Copy Markdown
Collaborator

Nick, could you help take a look for this migration?

@kokoro-teamkokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 8, 2022
Comment thread.github/CODEOWNERS
Comment thread.github/CODEOWNERS
Comment threadkms/attestations/noxfile.py Outdated
Comment threadkms/snippets/noxfile.py Outdated

@chalmerlowechalmerlowe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dandhleedandhlee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add blunderbuss.yml for api: cloudkms?

ryanmatsand others added 12 commits November 14, 2022 11:30
* Draft of first half of KMS samples
* reversed wrong change
* KMS Apiary Python samples - P1
* Few minor style issues
* Adding back in space i accidentally deleted
* Addressed all code review comments
* Renamed api directory to api-client
* Addressed more code review comments
* Formatting change
* Fix quickstart test
Change-Id: Ib79dc1345c9c40547f3fd4e9c3c9a48963a3b399
* Update readme
Change-Id: Icf4a66083f56d6f51be76ba1cf3b5dc8daf2c4c1
* Add readme
Change-Id: I2fbaa55092ef8787f1423d499aa310cab258c0c1
* Added parsers
* Final minor changes to parsers
* Added autogenerated README
* Changed snippets_test keyring name and cryptokey name
* random generation of keyring / cryptokey names
* Fixed formatting of keyring name and cryptokey name
* Remove cloud config fixture
* Fix client secrets
* Fix bigtable instance
)](#1074)
The use of base64 is essentially an implementation detail of the Cloud KMS REST
API: it is required only so that arbitrary binary data can be included in a JSON
string, which only allows Unicode characters. Therefore, the "encrypt" sample
function should decode the base64-encoded ciphertext before writing the
file. Similarly, "decrypt" should not assume that an input file is
base64-encoded, but should perform the base64-encoding itself before sending the
encrypted data to KMS.
This aligns with how the "gcloud kms encrypt" and "gcloud kms decrypt" commands
behave. See https://stackoverflow.com/q/45699472 for an example of user
confusion caused by the mismatch.
…1075)
In particular, this change:
- changes to use a consistent "_id" suffix for resource name components
- uses "data" instead of "text", since encryption is not restricted to text
- substitutes "ciphertext" for "encrypted {text, data}"
- spells "crypto key" and "key ring" each as two separate words, as in the API
Tracking bug: http://b/64758639
* Auto-update dependencies.
* Relax assertions in the ocr_nl sample
Change-Id: I6d37e5846a8d6dd52429cb30d501f448c52cbba1
* Drop unused logging apiary samples
Change-Id: I545718283773cb729a5e0def8a76ebfa40829d51
Change-Id: I03b5eaef8b17ac3dc3c0339fd2c7447bd3e11bd2
* Auto-update dependencies.
* Fix missing http library
Change-Id: I99faa600f2f3f1f50f57694fc9835d7f35bda250
renovate-botand others added 20 commits November 14, 2022 11:30
* chore(python): drop python 3.6
Source-Link: googleapis/synthtool@4f89b13
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c
* add api_description to .repo-metadata.json
* require python 3.7+ in setup.py
* remove python 3.6 sample configs
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* chore(deps): update all dependencies
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* revert
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* chore(deps): update all dependencies
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* revert
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Source-Link: googleapis/synthtool@50db768
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e09366bdf0fd9c8976592988390b24d53583dd9f002d476934da43725adbb978
@rsamborski

Copy link
Copy Markdown
MemberAuthor

Could you also add blunderbuss.yml for api: cloudkms?

@dandhlee Done.

Comment thread.github/blunderbuss.yml

@dandhleedandhlee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Overriding CLA and merging.

@dandhlee
dandhlee merged commit 88cf2fe into mainNov 14, 2022
@dandhlee
dandhlee deleted the python-kms-migration branch November 14, 2022 20:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samplesIssues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@rsamborski@dandhlee@chalmerlowe@kokoro-team@ryanmats@dpebot@philcoakley@WalterHub@frankyn@daniel-sanche@engelke@gguuss@renovate-bot@kurtisvg@busunkim96@sethvargo@bkuang@runargs@yoshi-automation@arithmetic1728