Skip to content

feat: Added support of alternative S3 storage#220

Merged
frgfm merged 18 commits into
masterfrom
s3-bucket
Oct 11, 2022
Merged

feat: Added support of alternative S3 storage#220
frgfm merged 18 commits into
masterfrom
s3-bucket

Conversation

@frgfm

@frgfm frgfm commented Oct 10, 2022

Copy link
Copy Markdown
Member

This PR adds support for alternative S3 storage interfaces, and refactors QarnotBucket as an S3Bucket. Additionally, this PR improves the media upload route:

  • previously, we uploaded the file, then downloaded it to check that the hash is identical (1 upload + 1 download)
  • with this PR, we upload the file, then only read the MD5 hash computed by S3 file system (1 upload)
    This should speed up the route while decreasing bandwidth requirements.

Any feedback is welcome!

@frgfm frgfm added type: improvement New feature or request module: services labels Oct 10, 2022
@frgfm frgfm added this to the 0.2.0 milestone Oct 10, 2022
@frgfm
frgfm requested a review from a team October 10, 2022 22:52
@frgfm frgfm self-assigned this Oct 10, 2022
@codecov

codecov Bot commented Oct 11, 2022

Copy link
Copy Markdown

Codecov Report

Merging #220 (fb06278) into master (e4edd58) will increase coverage by 0.55%.
The diff coverage is 60.93%.

@@            Coverage Diff             @@
##           master     #220      +/-   ##
==========================================
+ Coverage   93.52%   94.07%   +0.55%     
==========================================
  Files          46       47       +1     
  Lines        1281     1282       +1     
==========================================
+ Hits         1198     1206       +8     
+ Misses         83       76       -7     
Flag Coverage Δ
unittests 94.07% <60.93%> (+0.55%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/app/services/bucket/s3.py 45.65% <45.65%> (ø)
src/app/api/routes/media.py 86.84% <100.00%> (+3.29%) ⬆️
src/app/api/security.py 100.00% <100.00%> (ø)
src/app/config.py 94.28% <100.00%> (+0.73%) ⬆️
src/app/services/bucket/__init__.py 100.00% <100.00%> (ø)
src/app/services/bucket/qarnot.py 100.00% <100.00%> (+49.15%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@frgfm
frgfm merged commit fa878b8 into master Oct 11, 2022
@frgfm
frgfm deleted the s3-bucket branch October 11, 2022 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant