singularityhub / sregistry-cli

Singularity Global Client for container management
https://singularityhub.github.io/sregistry-cli/
Mozilla Public License 2.0
14 stars 18 forks source link

S3: fix bug when self.base == None #199

Closed tschoonj closed 5 years ago

tschoonj commented 5 years ago

boto3.client and boto3.resource return different types of objects and only the latter in the latter case does the returned instance have a buckets attribute. This patch uses boto3.resource regardless of self.base being set, which works fine. It will now also appropriately deal with IAM policies that do not allow its user to retrieve the list of buckets, and will instead check directly if the bucket named $SREGISTRY_S3_BUCKET exists or not.

vsoch commented 5 years ago

If you've tested this and confirmed working, I'm happy to merge! Please bump the version to 0.2.01 and add a note to the changelog with what you've changed.

tschoonj commented 5 years ago

Yep it definitely works, but I still suffer from the minor issue #200

I will do the bump and update the changelog in a moment

vsoch commented 5 years ago

suffer is probably not the right word to describe something so small :) We can fix that too.

vsoch commented 5 years ago

https://pypi.org/project/sregistry/0.2.1/