MarkEdmondson1234 / googleCloudRunner

Easy R scripts on Google Cloud Platform via Cloud Run, Cloud Build and Cloud Scheduler
https://code.markedmondson.me/googleCloudRunner/
Other
81 stars 26 forks source link

Binary Secrets corrupted #130

Closed muschellij2 closed 2 years ago

muschellij2 commented 2 years ago

(Issue is just for tracking, solved via PR already)

Binary files (aka .rds files) can get corrupted in cr_buildstep_secret, as per https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets#a_note_on_resource_consistency

Cloud SDK formats the output as UTF-8 which can corrupt binary secrets. To get the raw bytes, have Cloud SDK print the response as base64-encoded and decode.

This is fixed via: https://github.com/MarkEdmondson1234/googleCloudRunner/pull/122/files#diff-a32ecf0d4ec919fca224acfc5f20bb669e946d7fe0b9eafc3df70ce486a4c66fR696