-
Notifications
You must be signed in to change notification settings - Fork 27
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
✨ Add exporter code to storage #7218
base: master
Are you sure you want to change the base?
✨ Add exporter code to storage #7218
Conversation
…stream-worker-code
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7218 +/- ##
==========================================
- Coverage 87.31% 87.24% -0.08%
==========================================
Files 1712 1550 -162
Lines 66429 62729 -3700
Branches 1125 909 -216
==========================================
- Hits 58004 54726 -3278
+ Misses 8105 7733 -372
+ Partials 320 270 -50
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
…stream-worker-code
…stream-worker-code
…stream-worker-code
…stream-worker-code
…stream-worker-code
…stream-worker-code
…stream-worker-code
…stream-worker-code
|
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.
thx
@@ -45,7 +46,9 @@ | |||
) | |||
|
|||
# Storage basic file ID | |||
SIMCORE_S3_FILE_ID_RE = rf"^(api|({UUID_RE_BASE}))\/({UUID_RE_BASE})\/(.+)$" | |||
SIMCORE_S3_FILE_ID_RE = ( | |||
rf"^(api\/{UUID_RE_BASE}|exports\/\d+|{UUID_RE_BASE}\/{UUID_RE_BASE})\/(.+)$" |
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.
TIP: might be easier to read with a constant ?
Would lead to something like
rf`^{API_PREFIX_RE}|{EXPORTS_USER_RE}|\/{UUID_RE_BASE}\/{UUID_RE_BASE}`\/(.+)$
?
@pytest.mark.parametrize( | ||
"object_key", | ||
[ | ||
f"api/{UUID_0}/some-random-file.png", |
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.
Seeing these, I would rather add a union of three patterns
@@ -334,6 +335,10 @@ async def get_file_access_rights( | |||
# ownership still not defined, so we assume it is user_id | |||
return AccessRights.all() | |||
|
|||
if parent == "exports": |
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.
Shared constant or make sure it is synced via tests
for entry in meta_data_files: | ||
source_object_keys.add(entry.object_key) | ||
|
||
_logger.debug("will archive '%s' files", len(source_object_keys)) |
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.
NIONR:log context might be more informative?
await self.abort_file_upload( | ||
user_id=user_id, file_id=destination_object_key | ||
) | ||
raise |
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.
who is handling this exception?
What do these changes do?
Add functionality in the
simcore_s3_dsm
that allows to export an archive, given a list of S3 object_keys.Expose functionality to the frontend via the celery job endpoint.
Related issue/s
How to test
Dev-ops checklist