Commit Graph

93 Commits

Author SHA1 Message Date
Mark Juggurnauth-Thomas
73cdac45e3 derived_data: use new derived data configuration format
Summary:
Change derived data config to have "enabled" config and "backfilling" config.

The `Mapping` object has the responsibility of encapsulating the configuration options
for the derived data type.  Since it is only possible to obtain a `Mapping` from
appropriate configuration, ownership of a `Mapping` means derivation is permitted,
and so the `DeriveMode` enum is removed.

Most callers will use `BonsaiDerived::derive`, or a default `derived_data_utils` implementation
that requires the derived data to be enabled and configured on the repo.

Backfillers can additionally use `derived_data_utils_for_backfill` which will use the
`backfilling` configuration in preference to the default configuration.

Reviewed By: ahornby

Differential Revision: D25246317

fbshipit-source-id: 352fe6509572409bc3338dd43d157f34c73b9eac
2020-12-14 09:24:58 -08:00
Alex Hornby
946472a110 mononoke: make BlobConfig hashable
Summary:
This is useful for jobs running multiple repos as it can then open the blobstore as many times as there are storage configs rather than as many times as there are repos.

Used in a diff I'm working on to group repos by storage config in a HashMap when setting up the walker to scrub multiple repos from single process.

Reviewed By: farnz

Differential Revision: D25422758

fbshipit-source-id: 578799db63dcf0bce4a79fca9642651601f2deeb
2020-12-11 01:36:06 -08:00
Stefan Filip
2193b84b43 autocargo: regen
Summary: Regen autocargo

Reviewed By: quark-zju

Differential Revision: D25409963

fbshipit-source-id: 7dbbe420aeb30248bf43d3a96a9aa6a47bb2b0be
2020-12-08 18:30:24 -08:00
Kostia Balytskyi
c85fe51f5f hooks: allow two types of bypasses for the same hook
Summary:
There seem to be legitimate cases when we want to have both bypass mechanisms available: via the commit message and via the pushvar. The need to be able to use a commit message arises from the fact that engineers rarely have access to push CLI, so they cannot use pushvars. Still, pushvars are useful if we want to push an existing commit without any changes to its message.

