fix port to host assignments in connection strings - #1
Open
supersven wants to merge 2 commits into
Open
Conversation
supersven
force-pushed
the
sventennie/fix-port-to-host-assignments
branch
from
August 24, 2026 15:35
d6b45a3 to
6f99b77
Compare
supersven
force-pushed
the
sventennie/fix-port-to-host-assignments
branch
from
August 25, 2026 08:32
6f99b77 to
9780828
Compare
supersven
marked this pull request as ready for review
August 25, 2026 08:35
This function will fail once we enforce the hosts to ports mapping rules. So, it needs to be able to communicate failure and force callers to deal with them.
The cases for specified `port` values are: - 0: default port for all hosts - 1: specified port for all hosts - n: one port per host (counts must match) See https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-MULTIPLE-HOSTS
supersven
force-pushed
the
sventennie/fix-port-to-host-assignments
branch
from
August 27, 2026 14:46
9780828 to
7ea58b3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The rules:
portfield, use the default for all hostsportvalue, use it for all hostsportvalues, they are matched 1:1 to the hosts (counts must match!)port1,meansport1,<default>,,port2means<default>,port2,port1,,port3meansport1,<default>,port3Port / host mappings can fail now. Express this with
MonadFail.N.B. only 9780828 is a candidate for upstreaming as
fromKeyValueParamsdoesn't exist upstream.wire-servercurrently follows a feature branch: https://github.com/wireapp/wire-server/blob/a1fb9bc0a6fdaa8d286f8d0b25cfe6e0572b22ba/flake.lock#L350-L366 So, this won't break it now, but callers offromKeyValueParamsneed to be adjusted once the followed branch is switched there.Ticket: https://wearezeta.atlassian.net/browse/WPB-27405
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764The PR Description
What's new in this PR?
Issues
Briefly describe the issue you have solved or implemented with this pull request. If the PR contains multiple issues, use a bullet list.
Causes (Optional)
Briefly describe the causes behind the issues. This could be helpful to understand the adopted solutions behind some nasty bugs or complex issues.
Solutions
Briefly describe the solutions you have implemented for the issues explained above.
Dependencies (Optional)
If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.
Needs releases with:
Testing
Test Coverage (Optional)
How to Test
Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.
Notes (Optional)
Specify here any other facts that you think are important for this issue.
Attachments (Optional)
Attachments like images, videos, etc. (drag and drop in the text box)
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.