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

CUMULUS-3682 -- Update @cumulus/message.Granule to handle missing values in CMR metadata #3865

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Jkovarik
Copy link
Member

This commit adds logic in convertDateToISOStringSettingNull to

  • set '' as an expected null if encountered in any of the granule temporal fields handled by the Granules methods.
  • Handle explicit undefined values by returning them rather than attempting to date convert them (the error case for this ticket)

This update should be compatible with api granule write logic in that it's preserving the intent of implicit undefined values while allowing for explicit undefineds that weren't originally part of the expected typing coming from the CMR metadata spec.

Summary: Summary of changes

Addresses CUMULUS-3682

Changes

  • Detailed list or prose of changes
  • ...

PR Checklist

  • Update CHANGELOG
  • Unit tests
  • Ad-hoc testing - Deploy changes and test manually
  • Integration tests

This commit adds logic in convertDateToISOStringSettingNull to

- set '' as an expected null if encountered in any of the granule
temporal fields handled by the Granules methods.
- Handle explicit undefined values by returning them rather than
attempting to date convert them (the error case for this ticket)

This update should be compatible with api granule write logic in that
it's preserving the intent of implicit undefined values while allowing
for explicit undefineds that weren't originally part of the expected
typing coming from the CMR metadata spec.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant