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

CNM Schema 1.6.1 Collection object not handled #232

Open
thursto77 opened this issue Sep 12, 2023 · 1 comment
Open

CNM Schema 1.6.1 Collection object not handled #232

thursto77 opened this issue Sep 12, 2023 · 1 comment

Comments

@thursto77
Copy link

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/cumulus-cnm-response-task/blob/develop/src/main/java/gov/nasa/cumulus/CNMResponse.java#L312

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

  1. Process the sample message linked below
  2. Examine the CNM Response message and see the Unknown/Missing value for the collection in the message attributes

https://github.com/podaac/cloud-notification-message-schema/blob/master/samples/cumulus_sns_v1.6_notification_collection_obj.json

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?

@skorper
Copy link
Contributor

skorper commented Sep 13, 2023

Thank you for reporting this issue @thursto77. We will address this in the upcoming PI and will keep you updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants