Commit 88d5afd
Set WEB_CONCURRENCY_SET_BY=heroku/ruby if WEB_CONCURRENCY gets auto-set (#1700)
* Set WEB_CONCURRENCY_SET_BY=heroku/ruby if WEB_CONCURRENCY gets auto-set
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
* Track SENSIBLE_DEFAULTS usage
This feature is deprecated, let's see how many people still rely on it.
---------
Signed-off-by: Richard Schneeman <[email protected]>
Co-authored-by: Richard Schneeman <[email protected]>1 parent b1fee1f commit 88d5afd
File tree
4 files changed
+17
-3
lines changed- lib/language_pack
- test
- spec/hatchet
4 files changed
+17
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
246 | 247 | | |
| 248 | + | |
247 | 249 | | |
248 | 250 | | |
249 | 251 | | |
250 | 252 | | |
| 253 | + | |
251 | 254 | | |
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
| 258 | + | |
255 | 259 | | |
256 | 260 | | |
257 | 261 | | |
| |||
335 | 339 | | |
336 | 340 | | |
337 | 341 | | |
338 | | - | |
| 342 | + | |
339 | 343 | | |
340 | 344 | | |
341 | 345 | | |
| |||
361 | 365 | | |
362 | 366 | | |
363 | 367 | | |
| 368 | + | |
364 | 369 | | |
365 | 370 | | |
366 | 371 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
384 | 392 | | |
0 commit comments