-
Notifications
You must be signed in to change notification settings - Fork 1.6k
#1071: fix BQ system tests under Py3k #1074
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
#1071: fix BQ system tests under Py3k #1074
Conversation
Prevents TypeError in 'writerow()' on Py3k. Fixes #1071.
Avoids blowing up the cleanup code, stranding the bucket.
@dhermes PTAL. |
Makes me think we should also have |
@tseaver Running system tests now on local machine. Should be done soon. |
We could make |
BTW, do you have access to clean up the stranded buckets on the Travis project's console? |
Yes I do. Just deleted the 2 most recent from test failures |
LGTM. System tests all passing. |
#1071: fix BQ system tests under Py3k
)](GoogleCloudPlatform/python-docs-samples#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.
See #1071.