-
Notifications
You must be signed in to change notification settings - Fork 28
feat: add dbdump REST API to Cord cli #7
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
base: main
Are you sure you want to change the base?
Conversation
This seems reasonable. The downside is this will only apply if you run the cord cli from a local version, and not from the official version. I can look at porting this code into the internal version which people would then get from npm. Thoughts @flooey? |
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.
This seems fine to me, but it's not ideal that it needs to buffer the entire response (which could be hundreds of megs) before it outputs it. But possibly it'd be much more difficult to feed it to stdout immediately as it comes in, so I'm not opposed.
@@ -17,6 +17,17 @@ async function listAllApplicationsHandler() { | |||
prettyPrint(apps); | |||
} | |||
|
|||
async function dbDumpHandler() { | |||
const dump = await fetchCordManagementApi<ApplicationData[]>( |
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.
This seems like it should be fetchCordManagementApi<string>
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.
true I'll change it
* Remove bucket for website backup * Remove DNS for various things Remove a bunch of DNS entries for stuff that was Cord-the-company related, but isn't necessary for the service, like the Cord website, Cord's hosted instance of Clack, etc. * Remove PR server The PR server isn't needed to run the service, and other customers wprobably want to have their own way of doing things rather than running our PR server exactly as it was run, so don't include it in the ops distribution. * Install pyOpenSSL before ec2instanceconnectcli * Create secrets for all .env secrets This makes the CloudFormation code create secret placeholders for all of the different secrets need to generate .env. The ones that are just random strings are initialized to random strings, while the ones that are external API keys are initialized to the string "INSERT API KEY HERE". * Fix names of secrets * Remove check for Cord's GitHub repo * Install Node 18 on build3 * Disable GitHub actions runner by default * Don't require running under GitHub actions in build-on-commit.sh * Don't attempt to push to getcord/monorepo on manual deploy * feat: add JSON log format (#8) * Disable stable host keys on zero by default * Add keyPair definition for radical-ec2-key * Don't customize app.cord.com bucket name * Update version of Postgres to 15 --------- Co-authored-by: Adam Vartanian <flooey@cord.com> Co-authored-by: Daniel Vaz Gaspar <danielvazgaspar@gmail.com>
Adding support to dbDumps to Cord cli.
This is a nice to have feature to help everyone on the data migration process
Usage Examples local build:
Actual dump