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

GQL-85: Cannot view collection when a revision doesn't have UMM #146

Merged
merged 4 commits into from
Nov 15, 2024

Conversation

mandyparson
Copy link
Contributor

@mandyparson mandyparson commented Nov 13, 2024

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

  1. Point cmr-graphql to UAT
  2. Use reference picture below to set up a graphql query. Test it on main to see TypeError, then test on branch to see that it returns.

Attachments

On main
Screenshot 2024-11-13 at 1 18 35 PM

On branch
Screenshot 2024-11-13 at 1 19 08 PM

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (45960e8) to head (a71d8b6).
Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@eudoroolivares2016
Copy link
Contributor

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 GQL-85: Ensure that default case is handle for missing ArchiveAndDistributionInformation field

@mandyparson mandyparson changed the title GQL-85: Cannot view collection metadata C1000000321-SEDAC in MMT "All Collections" GQL-85: Cannot view collection when a revision doesn't have UMM Nov 14, 2024
@mandyparson mandyparson merged commit 6ee37b9 into main Nov 15, 2024
7 of 8 checks passed
@mandyparson mandyparson deleted the GQL-85 branch November 15, 2024 20:21
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