-
Notifications
You must be signed in to change notification settings - Fork 7
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
GQL-85: Cannot view collection when a revision doesn't have UMM #146
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #146 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 106 106
Lines 2410 2410
Branches 273 274 +1
=========================================
Hits 2410 2410 ☔ View full report in Codecov by Sentry. |
nitpick; we should change the name of the PR and maybe the ticket to be more specific to what the problem is. Just having the concept-id doesn't make it very clear of why theres a problem or what should be fixed Perhaps something like |
@@ -277,7 +277,8 @@ describe('Collection', () => { | |||
meta: { | |||
'concept-id': 'C100000-EDSC', | |||
'native-id': 'test-guid', | |||
'revision-id': '2' | |||
'revision-id': '3', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these changes to the mocks should be removed unless you plan to add a specific test to do something with the "deleted" mock you added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deleted mock shows that the whole call doesn't break when umm does not exist. Without adding these line 337 isn't fully tested
Overview
What is the feature?
Users are unable to view C1000000321-SEDAC in production. It comes back with a "TypeError: Cannot read properties of undefined (reading 'ArchiveAndDistributionInformation')"
What is the Solution?
This happens we getCollection calls revisions and tries to read the umm of each revision. In the case of deleted revisions, there is no umm. So I created a default for the umm of a revision.
What areas of the application does this impact?
collection.js under concepts
Testing
Reproduction steps
https://mmt.uat.earthdata.nasa.gov/collections/C1265136920-OB_CLOUD
https://mmt.uat.earthdata.nasa.gov/collections/C1265136919-OB_CLOUD
https://mmt.uat.earthdata.nasa.gov/collections/C1265136924-OB_CLOUD
https://mmt.uat.earthdata.nasa.gov/collections/C1265136917-OB_CLOUD
Attachments
On main
On branch
Checklist