-
Notifications
You must be signed in to change notification settings - Fork 24
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
Rewrite database tooling and support for postgres passwords #6803
Conversation
ftr https://stackoverflow.com/posts/70103077/revisions to change the owner of postgres objects. |
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.
Cool stuff!
Co-authored-by: Florian M <[email protected]> Co-authored-by: Philipp Otto <[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 great 👍 Only left a couple of nitpicks and suggestions.
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.
✨
…a_owner * 'master' of github.com:scalableminds/webknossos: Rewrite database tooling and support for postgres passwords (#6803)
This PR rewrites the previous database tools from
tools/postgres
into a single JS file with multiple commands. Thedbtool
(I'll happily take other name suggestions) has some handling of parsing the Scala-supplied postgres connection config into regular postgres URLs (eg.postgres://user:password@host:port/database
) for use withpsql
.The Scala code now calls this tool by invoking node as a command instead of JVM-executed JS. Therefore, I added node to the Docker image. I could remove a few Scala and node dependencies.
diff-schema
was a JS script already, but I also rewrote to have everything in one place. I tested that it produces exactly the same dump output.To test everything, I configured the CI to use non-standard user/password combination and set up a different postgres user on the dev instance.
URL of deployed dev instance (used for testing):
Steps to test:
CREATE ROLE webknossos WITH LOGIN SUPERUSER PASSWORD '...';
slick.conf
(or as env var)tools/postgres/dbtool.js
; although, most are checked during runtime or CIIssues:
(Please delete unneeded items, merge only when none are left open)