Skip to content

Conversation

@0xTim
Copy link
Member

@0xTim 0xTim commented Dec 4, 2025

These changes are now available in 1.53.0

Adds support for Swift Service Lifecycle as we prepare Vapor for Vapor 5.

This allows you to add Databases to a ServiceGroup and have service lifecycle handle shutting down the connection pool when the application exits and provides a better integration with the ecosystem.

@0xTim 0xTim requested a review from gwynne as a code owner December 4, 2025 23:33
@0xTim 0xTim added the semver-minor Contains new APIs label Dec 4, 2025
@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 24.35%. Comparing base (2c196f6) to head (9f3c2ee).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
Sources/FluentKit/Database/Databases.swift 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #646      +/-   ##
==========================================
- Coverage   24.36%   24.35%   -0.01%     
==========================================
  Files         148      148              
  Lines        8673     8676       +3     
==========================================
  Hits         2113     2113              
- Misses       6560     6563       +3     
Files with missing lines Coverage Δ
Sources/FluentKit/Database/Databases.swift 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@0xTim 0xTim requested review from Copilot and removed request for gwynne December 5, 2025 02:08

This comment was marked as spam.

@vapor vapor deleted a comment from Copilot AI Dec 5, 2025
Comment on lines 184 to 185
try await gracefulShutdown()
await self.shutdownAsync()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
try await gracefulShutdown()
await self.shutdownAsync()
do {
try await gracefulShutdown()
} catch is CancellationError {
// ignore; we still need to shut down for sudden cancellation
}
await self.shutdownAsync()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to trigger a shutdown for any error actually right? So a try? might be better.

@0xTim 0xTim requested a review from gwynne December 7, 2025 15:42
@0xTim 0xTim merged commit 0272fda into main Dec 8, 2025
16 of 18 checks passed
@0xTim 0xTim deleted the service-lifecycle branch December 8, 2025 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-minor Contains new APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants