Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Active Record's connection_pool_list deprecation warning for Rails 7.1.x #544

Conversation

eiskrenkov
Copy link
Contributor

Fixes deprecation warning for Rails 7.1.x

DEPRECATION WARNING: connection_pool_list currently only applies to connection pools in the current role (writing). In Rails 7.2, this method will apply to all known pools, regardless of role. To affect only those connections belonging to a specific role, pass the role name as an argument. To switch to the new behavior, pass :all as the role name.

The deprecation is coming from here and was introduced here

Passing ActiveRecord::Base.current_role to connection_pool_list just preserves current behaviour while silencing the deprecation warning

@eiskrenkov
Copy link
Contributor Author

I have signed the CLA!

@eiskrenkov
Copy link
Contributor Author

@jenshenny @dylanahsmith can you please check this out? CI failures seem to be not related to my changes

@casperisfine
Copy link
Contributor

CI is broken, I'll fix it on another PR.

@casperisfine casperisfine force-pushed the fix-connection-pool-list-deprecation-warning branch from 4a5b641 to 28edb79 Compare November 23, 2023 10:00
@casperisfine casperisfine force-pushed the fix-connection-pool-list-deprecation-warning branch from 28edb79 to ca99f7b Compare November 23, 2023 10:01
@casperisfine casperisfine merged commit 76b1a7a into Shopify:main Nov 23, 2023
4 checks passed
@pboling
Copy link

pboling commented Apr 8, 2024

How can one "temporarily deploy to rubygems"? 😆

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.

None yet

3 participants