Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug which prevented the static cached config from being used
Summary: JustKnobs provides two ways to `init` with a `cached_config`: * [`init_just_knobs`](https://www.internalfb.com/intern/rustdoc/fbcode/common/rust/shed/justknobs_stub:justknobs/justknobs/cached_config/fn.init_just_knobs.html) * [`init_just_knobs_worker`](https://www.internalfb.com/intern/rustdoc/fbcode/common/rust/shed/justknobs_stub:justknobs/justknobs/cached_config/fn.init_just_knobs_worker.html) The former is simple and stores the provided config as a static `HashMap` of knobs. The latter is fancier: given a tokio runtime, it starts a thread that watches a file for changes. The former is good enough for test situations where we just want to parse some json and run tests with it. But... it is unusable (prior to this change) as for a static config, we never declare it to be "`in_use`", which means that when we run `eval`, we fall back to the actual prod jk despite initializing the simple static justknobs. Not anymore. Reviewed By: YousefSalama Differential Revision: D59867073 fbshipit-source-id: aaeb0d94b158c840ba34b34c15ac050fe4885205
- Loading branch information