sapling/eden/mononoke
Thomas Orozco db4c509b9e mononoke: use MononokeEnvironment in RepoFactory
Summary:
There is a very frustrating operation that happens often when working on the
Mononoke code base:

- You want to add a flag
- You want to consume it in the repo somewhere

Unfortunately, when we need to do this, we end up having to thread this from a
million places and parse it out in every single main() we have.

This is a mess, and it results in every single Mononoke binary starting with
heaps of useless boilerplate:

```
    let matches = app.get_matches();

    let (caching, logger, mut runtime) = matches.init_mononoke(fb)?;

    let config_store = args::init_config_store(fb, &logger, &matches)?;

    let mysql_options = args::parse_mysql_options(&matches);
    let blobstore_options = args::parse_blobstore_options(&matches)?;
    let readonly_storage = args::parse_readonly_storage(&matches);
```

So, this diff updates us to just use MononokeEnvironment directly in
RepoFactory, which means none of that has to happen: we can now add a flag,
parse it into MononokeEnvironment, and get going.

While we're at it, we can also remove blobstore options and all that jazz from
MononokeApiEnvironment since now it's there in the underlying RepoFactory.

Reviewed By: HarveyHunt

Differential Revision: D27767700

fbshipit-source-id: e1e359bf403b4d3d7b36e5f670aa1a7dd4f1d209
2021-04-16 10:27:43 -07:00
..
alpn autocargo v1: changes to match autocargo v2 generation results. 2021-02-19 11:03:55 -08:00
benchmarks mononoke: initialize loggers, config, caching, tunables & runtime in MononokeMatches 2021-04-16 10:27:43 -07:00
blobimport_lib blobrepo: convert to facet container 2021-03-25 07:34:49 -07:00
blobrepo mononoke: initialize loggers, config, caching, tunables & runtime in MononokeMatches 2021-04-16 10:27:43 -07:00
blobrepo_utils third-party/rust: update futures 2021-03-04 06:42:55 -08:00
blobstore mononoke: move ScrubHandler out of ScrubOptions 2021-04-16 10:27:43 -07:00
blobstore_sync_queue vfs: introduce AsyncVfs 2021-03-05 21:47:51 -08:00
bonsai_git_mapping test_repo_factory: use test factory for hooks and mapping tests 2021-03-25 07:34:49 -07:00
bonsai_globalrev_mapping test_repo_factory: use test factory for hooks and mapping tests 2021-03-25 07:34:49 -07:00
bonsai_hg_mapping mononoke: "randomize" a few more queries 2021-04-16 07:11:52 -07:00
bonsai_svnrev_mapping blobrepo: convert to facet container 2021-03-25 07:34:49 -07:00
bookmarks mononoke: add public phase warmer 2021-04-16 08:20:48 -07:00
bulkops mononoke: initialize loggers, config, caching, tunables & runtime in MononokeMatches 2021-04-16 10:27:43 -07:00
cache_warmup third-party/rust: update futures 2021-03-04 06:42:55 -08:00
changesets mononoke: "randomize" a few more queries 2021-04-16 07:11:52 -07:00
cmdlib mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
cmds mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
commit_rewriting mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
common repo_client: log full gettreepack args to scuba in verbose mode 2021-04-14 08:29:59 -07:00
derived_data mononoke: remove all trivial usage of async-unit 2021-04-07 07:26:57 -07:00
edenapi_server mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
edenapi_service mononoke: fix the build 2021-04-12 05:07:48 -07:00
fastreplay mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
filenodes blobrepo: convert to facet container 2021-03-25 07:34:49 -07:00
filestore mononoke/lfs_server: reject Range requests that are out of bounds 2021-04-13 05:10:00 -07:00
git mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
gotham_ext quiet certain connection errors when shutting down 2021-04-16 02:26:04 -07:00
hgcli third-party/rust: update futures 2021-03-04 06:42:55 -08:00
hgproto mononoke: fix the build 2021-04-12 05:07:48 -07:00
hook_tailer mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
hooks mononoke: Remove external sync logic 2021-04-08 09:17:11 -07:00
lfs_import_lib third-party/rust: update futures 2021-03-04 06:42:55 -08:00
lfs_protocol lfs_protocol: implement Display for Operation 2021-04-14 09:22:28 -07:00
lfs_server mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
load_limiter vfs: introduce AsyncVfs 2021-03-05 21:47:51 -08:00
manifest bounded_traversal: require futures to be boxed 2021-03-12 08:12:57 -08:00
mercurial rust: fix non-literal panic fmt strings 2021-04-09 16:24:33 -07:00
metaconfig mononoke: Remove external sync logic 2021-04-08 09:17:11 -07:00
microwave mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
mononoke_api mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
mononoke_api_hg edenapi: update hash-to-location to discard unknown hashes 2021-04-09 17:10:57 -07:00
mononoke_hg_sync_job mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
mononoke_types mononoke_types: add conversions to lfs_protocol types 2021-04-14 01:22:28 -07:00
mutable_counters third-party/rust: update futures 2021-03-04 06:42:55 -08:00
newfilenodes mononoke/newfilenodes: sort filenode rows prior to insertion 2021-03-24 13:55:01 -07:00
observability mononoke: initialize loggers, config, caching, tunables & runtime in MononokeMatches 2021-04-16 10:27:43 -07:00
permission_checker mononoke: Remove external sync logic 2021-04-08 09:17:11 -07:00
phases mononoke: add public phase warmer 2021-04-16 08:20:48 -07:00
pushrebase pushrebase: remove dangerous_override 2021-03-25 10:46:07 -07:00
quiet_stream quiet certain connection errors when shutting down 2021-04-16 02:26:04 -07:00
reachabilityindex mononoke: remove all trivial usage of async-unit 2021-04-07 07:26:57 -07:00
regenerate_hg_filenodes mononoke: initialize loggers, config, caching, tunables & runtime in MononokeMatches 2021-04-16 10:27:43 -07:00
repo_attributes repo_derived_data: add new repo attribute to encapsulate derived data 2021-03-22 07:26:48 -07:00
repo_client mononoke: add public phase warmer 2021-04-16 08:20:48 -07:00
repo_factory mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
repo_import mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
revset rust: fix non-literal panic fmt strings 2021-04-09 16:24:33 -07:00
scs_server mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
segmented_changelog mononoke: add public phase warmer 2021-04-16 08:20:48 -07:00
server mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
sshrelay third-party/rust: update futures 2021-03-04 06:42:55 -08:00
streaming_clone mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
tests mononoke: initialize loggers, config, caching, tunables & runtime in MononokeMatches 2021-04-16 10:27:43 -07:00
time_window_counter vfs: introduce AsyncVfs 2021-03-05 21:47:51 -08:00
tunables mononoke/sql_ext: publish SQL max open connections stat 2021-04-13 03:05:23 -07:00
unbundle_replay mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
walker mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
Cargo.toml mononoke: use MononokeEnvironment in RepoFactory 2021-04-16 10:27:43 -07:00
README.md mononoke: add README.md and the missing pieces for supporting cargo (#13) 2020-02-13 00:12:36 -08:00

Mononoke

Mononoke is a next-generation server for the Mercurial source control system, meant to scale up to accepting thousands of commits every hour across millions of files. It is primarily written in the Rust programming language.

Caveat Emptor

Mononoke is still in early stages of development. We are making it available now because we plan to start making references to it from our other open source projects.

The version that we provide on GitHub does not build yet.

This is because the code is exported verbatim from an internal repository at Facebook, and not all of the scaffolding from our internal repository can be easily extracted. The key areas where we need to shore things up are:

  • Full support for a standard cargo build.
  • Open source replacements for Facebook-internal services (blob store, logging etc).

The current goal is to get Mononoke working on Linux. Other Unix-like OSes may be supported in the future