CNM Schema 1.6.1 Collection object not handled
Opened this issue · 1 comments
Expected Behavior
The CNMResponse::getCollection method in CNMResponse.java should correctly handle the case where the collection field is a JSON object with name/version fields. The ability to choose either a simple string or JSON object for the collection field is a new feature of the CNM 1.6.1 schema.
https://github.com/podaac/cloud-notification-message-schema
collection | yes | The collection to which the granule belongs. | This may be used if a generic SNS topic for multiple providers.It can be either a string for the collection short name (e.g. GLDAS_NOAH025_3H ), or a JSON object including the collection name and version (e.g. {"name":"GLDAS_NOAH025_3H", "version":"2.0"} ). |
---|
Actual Behavior
When generating the CNM Response for a CNM Notification message based on the latest 1.6.1 schema, the CNMResponse::getCollection method assumes the collection is a JSON string type and returns "Unknown/Missing". This propagates to the collection attribute of the response message.
Steps to Reproduce the Problem
- Process the sample message linked below
- Examine the CNM Response message and see the Unknown/Missing value for the collection in the message attributes
Specifications
- cumulus-cnm-response-task version: latest develop branch
- cnm schema version: 1.6.1
Background
I'm a developer working on the CLARREO Pathfinder project at LARC where we are interfacing with a recent cumulus deployment at the ASDC and came across this issue.
Thoughts
Not totally sure what the "correct" handling should be. Should it just pull the collection name from the collection/name field and use that? or should there be a new "version" attribute as well?
Thank you for reporting this issue @thursto77. We will address this in the upcoming PI and will keep you updated.