-
Notifications
You must be signed in to change notification settings - Fork 2
Implement DRS Get Object for files (closes #86) #162
Conversation
Implements partial support for the DRS Get Object endpoint. This implementation does not permit using the Get Object endpoint to retrieve information on bundles or collections, and is missing access information due to ongoing access control work.
Codecov Report
@@ Coverage Diff @@
## master #162 +/- ##
==========================================
+ Coverage 78.15% 78.18% +0.02%
==========================================
Files 93 94 +1
Lines 6804 6825 +21
==========================================
+ Hits 5318 5336 +18
- Misses 1486 1489 +3
Continue to review full report at Codecov.
|
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.
There needs to be some small changes to this. We need to sort out the access_methods field thats returned. I would look at https://github.com/DataBiosphere/azul/blob/58c152df067da3fba40a8191977be2937bfa450b/src/azul/drs.py#L117
This would also mean that we would need 1 more endpoind, the current one being for the metadata, the other one being actually access the data.
# This only implements file access for now. As such, `expand` is ignored | ||
# `access_url` is also not implemented, pending FLAC work | ||
version = request.args.get("version", None) | ||
replica = request.args.get("replica", "aws") |
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.
can you make this a required parameter in the swagger yml?
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.
I could. Would we be breaking compatibility with the DRS API if we did so?
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.
Ah i see what your saying, perhaps we can return a 400 if there are missing query parameters that are required. @chmreid opinion?
Spoke with @amarjandu over Slack. Since we're only dealing with public files at this point, I'll update the Get Object endpoint to return presigned URLs to files but will not implement the Get Object Access endpoint since there's no point, as all file are already public anyway. |
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.
lets give this a shot.
Implements partial support for the DRS Get Object endpoint. This
implementation does not permit using the Get Object endpoint to
retrieve information on bundles or collections, and is missing
access information due to ongoing access control work.
Closes #86