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 metadata C1000000321-SEDAC in MMT "All Collections" #141

Closed
wants to merge 2 commits into from

Conversation

mandyparson
Copy link
Contributor

@mandyparson mandyparson commented Nov 8, 2024

Overview

What is the feature?

Can't view some collections when umm on revisions isn't available.

What is the Solution?

umm isn't available when a revision has been deleted as the only thing returned in these cases is the 'tombstone' which contains just the metadata. Collection.js in concepts is different from variable, tool, and service in that the component has a function called normalizeUmmItem which needs umm in order to function. A change within this function is needed to get the code to work as expected. Adding tombstoneMetadata is not actually required to get the code to work but may be needed to inform other clients that the data that is being returned is not, in fact, a collection.

Adjusted the normalizeUmmItem function in collection.js to account for this. Adjusted the .graphql's so that they were passing 'deleted' metadata up to client.

What areas of the application does this impact?

concept.graphql and collection.js concept

Testing

Reproduction steps

  • **Environment for testing: UAT
  • **Collection to test with: See below
  1. run cmr-graphql in UAT mode on branch GQL-85
  2. grab your uat token from the headers in mmt.uat.earthdata.nasa.gov
  3. open localhost:3013 and use the screen shots below to test collection: C1271740212-OB_CLDSIT

Attachments

Collection on GQL-85
Screenshot 2024-11-08 at 9 00 25 AM

Collection on Main
Screenshot 2024-11-08 at 9 03 09 AM

You CAN run graphQL in Prod mode to see the problem Collection in action but I've included a screenshot here so you don't have to:
Screenshot 2024-11-12 at 9 08 39 AM

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 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e9bcdc0) to head (f1f0a65).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #141   +/-   ##
=========================================
  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.

@mandyparson mandyparson deleted the GQL-85 branch November 13, 2024 18:57
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.

1 participant