-
Notifications
You must be signed in to change notification settings - Fork 8
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-75: Encodes native id before sending it to CMR. #134
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #134 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 106 106
Lines 2343 2343
Branches 262 262
=========================================
Hits 2343 2343 ☔ View full report in Codecov by Sentry. |
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.
In your PR description you list:
What areas of the application does this impact?
Publish endpoint
Delete endpoint
Ingest on concepts
Ingest and delete on subscription
But you only have a test for publishing a draft, and I don't see any code that modifies the delete request. All of these use cases you listed should have an associated test
I'll take a closer look, the publish had a pretty clear cut way of how to add a test, the others were a little less clear based on the tests that are already there. I'll look closer but might need some suggestions as to best way to setup these tests. |
…, subscription->delete
Please take another look, I think I covered a test for each use case now (ingest, publish, delete, subscription->ingest, subscription->delete) |
* GQL-75: Encodes native id before sending it to CMR.
Overview
What is the feature?
LPDAAC ran into an issue in MMT in production and couldn't publish their draft record.
https://mmt.earthdata.nasa.gov/drafts/collections/CD3244307783-LPCLOUD
After some initial investigation it was determined that the native id was not fully URL encoded: The Original Native ID is:
"native-id" : "VIIRS/NPP BRDF/Albedo Model Parameters Daily L3 Global 1km SIN Grid V002"
The CMR request has it as:
VIIRS/NPP%20BRDF/Albedo%20Model%20Parameters%20Daily%20L3%20Global%201km%20SIN%20Grid%20V002
The non encoded slashes / are adding to the invalid URL:
/ingest/publish/CD3244307783-LPCLOUD/VIIRS/NPP%20BRDF/Albedo%20Model%20Parameters%20Daily%20L3%20Global%201km%20SIN%20Grid%20V002
So the CMR can't find the correct API endpoint.
What is the Solution?
I looked through all the files where
{nativeId}
was being used in a URL and now encoding the native id.What areas of the application does this impact?
Publish endpoint
Delete endpoint
Ingest endpoint
Ingest and delete on subscription
Testing
Note, it was not just /'s, one record had "Last of the Wild Project, Version 2, 2005 (LWP-2): Global Human Influence Index (HII) Dataset (IGHP)" as the native id which also didn't work when trying to publish.
Checklist