NB. Since I wanted to make `HookBypass` a multi-option, I had to change it from `enum` to `struct`. If I left fields `pub` in that struct (the way it's commonly done in `metaconfig`, I would've allowed `HookBypass` instances with both options `None`. This is not a big deal, but is a bit ugly as we already store `Option<HookBypass>` instead, so it's better if `Some(hook_bypass)` symbolizes that there indeed is some way to bypass the hook. So I opted in for constructors, getters and private fields.

Reviewed By: StanislavGlebik

Differential Revision: D25000578

fbshipit-source-id: ad13076c9690ee8d45fc4a93e32a6026ff5bdd09
2020-11-17 06:02:30 -08:00
Stefan Filip
3ffb223968 config: add SegmentedChangelog that downloads dag for functionality
Summary:
Under this configuration SegmentedChangelog Dags (IdDag + IdMap) are always
downloaded from saves. There is no real state kept in memory.

It's a simple configuration and somewhat flexible with treaks to blobstore
caching.

Reviewed By: krallin

Differential Revision: D24808330

fbshipit-source-id: 450011657c4d384b5b42e881af8a1bd008d2e005
2020-11-11 22:53:38 -08:00
Mateusz Kwapich
10bc4843d3 new mode to reverse-fill bookmarks
Summary:
Adds `--reversefill` mode to bookmarks filler that fetches bookmark updates
from the queue and syncs them to infinitepush database.

Reviewed By: farnz

Differential Revision: D24538317

fbshipit-source-id: 5ac7ef601f2ff120c4efd8df08a416e00df0ceb9
2020-11-10 02:58:00 -08:00
Mateusz Kwapich
89fd335b1e populate bookmark filler queue on scratch bookmark updates
Summary:
Summarry:
This is the first part of syncing new scratch bookmark pushes from Mononoke to
Mercurial: on each bookmark movement we log this bookmark movement to filler's
queue.

Reviewed By: liubov-dmitrieva

Differential Revision: D24480546

fbshipit-source-id: 27103b4b4f8c4600aaf485826db2936eaffcc4a9
2020-11-10 02:58:00 -08:00
Jan Mazur
8152776a35 bypassing hooks for members of scm
Summary: Members of `scm` hipster group will be able to push to mononoke bypassing hooks when `BYPASS_ALL_HOOKS` pushvar is passed.

Reviewed By: krallin

Differential Revision: D24477468

fbshipit-source-id: ac910bf27e5510e1975c4a7cd0bfeff5216da70e
2020-10-29 10:14:25 -07:00
Simon Farnsworth
00871310a7 Ensure we have only one ConfigStore for the application
Summary: It's designed as a singleton store for normal use - rather than have lots of ways to get different config stores, let's use one global store

Reviewed By: krallin

Differential Revision: D24447404

fbshipit-source-id: 6ecc46351b14794471f654cec98527a11a93d3ef
2020-10-24 06:23:49 -07:00
Kostia Balytskyi
0f104b8b00 commit_rewriting: make CommitSyncConfigVersion serializable into mysql
Summary: Somewhat more convenient to work with, no need to look inside.

Reviewed By: StanislavGlebik

Differential Revision: D24474898

fbshipit-source-id: 7ee0920e7d0d5a2102c68695a5cc0d9e237d958d
2020-10-23 04:59:49 -07:00
Kostia Balytskyi
a4f69ed7da commit_rewriting: allow non-prefix free maps in metaconfig
Summary:
This is in line with other changes we're making to map logic now. Note that
apart from checking in-repo prefix-free-ness of the map, this also checked the
same across many small repos. It probably does not make sense to do that either
now that we allow non-prefix free maps within a repo.

Reviewed By: StanislavGlebik

Differential Revision: D24348161

fbshipit-source-id: caaa22953c8a15a08607157b99c9f0fd0edf633f
2020-10-16 05:16:58 -07:00
Mateusz Kwapich
42a783999d enable single process to work on multiple repos.
Summary:
This change enables the filler job to work on all repos available instead of a
single one. We are still going to be able to dedicate the job to a certain repo
(by crafting a config with a single repo enabled) but we can put the entire
long tail for low-traffic repos under a single job.

This requires D24110335 to land in configerator to work.

Reviewed By: krallin

Differential Revision: D24136239

fbshipit-source-id: 4b77d1667c37cc55f11c3087b02a09dbae29db0f
2020-10-08 05:38:01 -07:00
Egor Tkachenko
4d0ae8ae41 Added S3 blobstore
Summary:
Implemented S3 blobstore
Isilon implements S3 as 1:1 mapping into filesystem, and it limits the maximum number of blobs in the single directory. To overcome it lets shard the keys using base64 encoding and making 2 level dir structure with 2 chars dir names.

Reviewed By: krallin

Differential Revision: D23562541

fbshipit-source-id: c87aca2410381a07babb191cbd8cf28233556e03
2020-09-22 04:15:34 -07:00
Aida Getoeva
b92c64af7d shed/sql: make queries! macros work with new Rust mysql client
Summary:
shed/sql library used mainly to communicate with Mysql db and to have a nice abstraction layer around mysql (which is used in production) and sqlite (integration tests). The library provided an interface, that was backed up from Mysql side my raw connections and by MyRouter.
This diff introduces a new backend - new Mysql client for Rust.

New backend is exposed as a third variant for the current model: sqlite, mysql (raw conn and myrouter) and mysql2 (new client). The main reason for that is the fact that the current shed/sql interface for Mysql
(1) heavily depends on mysql_async crate, (2) introduces much more complexity than needed for the new client and (3) it seems like this will be refactored and cleaned up later, old things will be deprecated.
So to not overcomplicate things by trying to implement the given interface for the new Mysql client, I tried to simplify things by adding it as a third backend option.

Reviewed By: farnz

Differential Revision: D22458189

fbshipit-source-id: 4a484b5201a38cc017023c4086e9f57544de68b8
2020-09-11 06:33:37 -07:00
David Tolnay
be0786f14b Prepare for rustfmt 2.0
Summary:
Generated by formatting with rustfmt 2.0.0-rc.2 and then a second time with fbsource's current rustfmt (1.4.14).

This results in formatting for which rustfmt 1.4 is idempotent but is closer to the style of rustfmt 2.0, reducing the amount of code that will need to change atomically in that upgrade.

 ---

*Why now?* **:** The 1.x branch is no longer being developed and fixes like https://github.com/rust-lang/rustfmt/issues/4159 (which we need in fbcode) only land to the 2.0 branch.

 ---

Reviewed By: StanislavGlebik

Differential Revision: D23568780

fbshipit-source-id: b4b4a0aa683d236e2fdeb5b96d723ac2d84b9faf
2020-09-08 07:33:16 -07:00
Stanislau Hlebik
0740f99f13 mononoke: allow logging censored scuba accesses to file
Summary:
In the next diff I'm going to add log-only mode to redaction, and it would be
good to have a way of testing it (i.e. testing that it actually logs accesses
to bad keys).

In this diff let's use a config option that allows logging censored scuba
accesses to file, and let's update redaction integration test to use it

Reviewed By: ikostia

Differential Revision: D23537797

fbshipit-source-id: 69af2f05b86bdc0ff6145979f211ddd4f43142d2
2020-09-04 07:37:14 -07:00
Lukas Piatkowski
eebdc0b896 mononoke/metaconfig: sync thrift changes from configerator for HookConfig
Summary: Use the new fields from RawHookConfig in HookConfig

Reviewed By: StanislavGlebik

Differential Revision: D23499766

fbshipit-source-id: 43e9d2dfdcfb0fa0dd4de6310ea0013db1b69474
2020-09-04 02:02:06 -07:00
Stefan Filip
b818a86631 config: add segmented changelog config parsing
Summary:
Parsing is done in the SegmentedChangelogConfig structure which will inform
how to construct the SegmentedChangelog in Mononoke.

Reviewed By: aslpavel

Differential Revision: D23456222

fbshipit-source-id: a7d5d81f4c166909164026e81af57f1c2ea32347
2020-09-02 17:20:42 -07:00
Mark Thomas
dee916ec4c bookmarks_movement: handle services with all or no permitted paths
Summary:
If a service is configured with no permitted paths, ensure we deny any writes
that might affect any path.  This is not hugely useful, and probably means a
configuration error, but it's the safe choice.

In a similar vein, if a service is permitted to modify any path, there's not
much point in checking all the commits, so skip the path checks to save some
time.

Reviewed By: StanislavGlebik

Differential Revision: D23316392

fbshipit-source-id: 3d9bf034ce496540ddc4468b7128657e446059c6
2020-08-25 09:14:09 -07:00
Mark Thomas
f15976637e bookmarks_movement: restrict bookmarks that are marked allow_only_external_sync
Reviewed By: StanislavGlebik

Differential Revision: D23294907

fbshipit-source-id: ed89e5fd841e7d516b5d259c1f5de4e9f8f40ee3
2020-08-25 09:14:09 -07:00
Mark Thomas
c3070381b3 bookmarks_movement: implement service write path restrictions
Summary:
Use `PrefixTrie` to ensure that all service writes are to paths that are permitted
for the service.

By default, no paths are permitted.  The service can be configured to allow all
paths by configuring the empty path as a permitted prefix.

Reviewed By: StanislavGlebik

Differential Revision: D23287997

fbshipit-source-id: 2b7a0df655084385f73551602d6107411d6aad2f
2020-08-25 09:14:09 -07:00
Mark Thomas
a11e0052ac bookmarks_movement: implement service write bookmark restrictions
Summary:
Move handling of service write bookmark restrictions into the `bookmarks_movement` crate.

This moves `check_bookmark_modification_permitted` from `mononoke_api` onto
`SourceControlServiceParams`, where it can be called from `bookmarks_movement`.

Reviewed By: StanislavGlebik

Differential Revision: D23288000

fbshipit-source-id: e346231b183ce1533ab03130fd2ddab709176fcd
2020-08-25 09:14:08 -07:00
Mark Thomas
a2bbb7e259 metaconfig_parser: parse hooks_skip_ancestors_of
Differential Revision: D23222560

fbshipit-source-id: 928f35be98682298f2891fefe82c3ed4f6e63097
2020-08-25 09:14:08 -07:00
Viet Hung Nguyen
a31922f40d mononoke/repo_import: removed callsign command argument for repo_import
Summary:
Related commits: D23214677 (dcb565409d), D23213192

In the previous commits we added phabricator callsigns to the repo configs.
Since we can extract the callsigns from them, we don't need the callsign
flag for repo_import tool. This diff removes the flag and uses the config variable.

Reviewed By: StanislavGlebik

Differential Revision: D23240398

fbshipit-source-id: d8b853d37e21be97af42e9f50658b9f471f8fc48
2020-08-21 13:00:45 -07:00
Stanislau Hlebik
f68531f81c mononoke: add a flag to disable short history fetching
Summary: Let's use new flag to enable/disable short history for getpack request

Reviewed By: krallin

Differential Revision: D23080200

fbshipit-source-id: 7aa0be6ded0601fa4d31d4b9ff8792a4f8d91b19
2020-08-13 10:37:40 -07:00
Stanislau Hlebik
5008ac3932 mononoke: start using warm bookmark cache blobimport
Summary: Finally let's start using warm bookmark cache for blobimport

Reviewed By: krallin

Differential Revision: D23057327

fbshipit-source-id: fc454bf827f476919d0bfed7691b8b29d79bd876
2020-08-12 12:03:19 -07:00
Stefan Filip
4261013101 metaconfig: add segmented changelog config
Summary:
To start the only configuration available is whether the functionality provided
by this component is available in any shape or form. By default the component
is going to be disabled to all repositories. We will enable it first to
bootstrapped repositories and after additional tooling is added to production
repositories.

Reviewed By: kulshrax

Differential Revision: D22869061

fbshipit-source-id: fbaed88f2f45e064c0ae1bc7762931bd780c8038
2020-08-04 11:22:39 -07:00
Simon Farnsworth
f7e8931a56 Add a minimum successful writes count for MultiplexedBlobstore
Summary:
There are two reasons to want a write quorum:

1. One or more blobstores in the multiplex are experimental, and we don't want to accept a write unless the write is in a stable blobstore.
2. To reduce the risk of data loss if one blobstore loses data at a bad time.

Make it possible

Reviewed By: krallin

Differential Revision: D22850261

fbshipit-source-id: ed87d71c909053867ea8b1e3a5467f3224663f6a
2020-08-04 02:45:38 -07:00
Simon Farnsworth
a9b8793d2d Add a write-mostly blobstore mode for populating blobstores
Summary:
We're going to add an SQL blobstore to our existing multiplex, which won't have all the blobs initially.

In order to populate it safely, we want to have normal operations filling it with the latest data, and then backfill from Manifold; once we're confident all the data is in here, we can switch to normal mode, and never have an excessive number of reads of blobs that we know aren't in the new blobstore.

Reviewed By: krallin

Differential Revision: D22820501

fbshipit-source-id: 5f1c78ad94136b97ae3ac273a83792ab9ac591a9
2020-08-03 04:36:19 -07:00
Stanislau Hlebik
43ac2a1c62 mononoke: use WarmBookmarkCache in repo_client
Summary:
This is the (almost) final diff to introduce WarmBookmarksCache in repo_client.
A lot of this code is to pass through the config value, but a few things I'd
like to point out:
1) Warm bookmark cache is enabled from config, but it can be killswitched using
a tunable.
2) WarmBookmarksCache in scs derives all derived data, but for repo_client I
decided to derive just hg changeset. The main motivation is to not change the
current behaviour, and to make mononoke server more resilient to failures in
other derived data types.
3) Note that WarmBookmarksCache doesn't obsolete SessionBookmarksCache that was
introduced earlier, but rather it complements it. If WarmBookmarksCache is
enabled, then SessionBookmarksCache reads the bookmarks from it and not from
db.
4) There's one exception in point #3 - if we just did a push then we read
bookmarks from db rather than from bookmarks cache (see
update_publishing_bookmarks_after_push() method). This is done intentionally -
after push is finished we want to return the latest updated bookmarks to the
client (because the client has just moved a bookmark after all!).
I'd argue that the current code is a bit sketchy already - it doesn't read from
master but from replica, which means we could still see outdated bookmarks.

Reviewed By: krallin

Differential Revision: D22820879

fbshipit-source-id: 64a0aa0311edf17ad4cb548993d1d841aa320958
2020-07-31 03:09:24 -07:00
Harvey Hunt
cce86abf14 mononoke: lfs_server: Enforce ACL checks on a per repo basis
Summary:
Update the LFS server to use the `enforce_lfs_acl_check` to enforce
ACL checks for specific repos and also reject clients with missing idents.

In the next diff, I will use the existing LFS server config's
`enforce_acl_check` flag as a killswitch.

Reviewed By: krallin

Differential Revision: D22762451

fbshipit-source-id: 61d26944127711f3503e04154e8c079ae75dc815
2020-07-27 11:04:59 -07:00
Kostia Balytskyi
1e5a0dc4db admin: add crossrepo config subcommand
Summary: This is to be able to inspect `LiveCommitSyncConfig` from our admin tooling.

Reviewed By: StanislavGlebik

Differential Revision: D22497065

fbshipit-source-id: 3070890b7dc2a4075a5c15aca703494e33ee6530
2020-07-22 07:34:59 -07:00
Stanislau Hlebik
2cfc23770c mononoke: use override_blame_filesize_limit option
Summary: This diff actually start to use the option

Reviewed By: krallin

Differential Revision: D22373943

fbshipit-source-id: fe23da9c3daa1f9f91a5ee5e368b33e0091aa9c1
2020-07-03 09:58:46 -07:00
Simon Farnsworth
aa00466319 Sync hook_type change from D22282802
Summary: Also fix up the parser test that now fails with this change

Reviewed By: StanislavGlebik

Differential Revision: D22306340

fbshipit-source-id: 820aad48068471b03cbc1c42107c443bfa680607
2020-06-30 11:20:54 -07:00
Kostia Balytskyi
ef87f564bc add newtype for CommitSyncConfigVersion
Summary:
This is to avoid passing `String` around. Will be useful in one of the next
diffs, where I add querying `LiveCommitSyncConfig` by versions.

Reviewed By: krallin

Differential Revision: D22243254

fbshipit-source-id: c3fa92b62ae32e06d7557ec486d211900ff3964f
2020-06-26 02:45:26 -07:00
Stanislau Hlebik
a8209eb712 mononoke: pass PushParams to MononokeRepo
Summary:
In the next diffs it will be passed to unbundle processing so that we can use
scribe category to log pushed commits

Reviewed By: krallin

Differential Revision: D22212616

fbshipit-source-id: 17552bda11f102041a043f810125dc381e478611
2020-06-25 05:51:29 -07:00
Kostia Balytskyi
ed34e343c5 commmit_rewriting: introduce live_commit_sync_config
Summary:
`LiveCommitSyncConfig` is intended to be a fundamental struct, on which live push-redirection and commit sync config for push-redurector, x-repo sync job, backsyncer, commit and bookmark validators are based.

