Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

fixes origin bug #23

Merged
merged 1 commit into from
Apr 29, 2021
Merged

fixes origin bug #23

merged 1 commit into from
Apr 29, 2021

Conversation

al-niessner
Copy link
Contributor

Closes pds-api-73

Summary*
The problem was thought to be a miscount of 1 but it really is that the first index is 0 not 1.

Test Data and/or Report

$ curl --silent --header 'Accept: application/json' http://localhost:8080/bundles/urn:nasa:pds:izenberg_pdart14_meap::1.0/collections?limit=0&start=0&fields=ops%3AData_File_Info.ops%3Amd5_checksum&only-summary=false
[1] 7308
[2] 7309
[3] 7310
{"summary":{"start":0,"limit":0,"sort":[],"properties":[]}}only-summary=false: command not found
[1]   Done                    curl --silent --header 'Accept: application/json' http://localhost:8080/bundles/urn:nasa:pds:izenberg_pdart14_meap::1.0/collections?limit=0
[2]-  Done                    start=0
[3]+  Done                    fields=ops%3AData_File_Info.ops%3Amd5_checksum

while

$ curl --silent --header 'Accept: application/json' http://localhost:8080/bundles/urn:nasa:pds:izenberg_pdart14_meap::1.0/collections?limit=1&start=0&fields=ops%3AData_File_Info.ops%3Amd5_checksum&only-summary=false
[1] 7342
[2] 7343
[3] 7344
{"summary":{"start":0,"limit":1,"sort":[],"properties":["ops:Data_File_Info.ops:file_size","ref_lid_instrument_host","ops:Data_File_Info.ops:mime_type","lid","ref_lid_investigation","lidvid","ops:Data_File_Info.ops:md5_checksum","ops:Label_File_Info.ops:file_size","ops:Label_File_Info.ops:blob","title","ops:Label_File_Info.ops:md5_checksum","ops:Data_File_Info.ops:file_ref","_package_id","ref_lid_instrument","vid","product_class","ops:Data_File_Info.ops:creation_date_time","ops:Data_File_Info.ops:file_name","ops:Label_File_Info.ops:file_name","ops:Label_File_Info.ops:creation_date_time","ref_lid_target","ops:Label_File_Info.ops:file_ref"]},"data":[{"id":"urn:nasa:pds:izenberg_pdart14_meap:data_eetable::1.0","type":"Product_Collection","title":"Izenberg PDART 2014 MESSENGER Advanced Products Energetic Electrons Table Collection","investigations":[{"id":"urn:nasa:pds:context:investigation:mission.messenger","href":"http://localhost:8080/products/urn:nasa:pds:context:investigation:mission.messenger"}],"observing_system_components":[{"id":"urn:nasa:pds:context:instrument_host:spacecraft.mess","href":"http://localhost:8080/products/urn:nasa:pds:context:instrument_host:spacecraft.mess"},{"id":"urn:nasa:pds:context:instrument:ns.mess","href":"http://localhost:8080/products/urn:nasa:pds:context:instrument:ns.mess"}],"targets":[{"id":"urn:nasa:pds:context:target:planet.mercury","href":"http://localhost:8080/products/urn:nasa:pds:context:target:planet.mercury"}],"metadata":{"version":"1.0","label_url":"/var/local/harvest/archive/data_eetable/collection_eetable_inventory.xml"},"properties":{"ops:Data_File_Info.ops:file_size":"253","ref_lid_instrument_host":"urn:nasa:pds:context:instrument_host:spacecraft.mess","ops:Data_File_Info.ops:mime_type":"text/plain","lid":"urn:nasa:pds:izenberg_pdart14_meap:data_eetable","ref_lid_investigation":"urn:nasa:pds:context:investigation:mission.messenger","lidvid":"urn:nasa:pds:izenberg_pdart14_meap:data_eetable::1.0","ops:Data_File_Info.ops:md5_checksum":"216b3f5445414376ccdacf71ed9457f1","ops:Label_File_Info.ops:file_size":"5480","ops:Label_File_Info.ops:blob":"eJy9WG1v4jgQ/r7S/geLzweBvpxWKM2qKvQWqe1VTW91ui+WmwxgXWJHtkPL/fobOykkIQHa7m4/UJJ5PG/PeDzG//qSJmQFSnMpLnqjwbBHQEQy5mJx0fvr8br/pfc1+PzJt7h+KmNIyFLB/KK3NCYbe14W64Fgmg0WcmUfzuyHtxp595PwjOIHHU2Hw4GOlj2CH5Ays85A6K2CXCUDGSXRQKqFF+s48UqcksLZRuv3SsZ5ZOiVTBKIDPpK0J+qlg43ep8/Fcjxi+Yb9PPz8+D51Bk8GQ5H3t+3N6Gz2edCGyYicOs0Hxeu3MiIGZegA+bI27LyouMeBkjwz5/FIAyf88ISvVTASpETJ3KBooTyEgYqyJUYWyNj1D3m/4F4ArWgWcyUGZ3RFFg2jplhFMCwpwR8r0VHxUJZ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n/dWPVQaJ2U8taB16nQwUmprBmFwyyUzDNts1l+a8FcO1f2mXKwsmWkeFshIV4jct3Z2SuBi9wuCEavEZfPHWvcXdrthcvwajajoVFIJk7um/cdC1P2wtM8pYWRBIcns6zVEzrQhul0pPOqUP27J1zEtiuAJlkxnJK0yJCcE7MEst173VrCihaNvNu6faue+uWmDdF2IB1m/k3FcTObfJ9NKP57Q2WcvK8yqrY+Xh0n5+c/oz4ekTn0kEhFCn8tnYyUv4MgscwQrvFNQXa3op0qGPy6MvC9A81oZzB6bfN0yTQtQqNlzHsO5OKCIWoX6/Zzz94Em78u4ev/Aa+PSGk=","title":"Izenberg PDART 2014 MESSENGER Advanced Products Energetic Electrons Table Collection","ops:Label_File_Info.ops:md5_checksum":"e2eb335391dfc4d838c632667a921eaa","ops:Data_File_Info.ops:file_ref":"/var/local/harvest/archive/data_eetable/collection_eetable_inventory.csv","_package_id":"98d573f6-ae08-4b2f-bc2a-e550a6a8bf02","ref_lid_instrument":"urn:nasa:pds:context:instrument:ns.mess","vid":"1.0","product_class":"Product_Collection","ops:Data_File_Info.ops:creation_date_time":"2021-02-19T04:11:19Z","ops:Data_File_Info.ops:file_name":"collection_eetable_inventory.csv","ops:Label_File_Info.ops:file_name":"collection_eetable_inventory.xml","ops:Label_File_Info.ops:creation_date_time":"2021-02-19T04:11:19Z","ref_lid_target":"urn:nasa:pds:context:target:planet.mercury","ops:Label_File_Info.ops:file_ref":"/var/local/harvest/archive/data_eetable/collection_eetable_inventory.xml"}}]}only-summary=false: command not found
[1]   Done                    curl --silent --header 'Accept: application/json' http://localhost:8080/bundles/urn:nasa:pds:izenberg_pdart14_meap::1.0/collections?limit=1
[2]-  Done                    start=0
[3]+  Done                    fields=ops%3AData_File_Info.ops%3Amd5_checksum

The problem was thought to be a miscount of 1 but it really is that the first index is 0 not 1.
@al-niessner
Copy link
Contributor Author

@jordanpadams @tloubrieu-jpl

One character change fixed it. Sorry it took longer than it should have because I was not paying enough attention to the URL. Once that was solved, it was 10 minutes.

Copy link
Member

@tloubrieu-jpl tloubrieu-jpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Al, perfect.

@tloubrieu-jpl tloubrieu-jpl merged commit eaec709 into master Apr 29, 2021
@nutjob4life
Copy link
Member

Super! I love these easy fixes.

FYI, make sure to put URLs in 'quotes' in your curl commands so you don't end up launching a bunch of background jobs 😊

@jordanpadams jordanpadams deleted the pds-api-73 branch May 3, 2021 20:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

As a n00b paginator, there might be an off-by-1 error in the limit parameter
3 participants