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

blob/json_blob should not be included in default response #73

Closed
Tracked by #20
tloubrieu-jpl opened this issue Jan 7, 2022 · 5 comments
Closed
Tracked by #20

blob/json_blob should not be included in default response #73

tloubrieu-jpl opened this issue Jan 7, 2022 · 5 comments
Assignees
Labels
B12.1 bug Something isn't working s.high High severity

Comments

@tloubrieu-jpl
Copy link
Member

tloubrieu-jpl commented Jan 7, 2022

πŸ› Describe the bug

I've seen the blob in default responses from the API

πŸ“œ To Reproduce

Test with this request for example:

curl --location --request GET 'http://localhost:8080/bundles'
--header 'Accept: application/kvp+json'

πŸ•΅οΈ Expected behavior

The blob should not be available in default responses so to improve the performance and not to confuse the users.

πŸ“š Version of Software Used

Latest on main

@al-niessner
Copy link
Contributor

@tloubrieu-jpl @jordanpadams

Using example URL, not finding blob in result:

$ curl --location --request GET 'http://localhost:8080/bundles' --header 'Accept: application/kvp+json'
{
  "summary":{"hits":1,"took":10,"start":0,"limit":100,"sort":[],"properties":["_package_id","lid","lidvid","ops:Harvest_Info.ops:node_name","ops:Label_File_Info.ops:creation_date_time","ops:Label_File_Info.ops:file_name","ops:Label_File_Info.ops:file_ref","ops:Label_File_Info.ops:file_size","ops:Label_File_Info.ops:md5_checksum","product_class","ref_lid_collection","ref_lid_instrument","ref_lid_instrument_host","ref_lid_investigation","ref_lid_target","title","vid"]},
  "data":[    {
      "ops:Label_File_Info.ops:md5_checksum":"24bf73b1cc29677faa4f590121164f4e",
      "ref_lid_instrument_host":"urn:nasa:pds:context:instrument_host:spacecraft.mess",
      "ops:Label_File_Info.ops:creation_date_time":"2021-05-12T18:17:17Z",
      "lid":"urn:nasa:pds:izenberg_pdart14_meap",
      "ref_lid_investigation":"urn:nasa:pds:context:investigation:mission.messenger",
      "lidvid":"urn:nasa:pds:izenberg_pdart14_meap::1.0",
      "title":"Izenberg PDART 2014 MESSENGER Advanced Products Bundle",
      "_package_id":"39728247-ff50-467c-92a2-65827eb27eec",
      "ref_lid_instrument":"[urn:nasa:pds:context:instrument:grs.mess, urn:nasa:pds:context:instrument:mascs.mess, urn:nasa:pds:context:instrument:ns.mess]",
      "ops:Harvest_Info.ops:node_name":"PSA",
      "ops:Label_File_Info.ops:file_size":"5685",
      "ref_lid_collection":"[urn:nasa:pds:izenberg_pdart14_meap:data_eetable, urn:nasa:pds:izenberg_pdart14_meap:data_imagecube, urn:nasa:pds:izenberg_pdart14_meap:data_tnmap, urn:nasa:pds:izenberg_pdart14_meap:document]",
      "vid":"1.0",
      "product_class":"Product_Bundle",
      "ops:Label_File_Info.ops:file_name":"bundle_izenberg_pdart14_meap.xml",
      "ref_lid_target":"urn:nasa:pds:context:target:planet.mercury",
      "ops:Label_File_Info.ops:file_ref":"/var/local/harvest/archive/bundle_izenberg_pdart14_meap.xml"    }
  ]
}

Double checked and 'ops:Label_File_Info/ops:blob' is in the test data. Maybe already fixed on PR #20 ?

@jordanpadams
Copy link
Member

@al-niessner not sure about the latest version, but I do see ops:Label_File_Info.ops:json_blob in the JSON response on pds-gamma

"ops:Label_File_Info.ops:json_blob": [
          "eJztWW1v20YS/isLfbIBiqZkK7aZT6pipMbFdU/yFcVdC2JFrqRFyF3eLinZDfLf75klKVKyLffspsUB5w+OSc7MPvM+s/nS+9HopIyL6LtSJanohV9614lQhVzImBdSq2hsBKfXeU0Yp9zaXrjP6PVudNJyfS9toc0DMe68/yAKLtNe+K8vvaz7PuEFDu8Ng8FFPxj1TwcQmAgbG5nTd3yaAAf96TN2t5KW7Z7PUj4XKdtwyzZGFoVQbP7AbqdXP7NcGKuVEqnHFtqwYiWYVLKQPGWJ4YuC6bU0ls2dHB/nrsFAmGTSCwdfvWeRXhLSwekjpP/IiYbpBbM5j0XsDumQMK4SxpNEugeQXalYl6oQhg0YWDmrbW19qCqs2D6TQOU0KGQmSDOpExZcnAzOT8h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m6DLS1fs7uk8LLu6Gp2EwCoPgn0R553Iy2i34b2xcVZ6H2yyu1pfIXSwdbl0VZ8dmu6tPa7xxLZt2odQBhaooyXKpmmFhcHl5yaZ/P33X+4qf/wCqNICG"
        ],

@al-niessner
Copy link
Contributor

Quite possible that I fixed it on PR #20 but it has not made its way to pds-gamma. Thanks.

@tloubrieu-jpl
Copy link
Member Author

closed by mistake

@tloubrieu-jpl tloubrieu-jpl reopened this Jan 20, 2022
@jordanpadams jordanpadams changed the title the blob is back in the default responses blob/json_blob should not be included in default response Jan 27, 2022
@al-niessner
Copy link
Contributor

This problem resulted because the test data set updated to add json_blob but the java software knew anything about it. As part of updating application/pds4+xml to decode ops_blob, made the discovery that there are now two blobs: json_blob and ops_blob.

Updated the ignore blob code to ignore both and process the correct one for PDS4 content type. Hence, json_blob no longer shows up with JSON content types.

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

No branches or pull requests

3 participants