Skip to content
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

members query return 500 when members do not exist in the registry or alternate_id does not exists #411

Closed
tloubrieu-jpl opened this issue Feb 27, 2024 · 8 comments Β· Fixed by #414
Assignees
Labels
B14.1 bug Something isn't working s.critical

Comments

@tloubrieu-jpl
Copy link
Member

tloubrieu-jpl commented Feb 27, 2024

Checked for duplicates

Yes - I've already checked

πŸ› Describe the bug

When I did the request:
https://pds.nasa.gov/api/search/1.0/products/urn:nasa:pds:cassini_iss_cruise:xml_schema::1.0/members

I got a 500 error.

πŸ•΅οΈ Expected behavior

I expected to get the members of the collection. As it does with request https://pds.nasa.gov/api/search/1.0/products/urn:nasa:pds:orex.ovirs:data_calibrated::11.0/members

πŸ“œ To Reproduce

No response

πŸ–₯ Environment Info

  • Version of this software 1.4.0 deployed in production

πŸ“š Version of Software Used

No response

🩺 Test Data / Additional context

See cloudwatch logs at 2024-02-26T22:31:52.081-05:00:

2024-02-27T03:31:52.079Z ERROR 1 --- [-nio-80-exec-10] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.NullPointerException] with root cause

πŸ¦„ Related requirements

πŸ¦„ #xyz

βš™οΈ Engineering Details

No response

@tloubrieu-jpl
Copy link
Member Author

@alexdunnjpl It sounds like the error comes from the code expecting alternate_ids to find the ancestor whereas alternate_ids are not always available.
See line

List<String> targetProductAlternateIds = QuickSearch.getValues(control.getConnection(), false, parentCollectionLidvid, "alternate_ids");

@jordanpadams
Copy link
Member

@tloubrieu-jpl @alexdunnjpl for this collection, it looks like it contains all secondary references, of which, those products have not yet been registered.
https://pds-rings.seti.org/pds4/bundles/cassini_iss_cruise//xml_schema/collection_xml_schema.xml
https://pds-rings.seti.org/pds4/bundles/cassini_iss_cruise//xml_schema/collection_xml_schema.csv

@jordanpadams jordanpadams changed the title members query return 500 members query return 500 when members do not exist in the registry Feb 27, 2024
@tloubrieu-jpl
Copy link
Member Author

@jordanpadams, I am meeting with @alexdunnjpl to confirm before our Registry workshop this morning.

@tloubrieu-jpl tloubrieu-jpl changed the title members query return 500 when members do not exist in the registry members query return 500 when members do not exist in the registry or alternate_id does not exists Feb 27, 2024
@tloubrieu-jpl
Copy link
Member Author

tloubrieu-jpl commented Feb 27, 2024

Alternate ids has been added by the following commit NASA-PDS/registry-common@a08168e

First release in registry-common/1.2.0 (see https://github.com/NASA-PDS/registry-common/releases/tag/v1.2.0).

Used in harvest v3.6.0 and after (but not before).

This is confirmed by the kibana visualization here:

image

@tloubrieu-jpl
Copy link
Member Author

@alexdunnjpl I believe you can start looking at a development in sweepers to add an alternate_ids when it is missing.

@alexdunnjpl
Copy link
Contributor

@tloubrieu-jpl if alternate_ids is just "the lid plus the lidvid" and it doesn't even provide the added value of tracking renames, is there any point to maintaining it?

@tloubrieu-jpl
Copy link
Member Author

@alexdunnjpl , the intention was to use it for renamed lids as well, but I am not sure where we are with that. We can discuss that during the breakout today.

@tloubrieu-jpl
Copy link
Member Author

We decided during the breakout to change the registry-api code to not use anymore the alternate_ids but the actual identifier (_id or lidvid).

@alexdunnjpl is analyzing this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B14.1 bug Something isn't working s.critical
Projects
Status: 🏁 Done
Development

Successfully merging a pull request may close this issue.

3 participants