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

fix: mc fails on uploading large files to gcs #25

Merged
merged 3 commits into from
Aug 16, 2023
Merged

fix: mc fails on uploading large files to gcs #25

merged 3 commits into from
Aug 16, 2023

Conversation

m90
Copy link
Contributor

@m90 m90 commented Aug 15, 2023

mc fails uploading larger files (> 12GB) to GCS. This PR moves the upload to use AWS CLI instead.

AWS CLI is Apache-2.0 licensed, so packaging it here shall be fine.

@m90 m90 force-pushed the fr/gsutil branch 3 times, most recently from 63f7aca to 33467a6 Compare August 15, 2023 17:33
@m90 m90 force-pushed the fr/gsutil branch 5 times, most recently from 917bd55 to 314343b Compare August 16, 2023 09:56
@m90 m90 marked this pull request as ready for review August 16, 2023 09:59
mc cp --recursive /backups/output/ remote/"$STORAGE_BUCKET_NAME"
AWS_ACCESS_KEY_ID=$STORAGE_ACCESS_KEY \
AWS_SECRET_ACCESS_KEY=$STORAGE_SECRET_KEY \
AWS_DEFAULT_REGION=us-east-1 \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is here so that boto does not bail. It does not have any effect.

@@ -1,5 +1,7 @@
#!/bin/bash

set -e
mc alias set remote "$STORAGE_ENDPOINT" "$STORAGE_ACCESS_KEY" "$STORAGE_SECRET_KEY" --api "$STORAGE_SIGNATURE_VERSION"
mc cp --recursive /backups/output/ remote/"$STORAGE_BUCKET_NAME"
AWS_ACCESS_KEY_ID=$STORAGE_ACCESS_KEY \
Copy link
Contributor Author

@m90 m90 Aug 16, 2023

Choose a reason for hiding this comment

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

This mapping of env vars is here so that:
a. we don't need chart changes
b. people could get confused about how we now need AWS credentials

Copy link
Contributor

@deer-wmde deer-wmde left a comment

Choose a reason for hiding this comment

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

I gotta say from an ops perspective I feel a bit uneasy about not just using the google client, but implementation wise this looks fine to me, so approved ✔️

@m90 m90 merged commit 0544201 into main Aug 16, 2023
4 checks passed
@m90 m90 deleted the fr/gsutil branch August 16, 2023 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants