-
Notifications
You must be signed in to change notification settings - Fork 0
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
New import #153
New import #153
Conversation
Coverage report
Show files with reduced coverage 🔻
Test suite run success164 tests passing in 20 suites. Report generated by 🧪jest coverage report action from 2d81da4 |
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 $import requests if you give a non-existent file (one that would return 404) in the input. I'll look more closely at what's causing this to happen.
Additional error handling should be added to the Suggest wrapping the most of the |
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.
Almost there with this! Just a logger statement would help with seeing whats going on on the console with our testing.
Co-authored-by: hossenlopp <[email protected]>
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.
Looks good and makes good use of the ping and pull stuff that was already there.
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.
Looks great and thanks for all of the hard work on this one! My only comment is certainly a nitpick, so feel free to ignore if you disagree:
There are comment references and function names that call this the "new" import workflow. In the end this will just be the import workflow, so should we remove the "new" from comments and in function name?
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.
Looks great!
Summary
This PR changes the workflow of the bulk $import operation. Previously, this server used the Ping and Pull approach, but now it uses the proposed bulk data import outlined in this IG.
New behavior
For more information on the previous Ping and Pull approach, refer to this repository's Wiki page here. The main difference between that approach and the new approach is that the new approach utilizes already exported inputs rather than this server kicking off the export request. This simplifies the process by including the export ndjson urls in the Import Manifest in the request body of the $import operation rather than just the export url.
Code changes
package.json
/package-lock.json
- removedbulk-data-utilities
dependency.dbOperations.js
- two new functions for storing and getting ndjson file failed outcomes, inclusion of the import manifest in thebulkImportClient
object so that it may be included on the Import Result.importWorker.js
-executeNewImportWorkflow
replacesexecutePingAndPull
.ndjsonWorker.js
- ndjson failed outcomes are now stored as well.bulkstatus.service.js
- WORK IN PROGRESS - the structure of the Import Result object has yet to be finalized.import.service.js
- useretrieveInputUrls
.measure.service.js
-bulkSubmitData
now follows the new$import
workflow. This is okay for now because$bulk-submit-data
may even go away.exportUtils.js
-retrieveInputUrls
now returns all ndjson fileUrls included in the Import Manifesttest
- deleted param files that are no longer used in tests, updated unit tests to follow new workflowTesting guidance
npm run check
bulk-export-server
is running on a different port thandeqm-test-server
(PORT=3001 npm start
).deqm-test-server
:npm start
http://localhost:3000/4_0_1/$import
with an Import Manifest json object in the request body (defined in IG) that includes ndjson file urls from thebulk-export-server
. I am happy to send examples, but I figured leaving this open would be better for testing to make sure that I interpreted the IG correctly.Import Results
Note that the structure of the Import Results (
bulkstatus.service.js
) is still a work in progress.