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
Validate REDIS_PROVIDER #3969
Comments
Maybe we should namespace the variable too and deprecate REDIS_PROVIDER ?SIDEKIQ_REDIS_PROVIDER ? wdyt ? |
@mperham I can't understand why Sidekiq provides indirect Redis server reference? What's wrong with direct |
How would you use a 3rd party Redis add-on, like Redis-to-Go?
… On Dec 9, 2018, at 06:37, Andrew Babichev ***@***.***> wrote:
Sorry, why Sidekiq provides indirect Redis server reference? What's wrong with directREDIS_URL setting at Heroku?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I have never deployed |
All Redis providers require a custom *_URL variable. That’s how Heroku addons work.
… On Dec 9, 2018, at 12:47, Andrew Babichev ***@***.***> wrote:
I have never deployed sidekiq to Heroku, does Redis-to-Go requires specific URL env var name?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yeah, I see. I doubt people deploy multiple Redis add-ons and it's sensible for me to have a common env var name for all of them (convention over configuration) – |
Assume you are using Redis-To-Go. Heroku will only allow RTG to modify the ENV var called REDISTOGO_URL in your app. So if RTG wants to migrate you seamlessly to another datacenter, your app uses their variable directly and they modify the value so that on reboot, your app picks up the new Redis instance. REDIS_URL is not a thing they can control. Sidekiq supports it for those people who want to run and manage their own Redis instance. Since there are many Redis service providers, you use REDIS_PROVIDER to tell Sidekiq which ENV var is the live Redis and Sidekiq will use that variable to find Redis. |
Got it, thank you 🙇 |
REDIS_PROVIDER is meant to hold the name of the env var that contains the Redis URL. I see people misunderstand this abstraction and place the URL directly in REDIS_PROVIDER frequently. Add validation that will fail fast if the user makes this mistake. This is a breaking change and needs to be called out in the changelog loudly.
The text was updated successfully, but these errors were encountered: