pyro-api icon indicating copy to clipboard operation
pyro-api copied to clipboard

Use a bucket per organization

Open RonanMorgan opened this issue 1 year ago • 1 comments

It seems to me that it's a bit more secure and the images will be simpler to gather for data scientist if we save all the images of the same organization in one bucket. Furthermore I have added the camera_id in the name of the picture.

RonanMorgan avatar Jun 26 '24 14:06 RonanMorgan

Codecov Report

Attention: Patch coverage is 81.44330% with 18 lines in your changes missing coverage. Please review.

Project coverage is 86.58%. Comparing base (7441114) to head (bd709cc). Report is 1 commits behind head on main.

Files Patch % Lines
src/app/services/storage.py 84.37% 10 Missing :warning:
src/app/api/api_v1/endpoints/organizations.py 45.45% 6 Missing :warning:
src/app/api/api_v1/endpoints/detections.py 95.00% 1 Missing :warning:
src/app/db.py 50.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #336      +/-   ##
==========================================
- Coverage   87.01%   86.58%   -0.44%     
==========================================
  Files          31       31              
  Lines         801      857      +56     
==========================================
+ Hits          697      742      +45     
- Misses        104      115      +11     
Flag Coverage Δ
backend 86.18% <81.44%> (-0.45%) :arrow_down:
client 91.80% <ø> (ø)

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 26 '24 14:06 codecov[bot]

With the recent updates, here is what the PR does:

  • switch from "one bucket for all" strategy to "one bucket per organization"
  • cleans S3 storage interactions (check later #362)
  • add proper storage initialization in db.py
  • update tests accordingly

frgfm avatar Aug 24 '24 08:08 frgfm

cf. #304

frgfm avatar Aug 24 '24 09:08 frgfm