The struct wraps a few `ConfigStore` handles, which allows it to query latest values every time one of the public methods is called. Callers receive parsed structs/values (`true`/`false` for push redirection config, `CommitSyncConfig` for the rest), which they later need to use to build things like `Mover`, `BookmarkRenamer`, `CommitSyncer`, `CommitRepos` and so on. For now the idea is to rebuild these derived structs every time, but we can later add a memoization layer, if the overhead is going to be large.

Reviewed By: StanislavGlebik

Differential Revision: D22095975

fbshipit-source-id: 58e1f1d8effe921b0dc264fffa785593ef188665
2020-06-25 03:28:08 -07:00
Kostia Balytskyi
fbf1564559 config: add commit_sync validation to its Convert impl
Summary:
This diff does three things:
- moves existing `CommitSyncConfig` validation from `config.rs` into
  `convert/commit_sync.rs`, so that any user of `impl Convert for
  RawCommitSyncConfig` gets it for free
- adds another thing to validate `CommitSyncConfig` against (large repo is one
  of the small repos)
- adds `RawCommitSyncConfig` validation for something that can be lost when
  looking at `CommitSyncConfig` (no duplicate small repos).

Reviewed By: markbt

Differential Revision: D22211897

fbshipit-source-id: a9820cc8baf427da66ce7dfc943e25eb67e1fd6e
2020-06-24 15:45:59 -07:00
Lukas Piatkowski
f9eb013d43 mononoke/configerator structs: change the OSS folder where configerator structs are saved
Summary:
Due to Thrift design of "include" statements in fbcode the thrift structures has to be contained in folders that are identical to the folder layout inside fbcode.

This diff changes the folder layout on Cargp.toml files and in fbcode_builder, there will be a next diff that changes this for ShipIt as well.

Reviewed By: ikostia

Differential Revision: D22208707

fbshipit-source-id: 65f9cafed2f0fcc8398a3887dfa622de9e139f68
2020-06-24 09:38:46 -07:00
Alex Hornby
6658b17fb6 mononoke: add packblob to blobstore_factory
Summary: mononoke: add packblob to blobstore_factory

Reviewed By: farnz

Differential Revision: D21924406

fbshipit-source-id: d42702b11bdc0b187467869a7959f68022c60ab2
2020-06-16 04:11:43 -07:00
Mark Thomas
f80205bc96 repo_client: log infinitepush commits to scribe
Summary:
Add logging of infinitepush (draft) commits to a separate scribe category.

The logging will also include the username and hostname of the pusher.  Since
this code is shared with the public commits scribe logging, that logging will
also gain this information.

Reviewed By: farnz

Differential Revision: D21742656

fbshipit-source-id: bdbfd14db9e8aae190c634ac4bfff35b3f62bbe4
2020-06-15 06:32:55 -07:00
Mark Thomas
2ad3269a29 metaconfig: add types and parser for Source Control Service params
Reviewed By: mitrandir77

Differential Revision: D21886535

fbshipit-source-id: a12e7e8a3d2f70ece13e4fc736acbbf12e79d1e0
2020-06-10 19:29:32 -07:00
Mark Thomas
0780f00ef9 metaconfig/parser: wrap regexes in a newtype for comparisons
Summary:
Regexes stored in config need to be comparable so that config is comparable.

Normally regexes are not comparable, so wrap them in a newtype wrapper that
implements comparison, rather than manually implemented PartialEq and Eq for
anything that contains them.

Reviewed By: mitrandir77

Differential Revision: D21886533

fbshipit-source-id: 1fb39c0874daed383624eeda61c903a4731b9cb8
2020-06-10 19:29:31 -07:00
Johan Schuijt-Li
1d4c5cbfc4 mononoke: replace instances of whitelist/blacklist/blackhole
Summary:
There are people that are hurt by usage of these terms, this should be more
then enough reason to replace these. Newly chosen terms are more
self-explanatory as well.

This doesn't yet touch the actualy config files, as that requires a bit more
effort than 1 diff and will require more coordination.

Reviewed By: krallin

Differential Revision: D21924440

fbshipit-source-id: e24fc638dc8c9d6d20b6f3fa5f0d0bbc91bbf77b
2020-06-10 19:29:30 -07:00
Kostia Balytskyi
4cdc8a994c thrift: sync commitsync.thrift
Summary:
This adds changes, introduced by me in D21841293.

For my stuff: I will only land this once the configerator diff is reviewed.

Reviewed By: farnz

Differential Revision: D21862276

fbshipit-source-id: d4f5ccdd4ef9d62bb1e394d4db36930413633fa6
2020-06-10 19:29:18 -07:00
Kostia Balytskyi
6100864f43 thrift: sync changes to repos.thrift from configerator
Summary: This adds changes, introduced by markbt in D21766109.

Reviewed By: markbt

Differential Revision: D21844915

fbshipit-source-id: e8816634b0edb9c5191467e2d105956ddce59538
2020-06-04 01:38:01 -07:00
Mark Thomas
26b1d53e69 metaconfig/parser: clean up conversion functions
Summary:
Clean up some of the conversion functions by renaming variables that are
keywords in other languages, and simplifying error handling code.

Differential Revision: D21839019

fbshipit-source-id: d8945a14a230caa744040e134203a908ad9cef20
2020-06-02 09:30:04 -07:00
Mark Thomas
5bf8469e9d metaconfig/parser: apply clippy suggestions
Reviewed By: farnz

Differential Revision: D21838128

fbshipit-source-id: 10ba30c9f15b7119e6a6537a7e3c605f6d0698aa
2020-06-02 09:30:04 -07:00
Mark Thomas
c6d694b758 metaconfig/parser: rename ErrorKind to ConfigurationError
Summary: `ErrorKind` is not meaningful, and is an artifact of older-style error handling crates.  A better name is `ConfigurationError`.

Reviewed By: krallin

Differential Revision: D21837271

fbshipit-source-id: 709d9e2ab7f18dd2f7cb2489f24e91612bc378db
2020-06-02 09:30:04 -07:00
Mark Thomas
6ad7e5c96e metaconfig/parser: use free functions for loading configuration
Summary:
Replace the use of `RepoConfigs::read*` associated functions with free
functions.  These didn't really need to be associated functions (and in the
case of the common and storage configs, really didn't belong there either).

Reviewed By: krallin

Differential Revision: D21837270

fbshipit-source-id: 2dc73a880ed66e11ea484b88b749582ebdf8a73f
2020-06-02 09:30:03 -07:00