-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feature/s3 storage #86
Conversation
The test cases depend on MiniO
An alembic migration has been introduced for it The LibraryRegistrar.register method uploads logos to S3 now
Thus removing 300+ deprecation warnings from the test result
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, just a few comments and it should be good to merge.
Some other minor changes
…efault boto3 credential management
This looks ready to go to me. Only reason I'm not approving it right now is that I would like to test the migrations against our production database before we merge. Going to get that test setup and make sure everything goes smoothly, then will approve. |
One for unsigned get-object requests, and another for signed put-object requests It seems we cannot do both through a single client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with a copy of the production database, and this worked well. I pushed a couple commits, that you should take a look at before merging @RishiDiwanTT and let me know if you have any feedback.
- Update
docker-compose.yml
to have minio and necessary env variables for testing - Updated the path of the stored logo to use the uuid instead of the ID. This is consistent with the other links we expose, the seem to use the uuid rather then the database ID of the item.
All looks good |
Description
Library registry now pushes the library logos it gets from the authentication documents to an S3 bucket
It also stores the URL for the logo in the
Library.logo_url
attributeThe logo file is stored with a
public-read
ACL, so no presigned urls are required, making it CDN friendlyThe storage class is written by abstracting away boto3 internals, so other platforms can be implemented when required.
Only basic operations have been implemented
Additionally,
Motivation and Context
The library-registry libraries feed did not contain the library logo urls, causing mobile apps to unnecessarily make additional requests to the CMs. This change is meant to reduce that traffic.
Notion
How Has This Been Tested?
Manually tested with a MiniO container, no S3 testing.
Unit tests have been written to encompass the change.
Checklist