Skip to content
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

Update configurations to recognize dbname instead of database #1390

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

realtyem
Copy link
Contributor

@realtyem realtyem commented Dec 2, 2024

In preparation of a new database driver for Synapse, let's stop mutating the configuration after it's generated. Since dbname is what is already used by libpq and is what is expected by Synapse's configuration parsing, just use this. In Dendrite's case, it's not used directly but is parsed and turned into a DSN to feed to it's command line invocation.

This does not modify the pre-existing behavior of adding an additional attribute to that part of the yaml block as it did before: type: pg or type: sqlite, depending. It appears this is only used to identify which method to invoke to pre-clear the database before testing starts and is otherwise harmless.

…se name to connect to in Postgres

For Synapse, these pass through and match expected configuration expectations from the manual.

For Dendrite, the generated database config is parsed and turned into a DSN that is used to
generate its main config yaml. All that was needed is to update where the value comes from.

This brings the named parameters into line with libpq.
…nfig

This only seemed to be needed for Synapse as Dendrite used another method and was not relevant
@realtyem realtyem requested a review from a team as a code owner December 2, 2024 20:49
@clokep
Copy link
Member

clokep commented Dec 2, 2024

This is essentially matrix-org/synapse#16618, but for sytest configs.

Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning this up!

@anoadragon453 anoadragon453 merged commit 4ad9b13 into matrix-org:develop Dec 19, 2024
6 checks passed
@realtyem realtyem deleted the update-db-config branch December 19, 2024 12:43
erikjohnston added a commit that referenced this pull request Dec 20, 2024
@erikjohnston
Copy link
Member

(Heads up this broke sqlite synapse CI: #1392)

erikjohnston added a commit that referenced this pull request Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants