-
Notifications
You must be signed in to change notification settings - Fork 5
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
registry-api does not return latest version of product metadata when multiple versions are harvested #224
Comments
Per @jordanpadams, resolved in #193 - whether this should be closed immediately or confirmed as fixed once the changes make it into the docker cluster I'll leave up to him. |
@alexdunnjpl can you verify if this is still an issue or not? |
Will-do today |
I just got info on how to access pdscloud-prod1 as pds4 so I'll be deploying the provenance script today - please wait until tomorrow to test the all/latest feature. |
@jordanpadams I'm still experiencing this issue despite running provenance.py on my local instance and confirming that the db document was correctly updated with provenance information:
both return version 7.0. We have the provenance script, but was there actually ever a modification to the API to use the extra superseded_by metadata? |
@al-niessner can you checkout what is going on here? |
@alexdunnjpl ☝️ |
@al-niessner @alexdunnjpl whatever the outcome from this investigation, can we make sure we have some tests either in this repo or wherever we are maintaining our tests to make sure we check something like this? This should be a base case test we need. |
@alexdunnjpl @jimmie @jordanpadams @tloubrieu-jpl This is ancient code and probably still in use: registry-api/service/src/main/java/gov/nasa/pds/api/registry/model/LidVidUtils.java Lines 65 to 91 in 40f8c11
While the filtering for latest was added here: registry-api/service/src/main/java/gov/nasa/pds/api/registry/model/ProductQueryBuilderUtil.java Lines 68 to 71 in 40f8c11
to fix many of the searches that do not specifically look for latest, like q or keyword, but none of the logic to fix those that specifically search for the latest lidvid which use the ancient code. As I have said previously, the line registry-api/service/src/main/java/gov/nasa/pds/api/registry/model/LidVidUtils.java Line 85 in 40f8c11
In the end it is registry-api/service/src/main/java/gov/nasa/pds/api/registry/model/LidVidUtils.java Line 65 in 40f8c11
I can do it if @alexdunnjpl is not already on it. I am just not interested in competitive speed typing so will wait to see who is going to do the rewrite. |
Thanks for digging up all that context! @jordanpadams I can do it if it's not something that needs to get sorted yesterday, Regarding versions/sorting, is not viable to do something like
Obviously the provenance metadata was put there in part so that we could use it here, but if you have a complete set of lidvids for a given lid just sitting there in a collection, seems like maybe the better option to just sort them without relying on the provenance state? If we don't have a |
Add classes for LID/VID/LIDVID and fix #224
🐛 Describe the bug
Given that v7.0 of the example product is harvested and set to archived status, if v14.0 is harvested and ingested:
📜 To Reproduce
Steps to reproduce the behavior:
int-registry-batch-loader
profile (which includesurn:nasa:pds:insight_rad:data_derived::7.0
harvest
against the latest version ofurn:nasa:pds:insight_rad
bundleregistry-mgr
against the LIDVID of the bundle ordata_derived
collectioncurl --get 'http://localhost:8080/collections/urn:nasa:pds:insight_rad:data_derived' | json_pp
, observe v7.0 metadata returnedcurl --get 'http://localhost:8080/collections/urn:nasa:pds:insight_rad:data_derived::14.0' | json_pp
(i.e latest version LIDVID), observe v7.0 metadata returned🕵️ Expected behavior
Expect return of v14.0 metadata
📚 Version of Software Used
Docker image
nasapds/registry-api-service:1.1.11
The text was updated successfully, but these errors were encountered: