Skip to content

Add ConnectionFailedTimeout to ConnectionFailureReason#177

Merged
SeanTAllen merged 1 commit intomainfrom
upgrade-lori-0.12.0
Mar 22, 2026
Merged

Add ConnectionFailedTimeout to ConnectionFailureReason#177
SeanTAllen merged 1 commit intomainfrom
upgrade-lori-0.12.0

Conversation

@SeanTAllen
Copy link
Copy Markdown
Member

@SeanTAllen SeanTAllen commented Mar 22, 2026

Upgrades lori from 0.11.0 to 0.12.0 and fixes a stale ssl version reference in CLAUDE.md (2.0.0 → 2.0.1, left behind by #176).

Lori 0.12.0 renames expect() to buffer_until() (with ExpectBufferSize, NoneStreaming, MakeExpectMakeBufferSize) and adds ConnectionFailedTimeout to ConnectionFailureReason. We pass the new variant through to our own ConnectionFailureReason union so users can match on it.

@SeanTAllen SeanTAllen added the changelog - changed Automatically add "Changed" CHANGELOG entry on merge label Mar 22, 2026
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Mar 22, 2026
@SeanTAllen SeanTAllen changed the title Upgrade ponylang/lori to 0.12.0 Add ConnectionFailedTimeout to ConnectionFailureReason Mar 22, 2026
Lori 0.12.0 adds ConnectionFailedTimeout to its
ConnectionFailureReason type. We pass the new variant through
to our own union so users can match on it when connection
timeouts are in use.

The upgrade also renames expect() to buffer_until() with new
types (Expect → BufferSize, None → Streaming).
@SeanTAllen SeanTAllen force-pushed the upgrade-lori-0.12.0 branch from d3837d7 to 479fbb8 Compare March 22, 2026 03:40
@SeanTAllen SeanTAllen merged commit fd83a8d into main Mar 22, 2026
9 checks passed
@SeanTAllen SeanTAllen deleted the upgrade-lori-0.12.0 branch March 22, 2026 03:50
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Mar 22, 2026
github-actions bot pushed a commit that referenced this pull request Mar 22, 2026
github-actions bot pushed a commit that referenced this pull request Mar 22, 2026
SeanTAllen added a commit that referenced this pull request Mar 22, 2026
Thread lori's `ConnectionTimeout` through `ServerConnectInfo` to
`Session` so users can bound the TCP connection phase. Without this,
connections to unreachable hosts hang until the OS-level TCP timeout.

`ServerConnectInfo` gains an optional `connection_timeout` parameter
(default `None`). When set, lori fires `ConnectionFailedTimeout` if TCP
doesn't connect in time — the existing failure mapping (from PR #177)
delivers it to `pg_session_connection_failed`.

`_CancelSender` does not use the connection timeout — cancel connections
are fire-and-forget with no user callback, so a timeout would have no
observable effect.

Design: #72
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog - changed Automatically add "Changed" CHANGELOG entry on merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants