Commit Graph

63116 Commits

Author SHA1 Message Date
Alex Hornby
246937b6f3 mononoke: sync configerator repos thrift
Summary: Sync across the thrift schema

Differential Revision: D26276002

fbshipit-source-id: 24f4a8a459f2fcdb18a14627dc7bb5e8d835b829
2021-02-05 08:22:46 -08:00
Thomas Orozco
ae42836ffd mononoke: set minimum successful writes in integration tests
Summary:
Consider test-blobstore_healer.t. We write to 3 blobstores, and expect 1 to
fail all the time and the others to have all the blobs. Except this isn't
really the guarantee the multiplex makes when you configure it with just 1
store to write to (it guarantees the blob is in ONE store, not 2).

The relevant failure is: P172423216.

So let's have a config that reflects our expectations. There are other tests
that use the Multiplex. I'll let CI tell me if they need changing.

Hopefully this should eliminate one more source of test flakiness...

Reviewed By: StanislavGlebik

Differential Revision: D26275304

fbshipit-source-id: 9184420b2ce0990d91e4ec6d38d28ec5ae87775d
2021-02-05 04:46:35 -08:00
svcscm
70b8b7029d Updating submodules
Summary:
GitHub commits:

b35a51d0ae
7443f2988f

Reviewed By: yns88

fbshipit-source-id: bd82c637dfc684c429cfef653f483b7b453b4ec3
2021-02-05 04:46:34 -08:00
svcscm
a360270c5c Updating submodules
Summary:
GitHub commits:

4eaba962f6

Reviewed By: yns88

fbshipit-source-id: 712fd24fd8996c2638a1a232f9366fa1a0c6f7bd
2021-02-05 03:41:24 -08:00
Alex Hornby
9794035320 mononoke: fix ordering in test-blobimport-megarepo.t
Summary: Noticed this test was flaky due to indeterminate output order

Reviewed By: ikostia

Differential Revision: D26274078

fbshipit-source-id: 29b23072f849d98b73c39046af500b57b91477d0
2021-02-05 03:37:49 -08:00
Liubov Dmitrieva
c89bedec2b remove dead code
Summary:
the revset cloudremote is no longer used anywhere in the codebase

also it is related to obsmarkers that are not longer used either

Reviewed By: quark-zju

Differential Revision: D26250792

fbshipit-source-id: b55b8d52c44869f50d5b5f5d8ef2e6c2fac07597
2021-02-05 02:23:09 -08:00
Liubov Dmitrieva
9deba0b16e introduce temporarily workaround to filter public heads from visible heads in CC code
Summary: The function is used in many places and I noticed there are some issues with commit cloud due to the bug that visible heads can contain public commit.

Reviewed By: quark-zju

Differential Revision: D26250556

fbshipit-source-id: e57e447dee803719fcf38cf376ad5af569d8020d
2021-02-05 02:23:08 -08:00
Jan Mazur
550f84ec36 hg/debugnetwork: fix status code as it changed server-side
Summary: I have noticed that server-side status code returned by speedtest's upload changed to 200. It's on master but it's not yet out in the wild.

Reviewed By: johansglock

Differential Revision: D26249530

fbshipit-source-id: 0f6e77ad4f9daf7f7a3bbc216f20435252101078
2021-02-05 01:54:15 -08:00
Alex Hornby
bfe9cb6ca3 mononoke: update walker to use new common cmdlib scrub options
Summary: Update walker to use new common cmdlib scrub options if present.  These are common across admin, walker and scrub so they were moved up to cmdlib.

Reviewed By: krallin

Differential Revision: D25976408

fbshipit-source-id: 430bb0c6e8b78470afdfc7cebc44c6645492c6fe
2021-02-05 01:19:54 -08:00
Alex Hornby
0f25acc8ab mononoke: update admin to use new common cmdlib scrub action argument
Summary: Update to use the new common argument from cmdlib version

Reviewed By: krallin

Differential Revision: D25976404

fbshipit-source-id: a1089b82e6455254fed32317e76764498dcfa130
2021-02-05 01:19:54 -08:00
Alex Hornby
539544af09 mononoke: add scrub options to cmdlib
Summary: Scrub options are of use to walker, manual_scrub and admin tool,  should be cmdlib blobstore options rather than per-tool.

Reviewed By: krallin

Differential Revision: D25928062

fbshipit-source-id: a5bbf518c4e5d97275fb3d8effd923fcca691891
2021-02-05 01:19:54 -08:00
svcscm
29cae071d6 Updating submodules
Summary:
GitHub commits:

e953c8686c

Reviewed By: yns88

fbshipit-source-id: 17b60685498c8a76b0db9296992d8a803ba3ae76
2021-02-05 01:19:53 -08:00
svcscm
fb5c426e3d Updating submodules
Summary:
GitHub commits:

aed7483feb

Reviewed By: yns88

fbshipit-source-id: 72053bda83426c128b15e56860454c1d8f0fec4a
2021-02-04 20:19:31 -08:00
Xavier Deguillard
cc1fd73793 test: add a way to add edenfsrc config in tests
Summary:
Previously, for configs that are only read once, EdenFS would have to be
stopped, the config written, and then EdenFS would be restarted. For Mercurial,
this increases the test time significantly as starting EdenFS takes ~20s.

Reviewed By: fanzeyi

Differential Revision: D26258174

fbshipit-source-id: a74d1e5be35044e95e5a7403f1bf28d557b613d2
2021-02-04 20:10:38 -08:00
Xavier Deguillard
006989487c privhelper: add support for mounting NFS
Summary:
Since mounting EdenFS via NFS requires the same privilege as mounting EdenFS
with FUSE, let's re-use the PrivHelper infrastructure that FUSE already uses.

The macOS bit isn't yet implemented as developing on Linux is for now easier,
the mount args are also overly complicated on macOS and not well documented.

Reviewed By: fanzeyi

Differential Revision: D26255629

fbshipit-source-id: 295261dd40442fe7e0f9439c4f4c25e0d50211a3
2021-02-04 20:10:38 -08:00
Xavier Deguillard
17c99d69de cli: add a --nfs argument to eden clone
Summary: This enables the repository to be mounted via NFS, and not FUSE.

Reviewed By: chadaustin

Differential Revision: D26229827

fbshipit-source-id: 5af5a47ebe5f1dd54df7707bf57d9b7476921f29
2021-02-04 20:10:37 -08:00
svcscm
d89cca1a02 Updating submodules
Summary:
GitHub commits:

bdbca9df0d
b93c8daa96
b457ade379
bf60a3cea0

Reviewed By: yns88

fbshipit-source-id: 7f762611107bf59afc4debceb2a469cbf432afc3
2021-02-04 20:10:37 -08:00
svcscm
f1cfb6d129 Updating submodules
Summary:
GitHub commits:

f72e5a8153
4ab511012b
fc2938242b
258d9a471f

Reviewed By: yns88

fbshipit-source-id: 9150b7b6a2223d4bc7ed21d235fc8304e06ca415
2021-02-04 18:50:27 -08:00
Chad Austin
a887c14404 record all commit transitions in the journal
Summary:
Accumulate every commit transition in the journal, rather than
treating every merged range of journal deltas as having a "from"
commit and a "to" commit. This makes it possible for Watchman to
accurately report the set of changed files across an ABA situation or
rapid `hg next` and `hg prev` operations.

Reviewed By: genevievehelsel

Differential Revision: D26193478

fbshipit-source-id: 8b54b9d5bcefa1811008a3b6e9c3aa25a69471ca
2021-02-04 18:38:35 -08:00
Chad Austin
d6e88c1a22 EDEN_BUILD_FLAVOR is unused
Reviewed By: singhsrb

Differential Revision: D26133978

fbshipit-source-id: 52a57165b4d8f9e7541a9e21e9ad7dd9a2643aa1
2021-02-04 17:05:49 -08:00
svcscm
826cae1ab1 Updating submodules
Summary:
GitHub commits:

6e04576963
ff88f28519
c813f06e37

Reviewed By: yns88

fbshipit-source-id: 535d53a674a2c23a04dc8f952ebcbf8448275ffd
2021-02-04 17:05:49 -08:00
svcscm
0b3a31454a Updating submodules
Summary:
GitHub commits:

a4b2a646b9
ab4a7c2ba5
f133aef541
2c6ec948f2
97f7586047
f36971f971
ce4f91fdcb
10551a6017
1c451c47aa
042c135793
e4f1faea1c

Reviewed By: yns88

fbshipit-source-id: 28f5de52b0cc44f8bc5fa12c7c046487b2345819
2021-02-04 14:05:01 -08:00
Kostia Balytskyi
cd9479ae54 repo_client: sample small gettreepack logging
Summary:
`gettreepack` accounts for ~6B logged scuba rows a day (https://fburl.com/scuba/mononoke_test_perf/vpnsn1ny) out of ~10B totally logged rows (https://fburl.com/scuba/mononoke_test_perf/qw78ecxe), so 60% of rows. For the vast majority of `gettreepack` instances we log 3 log tags: "Start processing", "Gettreepack params" and "Command processed". Similarly, the vast majority requests just 1 mfnode: https://fburl.com/scuba/mononoke_test_perf/3xwotsgq. If we sample logging for these commands by a factor of 100, we'll be able to save almost all of these 60% of rows (it's not entirely clear how that will actually influence our retention, but likely pretty significantly).

What do we lose if we do this sampling?
There are a few perf counters, like GettreepackResponseSize, GettreepackNumTreepacks, GettreepackDirectories, GettreepackDesignatedNodes, that will lose their aggregation accuracy. Given that we're only sampling single-mfnode gettreepacks, these values are not likely to be very interesting. However, we are still leaving a possibility to turn verbose logging back on and get full amount of logging.

Reviewed By: mitrandir77, krallin

Differential Revision: D26148453

fbshipit-source-id: a8521364bb5323d41c6c0c7d82d50508c0eda068
2021-02-04 13:51:26 -08:00
Kostia Balytskyi
27fb78b1fa scuba: add a way to log sampled out rows in verbose mode
Summary:
This allows us to log sampled messages, but reserves an option of falling back to full verbose logging in critical situations.

Note that while this might be a desired behavior in most cases, it's certainly not always the right thing to do: sometimes sampled data needs to remain sampled, even for verbose logging.

Reviewed By: ahornby

Differential Revision: D26148454

fbshipit-source-id: c6ff9d1b05c9cec4895181e008ef6483884bb483
2021-02-04 13:51:26 -08:00
Andrey Chursin
468505dc5a vfs: make audit cache concurrent
Reviewed By: quark-zju

Differential Revision: D26233458

fbshipit-source-id: e06f5642f713d0788407e3cc70655ef82261e7c2
2021-02-04 13:13:45 -08:00
Xavier Deguillard
efd291b3de nfs: add all the nfsv3 procedures and callbacks
Summary:
For now, they all pretend to not be available, except the null one which does
nothing as per the RFC.

Reviewed By: genevievehelsel

Differential Revision: D26159846

fbshipit-source-id: 8d0f43f6bacc5c5a93e883e527769cb7a3b6e22b
2021-02-04 12:38:22 -08:00
Xavier Deguillard
dde7b70712 nfs: make mountProcs an enum class
Summary: That way the NFS procedure won't clash with it.

Reviewed By: genevievehelsel

Differential Revision: D26159845

fbshipit-source-id: 22ce07326f9ec42aa9d44352ae5bb71368337c03
2021-02-04 12:38:21 -08:00
Xavier Deguillard
f7d3ef3596 nfs: add the skeleton of the nfsv3 program
Summary:
For now, this only registers itself against rpcbind and always reply that the
procedure is unavailable. In the future, this will service all the procedures
and forward them to a Dispatcher.

Reviewed By: genevievehelsel

Differential Revision: D26159844

fbshipit-source-id: 21908f1333ed41b3eea3fb5ce19c8e68391df103
2021-02-04 12:38:21 -08:00
Xavier Deguillard
33014208ca nfs: implement a dummy export procedure
Reviewed By: kmancini

Differential Revision: D26159847

fbshipit-source-id: d975ae37d79e095ec7a81fab00037df4c2c7afd4
2021-02-04 12:38:21 -08:00
Xavier Deguillard
5182b7f9b9 nfs: add some debug log for what is being replied
Summary:
We do have logs for what we receive, let's do the same for what we are sending
back.

Reviewed By: genevievehelsel

Differential Revision: D26152811

fbshipit-source-id: 8e605f78a8c849f3bd65b70be51617fc058330ff
2021-02-04 12:38:20 -08:00
Xavier Deguillard
82b7ea2033 nfs: fix InodeNumber serialization
Summary:
In the NFS spec, the fhandle3 is defined as an opaque byte array, and thus its
size must preceed its content. Let's also move it to an NfsdRpc.h as this type
will be predominantly used by the Nfsd RPC program.

Reviewed By: chadaustin

Differential Revision: D26152812

fbshipit-source-id: 0cc37325078a2c7b58551eaa5177436b21e03838
2021-02-04 12:38:20 -08:00
svcscm
d3417d31ee Updating submodules
Summary:
GitHub commits:

7589f1b19e
a98889a462
b9cc811a0d
d38173c865
a26f0d97ac
1bb792be3e
5b28749d86

Reviewed By: yns88

fbshipit-source-id: 00b50bd0a78b82c6b7397b23a0a80da0a6f16898
2021-02-04 12:33:31 -08:00
Alex Hornby
6b074bd668 mononoke: update throttledblob to use governor crate
Summary:
governor supercedes ratelimit_meter and provides async apis which means we don't need to use our own async_limiter version.

This is in preparation for the next diff D26021464 which uses governor's update_n_ready() api for byte rate limiting, rather than adding it to AsyncLimiter in D26021464.

Reviewed By: krallin

Differential Revision: D26153156

fbshipit-source-id: c0b79baee3b71c770353152c6d7c63f616171c86
2021-02-04 11:08:57 -08:00
Thomas Orozco
45fb30f125 mononoke: fix stall in blobrepo creation when instantiating Memcache
Summary:
You can't start Mononoke in mode/dev right now: the startup stalls because
creating Memcache takes ~15 seconds, and if it overlaps between acquiring a SQL
connection and dispatching a query (highly likely when instantiating repos),
you get a connection that sits unused for too long.

Reviewed By: farnz

Differential Revision: D26250069

fbshipit-source-id: fec67cd98895db0358e3f47a6e7d1d6b1cef61a1
2021-02-04 10:40:04 -08:00
Thomas Orozco
c88a08b9df mononoke: add futures_watchdog, a crate to help find stalls
Summary:
Like it says in the title. This adds a crate that provides a combinator that
lets us easily find stalls caused by futures that stay in `poll()` for too
long.

The goal is to make this minimal overhead for whoever is using it: all you need
is to import it + give it a logger. It automatically looks up the line where
it's called and gives it back to you in logs. This uses the `track_caller`
functionality to make this work.

Reviewed By: farnz

Differential Revision: D26250068

fbshipit-source-id: a1458e5adebac7eab6c2de458f679c7215147937
2021-02-04 10:40:04 -08:00
Thomas Orozco
201a50db11 mononoke/server: expose EdenAPI
Summary:
Like it says in the title, this adds support for exposing EdenAPI in Mononoke
Server. That's it!

Differential Revision: D26131777

fbshipit-source-id: 15ed2d6d80b1ea06763adc0b7312d1cab2df5b76
2021-02-04 10:40:04 -08:00
Thomas Orozco
89774b4be4 mononoke/server: move the scuba configuration to the CLI not the config
Summary:
We always log to the same destination, but this is a little annoying as it
stands for e.g. hooking in EdenAPI because that wants 1 Scuba dataset for the
whole thing instead of per-repo.

This also means that logging to Scuba for things that aren't tied to a repo
isn't possible, which might explain why our logging in connection_acceptor
is a) very sparse and b) only logs to stderr.

To make the transition smooth here, I added support for a default Scuba
table and used this in Mononoke Server. I think we can remove this after
updating our tasks to explicitly receive the dataset as an argument.

Reviewed By: StanislavGlebik

Differential Revision: D26126012

fbshipit-source-id: 0fa92dc8c5d5ddeed99dd7d9dd5a2288b8300bf3
2021-02-04 10:40:03 -08:00
Thomas Orozco
77232f0833 mononoke: stop using args_from_usage
Summary:
This isn't a thing we've been enjoying so before adding another arg let's clean
up.

Reviewed By: ahornby

Differential Revision: D26126011

fbshipit-source-id: a7d25cb664b5410b0d9c8fbfc70cf879db395e4e
2021-02-04 10:40:03 -08:00
Thomas Orozco
a062348079 mononoke/edenapi_server: split edenapi into 2 crates
Summary:
Like it says in the title, this splits edenapi_server into 2 crates. Most of
the logic here is pretty straightforward:

- edenapi_service creates a Gotham handler
- edenapi_server instantiates the handler and sets up a socket, tls, etc.

Reviewed By: ahornby

Differential Revision: D26108439

fbshipit-source-id: 6a79e9767ba891265bca11f78eb1a6d3a61ee21f
2021-02-04 10:40:03 -08:00
Thomas Orozco
632c6e2280 mononoke/gotham_ext: move trusted-proxy check out of middleware
Summary:
I'd like to support bridging to EdenAPI Server in Mononoke Server. Mononoke
Server already performs an ACL check for trusted proxies when the client
connects, I'd like to pass this information to EdenAPI to avoid re-doing
a check we've already done.

This allows that.

Reviewed By: ahornby

Differential Revision: D26108441

fbshipit-source-id: f0a294e340f38d039b3ba30a4c262c4a8ccbb318
2021-02-04 10:40:03 -08:00
Thomas Orozco
baa948b3f5 mononoke: remove --test-instance
Summary:
Like it says in the title. Explicitly changing behavior between tests and prod
seems a bit random, and it had two callsites only:

- In commit sync config to avoid having to setup a Configerator config, which
  in turn means we take a totally new codepath in tests. That seems a bit
  misguided: let's just set an empty config.
- In config source setup, which is a lot more legit, but also somewhat
  unnecessary: instead of passing `--test-instance`, we can just pass the
  config source itself.

Reviewed By: StanislavGlebik

Differential Revision: D26108442

fbshipit-source-id: a2c112d175031708646efacd5c02dd36be0c3eac
2021-02-04 10:40:02 -08:00
Thomas Orozco
42f2751873 mononoke/repo_client: use commit sync config from Mononoke API
Summary:
Mononoke API already has an instance of this (though it's created per-repo,
which is a little bit awkward — I'll try to change that later), so we might
as well use it.

Reviewed By: StanislavGlebik

Differential Revision: D26108438

fbshipit-source-id: 3b5e7d5d3427304cc788930cbe9a51a6a6d214b9
2021-02-04 10:40:02 -08:00
Thomas Orozco
e75c386397 mononoke: fail health checks when we are going down
Summary:
This is something we do in our other web services and which we should continue
to do here. This ensures proper draining from Proxygen.

Reviewed By: StanislavGlebik

Differential Revision: D26108440

fbshipit-source-id: 16f3941cce4a6b29c5091d10f1c887d099cfb69f
2021-02-04 10:40:02 -08:00
Thomas Orozco
ea1689d949 mononoke: update mononoke server to use mononoke_api for repo construction
Summary:
Like it says in the title, this updates our repo construction to rely on
Mononoke API. My underlying goal here is to have a Mononoke instance around so
that I can start EdenAPI on it, but it also allows for a bunch of cleanup &
code deduplication.

There is still some stuff that isn't initialized in Mononoke API and probably
does not belong there, but at least the shared pieces now come from there. I
also did keep the `Arc<Repo>` around in Mononoke Server's `MononokeRepo`, so
this way we can start to migrate things to Mononoke API (instead of
de-constructing my `Repo` and getting the parts I need to stuff them into
`MononokeRepo`).

One part of this that might be a bit controversial is that I exposed some of
the internals of `Repo` via accessor methods. I know we've historically
wanted access via Mononoke API to not use the fields but instead use the
RepoContext, and I think that's a good goal, but (IMO) realistically the only
way we get there is by first making Mononoke API *available* to use in
repo_client (which is what this ends up doing), and then we can port things to
call Mononoke API instead of using blobrepo and such directly.

To make this work properly I also updated our tests to default to always
set up Configerator configs when starting Mononoke, since we need them to start
MononokeApi (for the CfgrLiveCommitSyncConfig, which right now has an ad-hoc
"ignore the failures in test mode" branch in Mononoke Server).

Reviewed By: markbt

Differential Revision: D26108443

fbshipit-source-id: b7cf5452e044828e73a0aa3ca3ddbc78e466fe57
2021-02-04 10:40:01 -08:00
Thomas Orozco
32aa9566ea mononoke/integration: be more patient in sqlite3 access
Summary:
Some tests access sqlite DBs while Mononoke is also accessing them. Make this
less aggressive.

Here's an example: https://fburl.com/sandcastle/jpia9lzz

Reviewed By: StanislavGlebik

Differential Revision: D26252044

fbshipit-source-id: 333f519ca211c2b5d06bfc8a35be9c1af6a15b0a
2021-02-04 10:40:01 -08:00
Thomas Orozco
71b1f98aff mononoke: flush more bookmarks
Summary:
Those tests have tweak the bookmarks from outside Mononoke so accordingly they
need a little bit of flushing to make sure the bookmarks are visible when we
try to pull them in Mononoke.

Reviewed By: StanislavGlebik

Differential Revision: D26200830

fbshipit-source-id: 2e84e06fdbd47e08103ee6a74147f3b505140c0d
2021-02-04 10:40:01 -08:00
svcscm
d24f2c153c Updating submodules
Summary:
GitHub commits:

36a96751c5
ca6621b0bb
96cf0011e8
221f528fdd
598df15c24
09c5c7bafc
f958ff1d2d

Reviewed By: yns88

fbshipit-source-id: 3c8e5ac5cf113e517b839695c480acc5ad7b66e8
2021-02-04 10:40:00 -08:00
svcscm
394acd0b82 Updating submodules
Summary:
GitHub commits:

88ee330d3a

Reviewed By: yns88

fbshipit-source-id: 7ab65f4846ab36bd2a869099dd3515edbd84bc62
2021-02-04 08:10:18 -08:00
Alex Hornby
b74ab091c3 mononoke: add option to allow remaining deferred edges
Summary: Add option to allow remaining deferred edges at the end of a walker run so that any repos with unresolved edges can still be tailed.

Reviewed By: StanislavGlebik

Differential Revision: D26230927

fbshipit-source-id: 19eed6a616f722d522c7bca30bbe3bc4dae08655
2021-02-04 08:01:20 -08:00
Alex Hornby
1b3d1f5eaa mononoke: add walker checkpointing to metadatadb
Summary: Add support for opening the checkpoint database from metadata db config

Differential Revision: D26100513

fbshipit-source-id: 094fab028395ed0324421488bf83b3762c43799a
2021-02-04 08:01:20 -08:00