-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Import + export support for the data connect emulator #7836
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
Conversation
| return Emulators.DATACONNECT; | ||
| } | ||
|
|
||
| async clearData(): Promise<void> { |
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.
Can one still clear the DB even if running a separate postgres? I'd say yes, but any concerns?
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.
That's a good product q - I think it's reasonable to offer, but if they're connecting to a real DB that becomes a pretty scary big red button.
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.
Chatted in local tooling sync - decision is that this is ok, as long as we have a confirmation dialogue in vsce
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.
But given the code as it is written right now, this seems to noop if it's not using pglite.
I think it should either do what it says on the label, or fail with a clear error message (e.g. "unimplemented"), but not noop.
src/emulator/hub.ts
Outdated
| }); | ||
|
|
||
| app.post(EmulatorHub.PATH_CLEAR_DATA_CONNECT, async (req, res) => { | ||
| // TODO: Sanity check that this is needed. |
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.
Probably needed
…se-tools into jh-persistence-prototype
Description
Adds support for data persistence between runs of the data conect emulator, as described in go/fdc-emu-import-api
Scenarios Tested
emulator:exportand confirmed that it outputs a tarball database dump in the export directory.--importand confirmed that the same data is there after import.Follow up work