-
Notifications
You must be signed in to change notification settings - Fork 2
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
KMS-522: Functionality to handle syncing with gcmd.earthdata.nasa.gov/kms #35
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #35 +/- ##
==========================================
- Coverage 99.75% 99.74% -0.01%
==========================================
Files 103 120 +17
Lines 1646 1977 +331
Branches 385 473 +88
==========================================
+ Hits 1642 1972 +330
- Misses 4 5 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cgokey
commented
Mar 24, 2025
mandyparson
reviewed
Mar 24, 2025
…and create dates for create, update operations.
mandyparson
reviewed
Mar 26, 2025
htranho
reviewed
Mar 26, 2025
htranho
approved these changes
Mar 26, 2025
mandyparson
approved these changes
Mar 26, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
What is the feature?
We need to be able turn on sync so RDF database stays up to date over the next couple months while we build
additional features.
What is the Solution?
gcmd.earthdata.nasa.gov/kms/concepts endpoint will provide both xml dump and json dump of its concept data.
This concept data is used to build the RDF.
Schedules a nightly cron that will download xml and json data for both draft and published and recreate these versions nightly.
I support of this feature, I added a couple npm run scripts:
npm run download-files
will download the json/xml files for processing.npm run create-rdf-files
will create rdf xml data files from these json/xml files.What areas of the application does this impact?
Keeping production kms data in sync with new system.
Testing
To test locally, once kms sit endpoints are ready, you should be able to start offline mode with:
SHOULD_SYNC=true SYNC_API_ENDPOINT=https://gcmd.sit.earthdata.nasa.gov RDF4J_SERVICE_URL=http://localhost:8080 npm run offline
curl -X POST http://localhost:4001/dev/sync-concept-data -H "Content-Type: application/json" -d '{"version": "published"}'
Watch the logs in the console of the terminal running offline mode and verify you don't see any errors.
The publish endpoint has also changed to be asynchronous, as this endpoint was dangerously close to taking more than 30 seconds and API gateway has a max timeout of 30 seconds, to test this new endpoint, do the following:
curl -X POST http://localhost:4001/dev/publish -H "Content-Type: application/json" -d '{"name": "9.1.6"}'
and will kick off a publish. Check the logs in terminal to verify no errors occurred.
Will create a 9.6.1 published version.
I've also added some business logic to create/update
dcterms:created
anddcterms:modified
whenever a concept is created or updated.Checklist