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

As an API caller, I expect MD5s and file reference URLs to have real values and not the string "null" #43

Closed
2 tasks
nutjob4life opened this issue Jun 15, 2021 · 0 comments · Fixed by #46 or #48
Closed
2 tasks
Assignees
Labels
B12.0 bug Something isn't working c.api s.high

Comments

@nutjob4life
Copy link
Member

nutjob4life commented Jun 15, 2021

🐛 Describe the bug

When using the bundle's collections endpoint (/bundles/{lidvid}/collections) on urn:nasa:pds:insight_documents::2.0 with start=0 and limit=49 with the following fields:

  • ops:Data_File_Info.ops:file_ref
  • ops:Data_File_Info.ops:md5_checksum
  • ops:Label_File_Info.ops:file_ref
  • ops:Label_File_Info.ops:md5_checksum

the properties for ops:Data_File_Info.ops:file_ref, ops:Data_File_Info.ops:md5_checksum, ops:Label_File_Info.ops:file_ref, and ops:Label_File_Info.ops:md5_checksum do not contain URLs or MD5 digests, but instead contain the literal string:

null

👉 Also: It'd be great if instead of {"values": […]} appearing in properties, that we just had the array […] without the single key-value dict wrapper.

🧐 Expected behavior

Rather than null for file references, there should be URLs to files. Similarly, rather than null for MD5s, there should be strings of hexadecimal digits. This used to work back in April 2021 (but back then, there wasn't this weird extra values dict everywhere either.)

👉 And: we'd just have arrays […] and not {"values": […]}.

🧪 Test Data

Try running:

curl \
    --silent \
    --request GET \
    --header 'Accept: application/json' \
    'https://pds-gamma.jpl.nasa.gov/api/bundles/urn%3Anasa%3Apds%3Ainsight_documents%3A%3A2.0/collections?start=0&limit=49&fields=ops%3AData_File_Info.ops%3Afile_ref&fields=ops%3AData_File_Info.ops%3Amd5_checksum&fields=ops%3ALabel_File_Info.ops%3Afile_ref&fields=ops%3ALabel_File_Info.ops%3Amd5_checksum&only-summary=false' \
    | json_pp

and look at all the nulls and values. Or try the Swagger interactive UI:

Screen Shot 2021-06-15 at 6 00 12 PM

🧩 Related issues

⚙️ Engineering Details

  • Fix implementation issue
  • Add regression test ensuring this does not happen again (this is a regression in the system)
@nutjob4life nutjob4life added I&T Issues related to PDS System I&T bug Something isn't working needs:triage labels Jun 15, 2021
@jordanpadams jordanpadams removed the I&T Issues related to PDS System I&T label Jun 16, 2021
@pdsen-ci pdsen-ci added this to the 09.Valerie.Brisco milestone Jun 17, 2021
tloubrieu-jpl pushed a commit that referenced this issue Jun 24, 2021
…er, correct bug on returned field value as well (#43)
tloubrieu-jpl added a commit that referenced this issue Jun 24, 2021
…er, correct bug on returned field value as well (#43) (#48)

Co-authored-by: thomas loubrieu <thomas.loubrieu@jpl.nasa.gov>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.