Skip to content

Cancellation works when talking to a silent server#647

Merged
fabianfett merged 1 commit into
vapor:mainfrom
fabianfett:ff-support-cancellation
May 17, 2026
Merged

Cancellation works when talking to a silent server#647
fabianfett merged 1 commit into
vapor:mainfrom
fabianfett:ff-support-cancellation

Conversation

@fabianfett

Copy link
Copy Markdown
Collaborator

If a server does not respond to any postgres messages, we should timeout connection creation eventually. If the connection isn't needed before the timeout hits, we should cancel connection creation. This PR adds both behaviors.

@fabianfett fabianfett requested a review from gwynne as a code owner May 17, 2026 22:00
@fabianfett fabianfett added the semver-patch No public API change. label May 17, 2026
@codecov

codecov Bot commented May 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.38144% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.93%. Comparing base (f2188e0) to head (e910ac8).

Files with missing lines Patch % Lines
.../PostgresNIO/Connection/ConnectCancelHandler.swift 76.92% 9 Missing ⚠️
Sources/PostgresNIO/New/PSQLEventsHandler.swift 65.00% 7 Missing ⚠️
...es/PostgresNIO/Connection/PostgresConnection.swift 89.18% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #647      +/-   ##
==========================================
+ Coverage   76.76%   76.93%   +0.17%     
==========================================
  Files         135      136       +1     
  Lines       10414    10500      +86     
==========================================
+ Hits         7994     8078      +84     
- Misses       2420     2422       +2     
Files with missing lines Coverage Δ
Sources/PostgresNIO/Pool/ConnectionFactory.swift 84.40% <100.00%> (+0.91%) ⬆️
...es/PostgresNIO/Connection/PostgresConnection.swift 84.35% <89.18%> (+1.34%) ⬆️
Sources/PostgresNIO/New/PSQLEventsHandler.swift 78.87% <65.00%> (-6.04%) ⬇️
.../PostgresNIO/Connection/ConnectCancelHandler.swift 76.92% <76.92%> (ø)

... and 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fabianfett fabianfett merged commit baff615 into vapor:main May 17, 2026
8 of 10 checks passed
@fabianfett fabianfett deleted the ff-support-cancellation branch May 17, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants