Skip to content

Commit cd47a70

Browse files
authored
Enable use of idle connection pruning (#225)
* Add passthrough configuration parameters for the new idle connection pruning support in AsyncKit 1.21.0, enabling direct use by Fluent users. * Silence API breakage complaints by doing it the even uglier way
1 parent 095bc5a commit cd47a70

File tree

7 files changed

+235
-32
lines changed

7 files changed

+235
-32
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
container: swift:noble
3030
steps:
3131
- name: Checkout
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v5
3333
with: { 'fetch-depth': 0 }
3434
- name: API breaking changes
3535
run: |
@@ -74,10 +74,12 @@ jobs:
7474
POSTGRES_HOST_AUTH_METHOD: ${{ matrix.postgres-auth }}
7575
POSTGRES_INITDB_ARGS: --auth-host=${{ matrix.postgres-auth }}
7676
steps:
77+
- name: Ensure curl is available
78+
run: apt-get update -y && apt-get install -y curl
7779
- name: Check out package
78-
uses: actions/checkout@v4
80+
uses: actions/checkout@v5
7981
- name: Run all tests
80-
run: swift test --sanitize=thread --enable-code-coverage
82+
run: swift test --enable-code-coverage
8183
- name: Submit coverage report to Codecov.io
8284
uses: vapor/[email protected]
8385
with:
@@ -115,6 +117,6 @@ jobs:
115117
PGPASSWORD="${POSTGRES_PASSWORD_A}" psql -w "${POSTGRES_DB_B}" <<<"ALTER SCHEMA public OWNER TO ${POSTGRES_USER_B};"
116118
timeout-minutes: 15
117119
- name: Checkout code
118-
uses: actions/checkout@v4
120+
uses: actions/checkout@v5
119121
- name: Run all tests
120-
run: swift test --sanitize=thread
122+
run: swift test

Package.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ let package = Package(
1313
.library(name: "FluentPostgresDriver", targets: ["FluentPostgresDriver"]),
1414
],
1515
dependencies: [
16-
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.49.0"),
17-
.package(url: "https://github.com/vapor/postgres-kit.git", from: "2.13.4"),
16+
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.52.2"),
17+
.package(url: "https://github.com/vapor/postgres-kit.git", from: "2.14.0"),
18+
.package(url: "https://github.com/vapor/async-kit.git", from: "1.21.0"),
1819
],
1920
targets: [
2021
.target(
@@ -23,6 +24,7 @@ let package = Package(
2324
.product(name: "FluentKit", package: "fluent-kit"),
2425
.product(name: "FluentSQL", package: "fluent-kit"),
2526
.product(name: "PostgresKit", package: "postgres-kit"),
27+
.product(name: "AsyncKit", package: "async-kit"),
2628
],
2729
swiftSettings: swiftSettings
2830
),
@@ -39,6 +41,7 @@ let package = Package(
3941

4042
var swiftSettings: [SwiftSetting] { [
4143
.enableUpcomingFeature("ExistentialAny"),
44+
.enableUpcomingFeature("MemberImportVisibility"),
4245
.enableUpcomingFeature("ConciseMagicFile"),
4346
.enableUpcomingFeature("ForwardTrailingClosures"),
4447
.enableUpcomingFeature("DisableOutwardActorInference"),
Lines changed: 17 additions & 13 deletions
Loading

0 commit comments

Comments
 (0)