sapling/eden/mononoke/blobrepo
Thomas Orozco c2c904f933 mononoke: initialize loggers, config, caching, tunables & runtime in MononokeMatches
Summary:
Basically every single Mononoke binary starts with the same preamble:

- Init mononoke
- Init caching
- Init logging
- Init tunables

Some of them forget to do it, some don't, etc. This is a mess.

To make things messier, our initialization consists of a bunch of lazy statics
interacting with each other (init logging & init configerator are kinda
intertwined due to the fact that configerator wants a logger but dynamic
observability wants a logger), and methods you must only call once.

This diff attempts to clean this up by moving all this initialization into the
construction of MononokeMatches. I didn't change all the accessor methods
(though I did update those that would otherwise return things instantiated at
startup).

I'm planning to do a bit more on top of this, as my actual goal here is to make
it easier to thread arguments from MononokeMatches to RepoFactory, and to do so
I'd like to just pass my MononokeEnvironment as an input to RepoFactory.

Reviewed By: HarveyHunt

Differential Revision: D27767698

fbshipit-source-id: 00d66b07b8c69f072b92d3d3919393300dd7a392
2021-04-16 10:27:43 -07:00
..
blobrepo_hg blobrepo: convert to facet container 2021-03-25 07:34:49 -07:00
blobsync third-party/rust: update futures 2021-03-04 06:42:55 -08:00
changeset_fetcher blobrepo: convert to facet container 2021-03-25 07:34:49 -07:00
common blobrepo: make attributes real members again 2021-03-22 07:26:47 -07:00
errors autocargo v1: reformating of oss-dependencies, workspace and patch sections and thrift files to match v2 2021-02-25 15:10:56 -08:00
override blobrepo_override: remove overrides for bookmarks and config 2021-04-07 14:01:49 -07:00
repo_blobstore blobrepo: convert to facet container 2021-03-25 07:34:49 -07:00
src blobrepo_factory: remove blobrepo_factory 2021-04-07 14:01:49 -07:00
test mononoke: initialize loggers, config, caching, tunables & runtime in MononokeMatches 2021-04-16 10:27:43 -07:00
Cargo.toml test_repo_factory: use test factory for remaining tests 2021-03-25 07:34:51 -07:00