Commit 3828a2b
Add a flavor option to disable flavor override
Summary:
Adds a `--disable-flavor-override` standalone CLI toggle and a corresponding `disable_flavor_override` option that can be set in flavor JSON to skip reading `.override` files from `/etc/mcrouter/`.
The disable mechanism works through two paths: a global atomic flag set during standalone CLI init (via `disableFlavorOverride()`), and a per-opts-map check for the key in the flavor JSON `options` section. The global flag covers the standalone binary case, while the opts-map check covers the library embedding case where the option can be set directly in the flavor JSON.
This is helpful to add to unit test and integration test for our devservers. Otherwise we won't be properly testing the prod routing changes and instead test the devproxy routes instead.
The server side already protect against direct connections from dev servers.
Reviewed By: disylh, ghostonhuang
Differential Revision: D92323131
fbshipit-source-id: a18e0f241d69009ba0a54828c83b3ca7a82240051 parent ecd7502 commit 3828a2b
File tree
3 files changed
+18
-3
lines changed- mcrouter
3 files changed
+18
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
420 | 430 | | |
421 | 431 | | |
422 | 432 | | |
423 | 433 | | |
424 | 434 | | |
425 | | - | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
426 | 439 | | |
427 | 440 | | |
428 | 441 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| |||
0 commit comments