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

feat: upload file using an s3 client #24

Merged
merged 5 commits into from
Aug 14, 2023
Merged

feat: upload file using an s3 client #24

merged 5 commits into from
Aug 14, 2023

Conversation

m90
Copy link
Contributor

@m90 m90 commented Aug 9, 2023

@m90 m90 force-pushed the fr/client-copy branch 10 times, most recently from 6603e9c to fe60e76 Compare August 9, 2023 13:39
Dockerfile Outdated
&& apt-get install --yes gcsfuse=0.40.0 --no-install-recommends \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
mariadb-client=1:10.1.48-0ubuntu0.18.04.1 && \
curl https://dl.min.io/client/mc/release/linux-amd64/mc \
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 should still be locked down to a specific version.

@m90
Copy link
Contributor Author

m90 commented Aug 10, 2023

Chart update here wbstack/charts#125

else
echo "Skip uploading..."
echo "Skipping upload as DO_UPLOAD is not set..."
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could also remove this option now as we can also "upload" in local environments.

src/upload.sh Outdated

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"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
mc cp --recursive /backups/output remote/"$STORAGE_BUCKET_NAME"
mc cp --recursive /backups/output/ remote/"$STORAGE_BUCKET_NAME"

This way (with the trailing / for the source directory) it does not create a output folder in the bucket which mimics the current behaviour

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, this is a nice find. Thanks. Will also update the test case then.

@m90 m90 merged commit 4dc571a into main Aug 14, 2023
4 checks passed
@m90 m90 deleted the fr/client-copy branch August 14, 2023 11:53
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