Automattic / hostmgr

A tool for managing macOS VM hosts
Mozilla Public License 2.0
8 stars 3 forks source link

Only publish git mirror if the archive file is 50 MB or larger #72

Closed crazytonyli closed 7 months ago

crazytonyli commented 7 months ago

I ran into an error (see this build) that's caused by the hostmgr cache publish-git-mirror command.

Error: Your proposed upload is smaller than the minimum allowed size

The root cause is S3 has a minimal size requirement for each part in a multipart uploads. In this PR, I added a archive file size check: if it's too small, don't bother upload it to S3 because the git repo should be pretty fast to checkout.