-
Notifications
You must be signed in to change notification settings - Fork 2
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
Object ID Versioning #37
Comments
related to #22 |
RE: @syntheticgio
The two different URL endpoints are here: Lines 169 to 174 in a68a768
From what I have tested the My thinking was to get rid of the Thoughts? |
That sounds fine to me. Does the latter work when given correct info? What should it return if there isn’t an exact match?
… On Nov 13, 2021, at 8:28 AM, Hadley King ***@***.***> wrote:
RE: @syntheticgio
that’s an actual RESTful design which isn’t currently implemented properly. I’ll take a look at how to filter down to that in the DB and I think it’s like a 10 min change.
Actually looks like this is already implemented. I’ll try to check to make sure the functionality is what you’ve described but looks like it.
It takes ‘object root/version id’ and should work in your 2.0.0/4.0.0 version
The two different URL endpoints are here:
https://github.com/biocompute-objects/bco_api/blob/a68a768591a47e311cc81322118af0f76d1b6175/bco_api/api/urls.py#L169-L174
From what I have tested the <str:object_id_root> URL does not work, and the <str:object_id_root>/<str:object_id_version> will fail with a 500 if an exact match is not made.
My thinking was to get rid of the <str:object_id_root> and fix the logic for the <str:object_id_root>/<str:object_id_version> so that is can handle ALL the logic for what we are talking about.
Thoughts?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
So when I look at this, it looks like you want But I don't know what the ID part is in this case. The PREFIX is fixed in the object metadata (although it doesn't show in the object listing) as well as the VERSION (user sets it during build). For an object I created through the builder (and manually marked as PUBLISHED in the DB), I see this: {"object_id": "http://127.0.0.1:8000/BCO_DRAFT_b6ca21b33f3f4ef686cf81f33b97aa6e", "spec_version": "IEEE", "eTag": "", "provenance_domain": {"name": "testBCO", "version": "1", "created": "Sun Nov 14 2021 17:51:48 GMT-0500 (Eastern Standard Time)", "modified": "2021-11-14T22:52:20.894Z", "contributors": [{"contribution": ["createdBy"], "name": "John", "affiliation": "GWU"}], "license": "None"}, "usability_domain": ["Anywhere"], "description_domain": {"keywords": [""], "pipeline_steps": [{"step_number": 0, "name": "", "description": "", "prerequisite": [{"name": "", "uri": {"uri": ""}}], "input_list": [{"uri": ""}], "output_list": [{"uri": ""}]}]}, "execution_domain": {"script": [{"uri": {"uri": ""}}], "script_driver": "", "software_prerequisites": [{"name": "", "version": "", "uri": {"uri": ""}}], "external_data_endpoints": [{"name": "", "url": ""}], "environment_variables": {}}, "io_domain": {"input_subdomain": [{"uri": {"uri": ""}}], "output_subdomain": [{"mediatype": "", "uri": {"uri": ""}}]}, "parametric_domain": [{"param": "", "value": "", "step": ""}]} Is |
MR 42 seems to work (at least at a basic level) if the above is what you want @HadleyKing |
Looks like it is working to support |
NOTE: this does look like authentication w/ the bco database is required for this to work - is that intended? |
The first part of this ticket is finished, but working on the second part:
Will try to get it done tonight, its a decent bit of non difficult code so will take an hour or two. |
This needs to work WITHOUT authentication. It is a mistake as returning a versioned object was originally intended to be only for authenticated access. But anything that is PUBLISHED should be public, IMO |
Ok, looks like the underlying issue is fixed with only the most recent versions. I'm going to make a different ticket for this not requiring authentication although that might be tricky (since the authentication and user component are being defined by the token). This is ready to be tested (seems to be working for me in my testing, but should be validated if possible), and merging. |
I've changed it for the time being to reflect:
This is through the BCO API. I suspect that additionally this wanted to be supported via the Portal. Will make a separate ticket for that though (in the Portal repo). |
Tested and merged; closing. |
The BCO_API should handle versioning the way NCBI does for GenBank records.
For Example:
should be different object in the DB but available by requesting that specific URL or object...
but https://biocomputeobject.org/BCO_28 should ONLY return https://biocomputeobject.org/BCO_28/1.1 as that is the most RECENT version.
Also the object listing [
/api/objects/token/
] should only return the most RECENT version by default.The text was updated successfully, but these errors were encountered: