Skip to content

Fix: Enforce correct host port assignment for postgresql connection strings - #5494

Draft
supersven wants to merge 2 commits into
developfrom
sventennie/postgresql-correct-host-port-assignment
Draft

Fix: Enforce correct host port assignment for postgresql connection strings#5494
supersven wants to merge 2 commits into
developfrom
sventennie/postgresql-correct-host-port-assignment

Conversation

@supersven

@supersven supersven commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Host/port misconfigurations are now logged like:

[galley@example.com] galley: user error (could not match 2 port numbers to 3 hosts)
[galley@example.com] HasCallStack backtrace:
[galley@example.com]   collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
[galley@example.com]   toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/IO.hs:260:11 in ghc-internal:GHC.Internal.IO
[galley@example.com]   throwIO, called at src/UnliftIO/Exception.hs:356:7 in unliftio-0.2.25.1-AdVaKH2Ubts3FYohk3WmeN:UnliftIO.Exception
[galley@example.com]
[galley@example.com]
[galley@b.example.com] galley: user error (could not match 2 port numbers to 3 hosts)
[galley@b.example.com] HasCallStack backtrace:
[galley@b.example.com]   collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
[galley@b.example.com]   toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/IO.hs:260:11 in ghc-internal:GHC.Internal.IO
[galley@b.example.com]   throwIO, called at src/UnliftIO/Exception.hs:356:7 in unliftio-0.2.25.1-AdVaKH2Ubts3FYohk3WmeN:UnliftIO.Exception
[galley@b.example.com]
[galley@b.example.com]
[background-worker@example.com] background-worker: user error (could not match 2 port numbers to 3 hosts)
[background-worker@example.com]
[background-worker@b.example.com] background-worker: user error (could not match 2 port numbers to 3 hosts)
[background-worker@b.example.com]

Ticket: https://wearezeta.atlassian.net/browse/WPB-27405

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Aug 28, 2026
@supersven
supersven force-pushed the sventennie/postgresql-correct-host-port-assignment branch 5 times, most recently from 7c6c2d8 to 1de3ed3 Compare August 28, 2026 15:44
This prevents us from running the app with unintended configurations
and/or confusing assumptions about them.

For `fromKeyValueParams` this implies being able to handle failures. For
now, they are just propagated as there is little value in running a
service with erroneous connection strings.
@supersven
supersven force-pushed the sventennie/postgresql-correct-host-port-assignment branch from 1de3ed3 to 8aec720 Compare August 28, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants