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

CMR-10122: Use EntryId returned by CMR for ID in CMR-STAC #359

Merged
merged 6 commits into from
Oct 15, 2024
Merged

Conversation

dmistry1
Copy link
Collaborator

@dmistry1 dmistry1 commented Oct 10, 2024

Summary

This PR addresses two issues:

  1. Removes the custom entryID generation that was previously based on shortName and version from the metadata.
  2. Fixes a bug in platform processing where null instruments fields were causing errors.

Changes

  • Now using the entryID provided directly from CMR instead of constructing it.
  • Updated the platform processing logic to handle cases where the instruments field is null or undefined.

Testing

  • Verified that collections are now being returned correctly in the SIT environment.
  • Added unit tests to cover cases where instruments are null or undefined within platform data.

@codecov-commenter
Copy link

codecov-commenter commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.33%. Comparing base (a8db4bf) to head (e448f41).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #359      +/-   ##
==========================================
- Coverage   88.36%   88.33%   -0.03%     
==========================================
  Files          24       24              
  Lines        1169     1166       -3     
  Branches      257      258       +1     
==========================================
- Hits         1033     1030       -3     
  Misses        136      136              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -142,7 +142,7 @@ export type Platform = {
type: string;
shortName: string;
longName: string;
instruments: Instrument[];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to fix the issue where if the instrument field was null it was returning an error. It doesn't need comments or anything just pointing it out to reviewers since we chatted about that over DM.

We should add in the test session an assertion to make sure that is fixed

@dmistry1 dmistry1 merged commit 57e86a3 into master Oct 15, 2024
5 checks passed
@dmistry1 dmistry1 deleted the CMR-10122 branch October 15, 2024 17:45
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

Successfully merging this pull request may close these issues.

5 participants