-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Set WEB_CONCURRENCY_SET_BY=heroku/ruby if WEB_CONCURRENCY gets auto-set #1700
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
Conversation
The Ruby buildpack sets the `WEB_CONCURRENCY` env var at app boot based on the current dyno size if the (deprecated) `SENSIBLE_DEFAULTS` mode is enabled, so long as the user hasn't specified a custom value via the app's config vars. Now, in addition to setting the `WEB_CONCURRENCY` env var, the buildpack will also set `WEB_CONCURRENCY_SET_BY=heroku/ruby` to allow the app, other boot time scripts, or humans more easily differentiate between a user and a buildpack provided `WEB_CONCURRENCY` (and determine which buildpack actually set it). In addition to assisting with debugging, this allows for UX improvements in other buildpacks such as the PHP buildpack, which can now check for `WEB_CONCURRENCY_SET_BY` in its boot time Apache/Nginx `heroku-php-...` scripts to ignore `WEB_CONCURRENCY` in cases where users have ordered the buildpacks on their app in the wrong order (the "primary" language is supposed to be listed last, otherwise the wrong concurrency value will be used). See also: heroku/heroku-buildpack-nodejs#932 heroku/heroku-buildpack-python#2015 GUS-W-20882005
|
Thanks! I can approve and merge this around the 24th. I think we should track usage and deprecate/remove instead of continuing to add fetures here. This feature was never promoted and I doubt it's highly used. Other libraries like puma have their own |
The Python buildpack sets the `WEB_CONCURRENCY` env var at app boot based on the current dyno size, so long as the user hasn't specified a custom value via the app's config vars. Now, in addition to setting the `WEB_CONCURRENCY` env var, the buildpack will also set `WEB_CONCURRENCY_SET_BY=heroku/python` to allow the app, other boot time scripts, or humans more easily differentiate between user and buildpack provided `WEB_CONCURRENCY` values (plus determine which buildpack actually set it). In addition to assisting with debugging, this allows for UX improvements in other buildpacks such as the PHP buildpack, which can now check for `WEB_CONCURRENCY_SET_BY` in its boot time Apache/Nginx `heroku-php-...` scripts - helping detect the case where users have ordered the buildpacks on their app in the wrong order. (The "primary" language is supposed to be listed last, otherwise the wrong concurrency value will be used.) See also: - heroku/heroku-buildpack-php#883 - heroku/heroku-buildpack-nodejs#932 - heroku/heroku-buildpack-ruby#1700 GUS-W-20866598.
|
Yeah, totally realize it's a deprecated feature for the Ruby buildpack, I just figured we'd still want parity across buildpacks for this case, at least until |
Signed-off-by: Richard Schneeman <[email protected]>
This feature is deprecated, let's see how many people still rely on it.
736566b to
8114279
Compare
The Ruby buildpack sets the
WEB_CONCURRENCYenv var at app boot based on the current dyno size if the (deprecated)SENSIBLE_DEFAULTSmode is enabled, so long as the user hasn't specified a custom value via the app's config vars.Now, in addition to setting the
WEB_CONCURRENCYenv var, the buildpack will also setWEB_CONCURRENCY_SET_BY=heroku/rubyto allow the app, other boot time scripts, or humans more easily differentiate between a user and a buildpack providedWEB_CONCURRENCY(and determine which buildpack actually set it).In addition to assisting with debugging, this allows for UX improvements in other buildpacks such as the PHP buildpack, which can now check for
WEB_CONCURRENCY_SET_BYin its boot time Apache/Nginxheroku-php-...scripts to ignoreWEB_CONCURRENCYin cases where users have ordered the buildpacks on their app in the wrong order (the "primary" language is supposed to be listed last, otherwise the wrong concurrency value will be used).See also:
heroku/heroku-buildpack-nodejs#932
heroku/heroku-buildpack-php#883
heroku/heroku-buildpack-python#2015
GUS-W-20882005