Closed jordanpadams closed 1 year ago
@jimmie @tloubrieu-jpl @nutjob4life see task list at bottom of ticket for what I think needs to be done here. this should go towards the top of your list for Monday.
API on pds.nasa.gov is responding w/ valid responses. I'm not familiar with what endpoint pds-gamma is currently supporting.
@jimmie have you been able to test out the client code?
1- I have been able to reproduce the error 503 with the pds.api-client when the root url of the API contains a /
at the end as in the example https://pds.nasa.gov/api/search/1.0/
.
We can reproduce that with request:
curl -H Accept:application/json 'https://pds.nasa.gov/api/search/1.0//bundles/urn:nasa:pds:cassini_iss_cruise::1.0'
The naked pds.api-client generated by the openapi-generator does not handle this extra '/' by default. I guess that should be done by the client library. I can check for the next version if there is an option to do that, otherwise we will need to wait for the wrapper to be developed.
In the meantime, deep-archive should also check that there is not extra '/'
2 - When the is no extra /, and the lidvid exists, pds.api-client work, and equivlent request is:
curl -H Accept:application/json 'https://pds.nasa.gov/api/search/1.0/bundles/urn:nasa:pds:duxbury_pdart14_mariner69::2.0'
3 - but without the extra / and with a not found lidvid, we are getting an internal server error (500) instead of 404.
The equivalent curl request is:
curl -H Accept:application/json 'https://pds.nasa.gov/api/search/1.0/bundles/urn:nasa:pds:cassini_iss_cruise::1.0'
The server side logs gives:
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
So I assume this is a registry-api bug.
I checked with the version for which I am preparing a point build, and the bug is solved:
% curl -H Accept:application/json 'http://localhost:8080/bundles/urn:nasa:pds:cassini_iss_cruise::1.0' --verbose
* Trying ::1:8080...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
> GET /bundles/urn:nasa:pds:cassini_iss_cruise::1.0 HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.68.0
> Accept:application/json
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404
< Content-Disposition: inline;filename=f.txt
< Content-Type: application/json
< Content-Length: 133
< Date: Tue, 13 Dec 2022 04:08:08 GMT
<
* Connection #0 to host localhost left intact
{"request":"/bundles/urn:nasa:pds:cassini_iss_cruise::1.0","message":"The lidvid urn:nasa:pds:cassini_iss_cruise::1.0 was not found"}%
The pds.api-client in version 1.1.2 works well on the new server for this case as well.
@tloubrieu-jpl thanks! this is great news. I think this is the similar to the issue Pat L. was encountering with handling arrays vs. string values.
After breakout today, @jimmie will update the cloud front script which rewrite the URL sent to registry API to remove extra /
at the beginning of the path sent to the registry API. For example ///bundles/lid::vid
becomes /bundles/lid::vid
The script will be updated in the regsitry-api repository and update will be done through a pull request on this repository. The new script will be deployed manually in cloud front.
@jordanpadams I was thinking the issue at Pat L. is related to the structure of the documents inside OpenSearch. I don't know if it is related. Anyway for this bug on not found lidvid which happens on the upgraded version of the registry-api in production 1.1. (it still it does not happen on my dev/integration deployment). I will create a different ticket for it: https://github.com/NASA-PDS/registry-api/issues/207
@jordanpadams this issue should be solved by @jimmie having deployed a fix in the cloud front script which forwards the request to the API server. See https://github.com/NASA-PDS/registry-api/issues/208
Is there a user we should communicate the fix to ? We also need to tell him to use the option to set the api URL, until we make a point build for deep archive.
looks like connection issue is fixed but created a few other bugs that are now blocking https://github.com/NASA-PDS/deep-archive/issues/134
๐ Describe the bug
pds-deep-archive-registry
no longer works on the current API due to a disconnect between the PDS API and our currently configured online API. this may actually be an issue with our cloud deployment of the API.๐ To Reproduce
From trying to run pds-deep-registry-archive (installation instructions here)
But even running the API Client using the Quickstart guide with
https://pds.nasa.gov/api/search/1.0/
as the API endpoint fails:๐ต๏ธ Expected behavior
๐ Version of Software Used
๐ฉบ Test Data / Additional context
๐Screenshots
๐ฅ System Info
๐ฆ Related requirements
โ๏ธ Engineering Details
Task list: