Skip to content

fix: remove explicit connection_pool dependency to allow 3.x#394

Open
chrisarcand wants to merge 1 commit intomasterfrom
allow-connection-pool-3
Open

fix: remove explicit connection_pool dependency to allow 3.x#394
chrisarcand wants to merge 1 commit intomasterfrom
allow-connection-pool-3

Conversation

@chrisarcand
Copy link
Member

Removes the explicit connection_pool ~> 2.4 runtime dependency that was preventing use of connection_pool 3.x (required by sidekiq 8.1+).

The gem is already managed as a transitive dependency by net-http-persistent 4.0.8, which supports connection_pool >= 2.2.4, < 4. Since we don't directly use connection_pool's API, there's no need to declare it explicitly.

Fixes #393

Removes the explicit connection_pool ~> 2.4 runtime dependency that was
preventing use of connection_pool 3.x (required by sidekiq 8.1+).

The gem is already managed as a transitive dependency by
net-http-persistent 4.0.8, which supports connection_pool >= 2.2.4, < 4.
Since we don't directly use connection_pool's API, there's no need to
declare it explicitly.

Fixes #393
@chrisarcand chrisarcand requested a review from a team as a code owner February 10, 2026 15:32
@nevans
Copy link
Contributor

nevans commented Feb 13, 2026

FWIW, there is still the ugly timeout hack that reaches into the connection pool's internals, and is more likely to break between major versions.

        @nhp = Net::HTTP::Persistent.new(name: "vault-ruby", pool_size:)
        @nhp.pool.instance_variable_set(:@timeout, pool_timeout)

That doesn't need to block this PR... but it might be worth converting that into an upstream PR (or two).

@nevans
Copy link
Contributor

nevans commented Feb 13, 2026

Related, dependabot can be configured to "widen" the gem deps. That should be able to automatically create PRs like this:

- spec.add_runtime_dependency "connection_pool",     "~> 2.4"
+ spec.add_runtime_dependency "connection_pool",     ">= 2.4, < 4"

(Obviously, it'd be better to simply remove the direct dep on connection_pool internals!)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow use of connection_pool 3.0

2 participants