Change pg_session_connection_failed to include a failure reason#163
Merged
SeanTAllen merged 1 commit intomainfrom Mar 15, 2026
Merged
Change pg_session_connection_failed to include a failure reason#163SeanTAllen merged 1 commit intomainfrom
SeanTAllen merged 1 commit intomainfrom
Conversation
Contributor
|
Hi @SeanTAllen, The changelog - changed label was added to this pull request; all PRs with a changelog label need to have release notes included as part of the PR. If you haven't added release notes already, please do. Release notes are added by creating a uniquely named file in the The basic format of the release notes (using markdown) should be: Thanks. |
pg_session_connection_failed now takes a ConnectionFailureReason — a closed union of ConnectionFailedDNS, ConnectionFailedTCP, SSLServerRefused, TLSAuthFailed, and TLSHandshakeFailed. The reason is mapped from lori's failure types at the Session actor boundary, keeping lori types out of the public API. Also upgrades the lori dependency from 0.8.1 to 0.11.0, which required adapting internal code to lori's new expect() constrained type and failure callback signatures. Closes #161
c85baaf to
6317a36
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.
Adapts postgres internals to three breaking lori releases between 0.8.1 and 0.11.0:
_on_connection_failure()and_on_tls_failure()now take a reason parameterexpect()takes(Expect | None)instead ofUSizeThe lori failure reasons are now threaded through the state machine to the public API:
pg_session_connection_failedonSessionStatusNotifytakes aConnectionFailureReason— a closed union ofConnectionFailedDNS,ConnectionFailedTCP,SSLServerRefused,TLSAuthFailed, andTLSHandshakeFailed.Other mechanical changes: FFI declarations in
_mort.ponyupdated to match lori's, a mock server test fixed (movedsend()from constructor to_on_started()), andMakeExpect(1)matches made exhaustive with_Unreachable().Closes #161