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

api does not return information that OpenSearch says is public #355

Closed
plawton-umd opened this issue Jun 23, 2023 · 8 comments · Fixed by #359
Closed

api does not return information that OpenSearch says is public #355

plawton-umd opened this issue Jun 23, 2023 · 8 comments · Fixed by #359
Assignees
Labels
B14.0 bug Something isn't working i&t.skip s.high High severity

Comments

@plawton-umd
Copy link

plawton-umd commented Jun 23, 2023

Checked for duplicates

Yes

🐛 Describe the bug

When I did

$ curl --get 'https://pds.nasa.gov/api/search-sbnumd/1/bundles/urn:nasa:pds:dart_teleobs/products?limit=1' --header 'Accept: application/json' | json_pp 

action, I noticed that there were no expected information returned. Received

{
   "summary" : {
      "sort" : [],
      "hits" : 0,
      "q" : "",
      "limit" : 1,
      "properties" : [],
      "start" : 0,
      "took" : 29
   },
   "data" : []
}

The OpenSearch Dashboard says the bundle and its collections are public (and have been for hours).
Worked fine with other bundles made public before and after this one.

🕵️ Expected behavior

I expected the usual information to populate the json.

📜 To Reproduce

  1. curl --get 'https://pds.nasa.gov/api/search-sbnumd/1/bundles/urn:nasa:pds:dart_teleobs/products?limit=1' --header 'Accept: application/json' | json_pp 2.

...

🖥 Environment Info

  • Operating System: Linux
    ...

📚 Version of Software Used

No response

🩺 Test Data / Additional context

No response

🦄 Related requirements

🦄 #xyz

⚙️ Engineering Details

Note:
This also doesn't work:

$ curl --get 'https://pds.nasa.gov/api/search/1/products/urn:nasa:pds:dart_teleobs::1.0/members' --header 'Accept: application/json' | json_pp

But this members of the collections does:

$ curl --get 'https://pds.nasa.gov/api/search/1/products/urn:nasa:pds:dart_teleobs:data_ldtcal::1.0/members' --header 'Accept: application/json' | json_pp

...
  "summary" : {
      "hits" : 1161,
      "limit" : 100,
...

Test Data

https://pds-smallbodies.astro.umd.edu/holdings/pds4-dart_teleobs-v1.0/

@plawton-umd plawton-umd added bug Something isn't working needs:triage labels Jun 23, 2023
@plawton-umd plawton-umd changed the title <system feature> <is not/does not> <expected behaviour> api does not return information that OpenSearch says is public Jun 23, 2023
@jordanpadams jordanpadams transferred this issue from NASA-PDS/pds-api-client Jun 24, 2023
@jordanpadams
Copy link
Member

@plawton-umd not sure what is happening here. will assign a developer to take a look.

@tloubrieu-jpl @alexdunnjpl

@tloubrieu-jpl
Copy link
Member

tloubrieu-jpl commented Jun 26, 2023

Hi @plawton-umd ,

At first sight, I would link this error with this bug #341 which noted that the relationship bundles-collections is not retrievable anymore with the latest version of the API.

We still need to confirm the ticket I cited here but @alexdunnjpl is finishing another work that he started. He will look at your issue and #341 next.

Note that with the latest API version, the end-point which supports the operation you are doing is:

curl --get 'https://pds.nasa.gov/api/search-sbnumd/1/products/urn:nasa:pds:dart_teleobs/members/members?limit=1' --header 'Accept: application/json' | json_pp

(members, ie obs products, of members, ie collections, of the bundle)

As you could see, the following request does not work either:

curl --get 'https://pds.nasa.gov/api/search-sbnumd/1/products/urn:nasa:pds:dart_teleobs/members?limit=1' --header 'Accept: application/json' | json_pp

(members, ie collections, of the bundle)

We'll let you know when we understand better what the issue is.

Does not

@al-niessner
Copy link
Contributor

Duplicated problem on main branch. Fixed with changes on #359

$ curl -X GET 'http://localhost:8080/bundles/urn:nasa:pds:mars2020.spice::3.0/products'
{"summary":{"q":"","hits":14,"took":52,"start":0,"limit":100,"sort":[],...

Important part is 14 hits.

@tloubrieu-jpl
Copy link
Member

@plawton-umd I wanted to let you know this bug is fixed but it is not yet deployed in production, so you cannot see the improvment yet. I would like to wait for a few other major bugs to be fixed (@al-niessner is working on them) before we make a new release and deploy it in production.

@gxtchen
Copy link

gxtchen commented Oct 9, 2023

@tloubrieu-jpl I tried this on https://pds.nasa.gov/api/search-en-gamma/1/, urn:nasa:pds:dart_teleobs doesn't return any members, but all identifiers in "ref_lid_collection": [
"urn:nasa:pds:dart_teleobs:data_ldtcal",
"urn:nasa:pds:dart_teleobs:data_ldtddp",
"urn:nasa:pds:dart_teleobs:data_ldtraw",
"urn:nasa:pds:dart_teleobs:document_ldt"
],
returns members. Is this result successful?

@tloubrieu-jpl
Copy link
Member

Hi @gxtchen ,

The request https://pds.nasa.gov/api/search-sbnumd/1/bundles/urn:nasa:pds:dart_teleobs/products is deprecated, it might work but we don't guaranty that, instead you should test:
https://pds.nasa.gov/api/search-sbnumd/1/products/urn:nasa:pds:dart_teleobs/members

To get the members of a collection or a bundle.

Now you need to switch the test to a venue where the latest code is deployed, and change the bundle lid to one which is available in this venue.

So for that I would test on the docker compose deployment with a bundle existing in the test database, that works with: http://localhost:8081/products/urn:nasa:pds:mars2020.spice/members

At last you need to check that this return as many collections as identified in the test dataset for this bundle.

Does that make sense ?

That is a test we should add to the postman suite. This test will also validate ticket #341.

@miguelp1986
Copy link

@tloubrieu-jpl can you explain how to verify the number of collections in http://localhost:8081/products/urn:nasa:pds:mars2020.spice/member? Is it by the number of times I see "type" : "Product_Collection"?

@jordanpadams
Copy link
Member

Added i&t.skip label because this was tested for I&T, but does not need to be included in automated integration tests. These should already be caught in baseline regression tests moving forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B14.0 bug Something isn't working i&t.skip s.high High severity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants