Commit Graph

60430 Commits

Author SHA1 Message Date
svcscm
ee5c83ada8 Updating submodules
Summary:
GitHub commits:

2d8dccaa95
7a818548f1
8d571f23f0

Reviewed By: wittgenst

fbshipit-source-id: 09c6144ac11f908c2dd18ac281e48c1a67397897
2020-09-11 17:35:00 -07:00
Kostia Balytskyi
7f504c741b impl LCAHint for Arc<impl LCAHint>
Summary:
This just makes it more convenient to use in circumstances when fns expects
`impl LCAHint` and we have `Arc<dyn LCAHint`.

Reviewed By: farnz

Differential Revision: D23650380

fbshipit-source-id: dacbfcafe6f3806317a81ed4677af190027f010b
2020-09-11 16:56:13 -07:00
svcscm
1f87ed9a25 Updating submodules
Summary:
GitHub commits:

35ea7a00ed
7c0a56baec
e66c32d29c
423425040c
3afa07d4dd
08292ca2da
50b941a43e
65cb59cd9b
60053cbcd4
d5c8669813
689cdcc943
465262d45e

Reviewed By: wittgenst

fbshipit-source-id: 232dbc697c622a8401ed6c4cde74dc004e8142eb
2020-09-11 16:53:50 -07:00
Chad Austin
e392eca46e log the path that caused configs to be reloaded
Summary:
We noticed spurious config file reloads, so add some logging to help
track that down.

Reviewed By: xavierd

Differential Revision: D23644447

fbshipit-source-id: 9953a17de402660c7f6491fb9abd8d702fa290e8
2020-09-11 16:53:49 -07:00
svcscm
7f4e674481 Updating submodules
Summary:
GitHub commits:

2b51f5edb1
f5744f58a8
796e8a5511
a6c9bce352
cba6d028f0

Reviewed By: wittgenst

fbshipit-source-id: 9c21ce90a24479688336f5bda132a13bd64ced4e
2020-09-11 13:35:04 -07:00
Chad Austin
2d86a960ad indicate to coreutils that edenfs is a remote filesystem
Summary:
GNU `df` (and any other coreutil that relies on gnulib's ME_REMOTE
flag) detects remote filesystems with some heuristics. One of which is
whether the device type contains a colon. Since edenfs is a remote
filesystem, include a colon, so it's properly detected as such.

Reviewed By: genevievehelsel

Differential Revision: D23520233

fbshipit-source-id: f4816b303e198d4e2a446efdcc5b49a593e09a05
2020-09-11 13:35:03 -07:00
Chad Austin
850999df92 handle mounts with device type starting with edenfs:
Summary:
We intend to rename the edenfs device type to include a colon (and
possibly the backing repo basename). In preparation, update code that
detects edenfs mounts to include anything that starts with "edenfs:".

Reviewed By: genevievehelsel

Differential Revision: D23520008

fbshipit-source-id: 280f7617d5c96e23d548041b3482bca388076a7b
2020-09-11 13:35:03 -07:00
Xavier Deguillard
c957d40ff7 cli: properly pass --edenfsctlPath on Windows
Summary:
For some unknown reason, we weren't setting this on Windows, which meant that
whenever edenfs would need to call edenfsctl (like at mount time when fixing up
redirections), it would always use the binary found in the PATH. While in most
cases this is OK, this is not the intended behavior for tests that are expected
to use the just compiled binary, not the one in the PATH.

Reviewed By: genevievehelsel

Differential Revision: D23653027

fbshipit-source-id: f1cc977e44b10c379d2b90bc7972bfec1fccad23
2020-09-11 11:57:12 -07:00
Stanislau Hlebik
d5cafbb432 mononoke: add catchup delete head subcommand to megarepo
Reviewed By: ikostia

Differential Revision: D23597187

fbshipit-source-id: da4710aabfc161a69d80c361dd593a3e7749e941
2020-09-11 10:39:07 -07:00
Arun Kulshreshtha
4d76a4c241 gotham_ext: don't end SignalStream on error
Summary: Previously, `SignalStream` would assume that an error would always end the `Stream`, and would therefore stop and report the amount of transferred data upon encountering any error. This isn't always the desired behavior, as it is possible for `TryStream`s to return mid-stream errors without immediately ending. `SignalStream` should allow for this kind of usage.

Reviewed By: farnz

Differential Revision: D23643337

fbshipit-source-id: 2c7ffd9d02c05bc09c6ec0e282c0b2cca166e079
2020-09-11 09:51:10 -07:00
svcscm
eb7dc081c3 Updating submodules
Summary:
GitHub commits:

28bc1035c1
be8445eea8
a12f045cc1
36bef91503

Reviewed By: wittgenst

fbshipit-source-id: e5ae68aa7e5cee7aaa44f19a610cafa1c3770073
2020-09-11 09:19:09 -07:00
Xavier Deguillard
f2cd32ea4e win: add PrjfsRequestContext class
Summary:
Similarly to FuseRequestContext, this will be allocated whenever ProjectedFS
calls onto EdenFS to keep track of timing, stats, etc.

For now, this just holds the callback data passed in, we need to copy it as
ProjectedFS will deallocate it when the EdenFS callback returns, but since we
intend to complete these asynchronously, the callback data needs to outlive the
callback, hence the copy. It's likely that this is copying too much, and only
part of it actually needs to be copied, this will be tackled later.

Reviewed By: wez

Differential Revision: D23505511

fbshipit-source-id: ece00183e3194611d3d63465878470d6e53b790c
2020-09-11 09:19:09 -07:00
Xavier Deguillard
e9da08d4d3 win: pass the PrjfsChannel to ProjectedFS callbacks
Summary: A following diff will make use of the channel.

Reviewed By: wez

Differential Revision: D23505510

fbshipit-source-id: c044fff51c8771b1ead86333317e5c617184075c
2020-09-11 09:19:09 -07:00
Stanislau Hlebik
54d43b7f95 mononoke: add getbundle optimization for fetching commits with low generation
Summary:
Currently getbundle implementation works this way: it accepts two list of
changesets, a list of `heads` and a list of `common`. getbundle needs to return
enough changesets to the client so that client has `heads` and all of its
ancestors. `common` is a hint to the server that tells which nodes client
already has and doesn't need sending.

Current getbundle implementation is inefficient when any of the heads have a low
generation number but also we have a lot excludes which have a high generation
number. Current implementation needs to find ancestors of excludes that are
equal or lower than generation of this head with a low generation number.

This diff is hacky attempt to improve it. It does it by splitting the heads
into heads with high generation numbers and heads with low generation numbers,
sending separate getbundle requests for each of them and then combining the
results.

Example
```
 O <- head 1
 |
 O <- exclude 1
 |
...     O <- head 2 <- low generation number
 |      |
 O      O <- exclude 2
```

If we have a request like  `(heads: [head1, head2], excludes: [exclude1, exclude2])` then this optimization splits it into two requests: `(heads: [head1], excludes: [exclude1, exclude2] )` and `(heads:[head2], excludes:[exclude2])`, and then combines the results. Note that it might result in overfetching i.e. returning much more commits to the client then it requested. This might make a request much slower, and to combat that I suggest to have a tunable getbundle_low_gen_optimization_max_traversal_limit that prevents overfetching.

Reviewed By: krallin

Differential Revision: D23599866

fbshipit-source-id: fcd773eb6a0fb4e8d2128b819f7a13595aca65fa
2020-09-11 07:32:26 -07:00
Pavel Aslanov
463acc581d use derived data infra to derive mercurial changesets
Summary:
This completely converts mercurial changeset to be an instance of derived data:
 - Custom lease logic is removed
 - Custom changeset traversal logic is removed

Naming scheme of keys for leases has been changed to conform with other derived data types. This might cause temporary spike of cpu usage during rollout.

Reviewed By: farnz

Differential Revision: D23575777

fbshipit-source-id: 8eb878b2b0a57312c69f865f4c5395d98df7141c
2020-09-11 07:23:11 -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
Lukas Piatkowski
e7ac59eae4 mononoke/integration runner: add flag to choose which tests to run (#56)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/56

Additionally to adding a flag as in the commit title the "test-scs*" tests are being excluded via pattern rather than listed out. This will help in future when more tests using scs_server will be added as the author won't have to list it in exclusion list.

Reviewed By: farnz

Differential Revision: D23647298

fbshipit-source-id: f5c263b9f68c59f4abf9f672c7fe73b63fa74102
2020-09-11 06:03:16 -07:00
svcscm
51a8c13b9d Updating submodules
Summary:
GitHub commits:

49b8d0ec42

Reviewed By: wittgenst

fbshipit-source-id: fcc74fd7f51da2e43bc3a5a82f29f0e3067faa96
2020-09-11 06:03:16 -07:00
svcscm
89479666cc Updating submodules
Summary:
GitHub commits:

ba3db8b9e7

Reviewed By: wittgenst

fbshipit-source-id: fc0349c795520bae08777584082652ac6f1fad31
2020-09-11 04:54:56 -07:00
Stanislau Hlebik
d402b5880c mononoke: support _gitlookup lookup calls
Summary:
lookup has special support for requests that start with _gitlookup. It remaps
hg commit to git commit and vice versa. Let's support that in mononoke as well.

Reviewed By: krallin

Differential Revision: D23646778

fbshipit-source-id: fcde58500b5956201e718b0a609fc3fee1bbdd28
2020-09-11 04:30:24 -07:00
Liubov Dmitrieva
a37a294fda improve fbclone experience
Summary:
`hg cloud rejoin` is used in fbclone

By providing a bit more information about the workspaces available we can improve user
experience and try to eliminate the confusion multiple workspaces cause.

Reviewed By: mitrandir77

Differential Revision: D23623063

fbshipit-source-id: 7598c1b58597032c9cfcef0b44b0ec1b00510ffa
2020-09-11 03:45:55 -07:00
svcscm
476ffc105b Updating submodules
Summary:
GitHub commits:

ddb1c3756c

Reviewed By: wittgenst

fbshipit-source-id: 22e7c9c3ea7b6775d1f498af9c73586f5f2c0154
2020-09-11 03:18:30 -07:00
Viet Hung Nguyen
700a9ae974 mononoke/repo_import: replace bonsai_changesets with their ids
Summary: This diff refactors the tool to use changeset_ids instead of changesets, since the functionalities of the tool always use the ids over the changesets. For process recovery (next steps) it's more ideal to save the changeset_ids, since they are simpler to store. However, if we used changesets in the tool, we would need to load them with the saved ids just to only use the ids throughout the process. Therefore, this loading step becomes redundant and we should simply use the ids.

Reviewed By: krallin

Differential Revision: D23624639

fbshipit-source-id: d9b558ebb46c0670bd09556783060f12d3a279ed
2020-09-11 03:10:27 -07:00
svcscm
3918e697fd Updating submodules
Summary:
GitHub commits:

06bfc524d6
94a7cf75ab

Reviewed By: wittgenst

fbshipit-source-id: 73b61fbcd783e796e39e3bf9772aa259f0e1bdce
2020-09-11 03:10:27 -07:00
svcscm
ebfc15dbdd Updating submodules
Summary:
GitHub commits:

0804110bdd

Reviewed By: wittgenst

fbshipit-source-id: 3d67609800a0f6e57b4a7a49923d7d164330f97c
2020-09-10 21:37:13 -07:00
Arun Kulshreshtha
a43444d481 lfs_server: remove mutable borrow from ODS middleware
Summary: `RequestContext` doesn't need to be mutable anymore.

Reviewed By: krallin

Differential Revision: D23631630

fbshipit-source-id: 0080aa3d5c25bafd784251adc34e98f9d04908de
2020-09-10 20:57:12 -07:00
Arun Kulshreshtha
7904099f13 edenapi_server: Add EdenAPI-specific columns to Scuba samples
Summary: Add a Scuba handler for the EdenAPI server, which will allow the server to log custom columns to Scuba via `ScubaMiddleware`. For now, the only application specific columns are `repo` and `method`.

Reviewed By: krallin

Differential Revision: D23619437

fbshipit-source-id: f08aaf9c84657b4d92f1a1cfe5f0cb5ccd408e5e
2020-09-10 20:57:12 -07:00
Arun Kulshreshtha
cec871cc9f edenapi_server: log stats to ODS
Summary: Add `OdsMiddleware` to the EdenAPI server to log various aggregate request stats to ODS. This middleware is directly based on the `OdsMiddleware` from the LFS server (which unfortunately can't be easily generalized due to the way in which the `stats` crate works).

Reviewed By: krallin

Differential Revision: D23619075

fbshipit-source-id: d361c73d18e0d1cb57347fd24c43bdb68fb7819d
2020-09-10 20:57:12 -07:00
Arun Kulshreshtha
25af6e81d7 edenapi_server: add HandlerInfo
Summary:
Add a new `HandlerInfo` struct that can be inserted into the request's `State` by each handler to provide information about the handler to post-request middleware. (This includes things like which handler ran, which repo was queried, etc.)

A note on design: I did consider adding these fields to `RequestContext` (similar to how it's done in the LFS server), but that proved somewhat problematic in that it would require using interior mutability to avoid forcing each handler to borrow the `RequestContext` mutably (and therefore prevent it from borrowing other state data). The current approach seems preferable to adding a `Mutex` inside of `RequestContext`.

Reviewed By: krallin

Differential Revision: D23619077

fbshipit-source-id: 911806b60126d41e2132d1ca62ba863c929d4dc9
2020-09-10 20:57:12 -07:00
svcscm
f8be541a28 Updating submodules
Summary:
GitHub commits:

10b33d4cfc
03a8f4de26
ed1e12a906

Reviewed By: wittgenst

fbshipit-source-id: 7a1c4b4b5fb89000b040152993adacc2d5d9d812
2020-09-10 20:57:12 -07:00
svcscm
24f8677feb Updating submodules
Summary:
GitHub commits:

d276c470b2
3c68d6745f
783ed3d75a
90607a2574
e7069f6853
3a6fd09cee
1963e76163
93079baef8
e4b829f729
dc14845a82
21753a22db
ea3faa0653
1e13918f2c

Reviewed By: wittgenst

fbshipit-source-id: b30254e0b54be1d1f986a12031880b8e2beb78b5
2020-09-10 19:46:05 -07:00
Durham Goode
474b043a34 grep: fix biggrep integration when corpus rev is not present
Summary:
The corpus rev that biggrep has indexed may not be available in the
local client. Later on in the function it will pull that revision, but earlier
in the function the new logic I added a few weeks ago is just crashing.

That logic was trying to diff against the earlier revision, but that's pretty
arbitrary. Let's just diff against one of the revs at random
(deterministically) and get rid of the need for the hash to exist in the repo
early in the command.

Reviewed By: sfilipco

Differential Revision: D23635801

fbshipit-source-id: 1c284d710b8df9539a696e900183bc10d5d71869
2020-09-10 18:01:38 -07:00
Xavier Deguillard
45854b5ba0 cli: fix eden top
Summary:
The AccessCount fields were recently renamed to start with fsChannel instead of
fuse to be more platform independant. This broke edenfsctl due to it using the
old names.

Reviewed By: wez

Differential Revision: D23633574

fbshipit-source-id: 2a5fc73c47d2f0a6db407ecfeaf85992b7932c10
2020-09-10 16:07:30 -07:00
svcscm
5d2ac9142a Updating submodules
Summary:
GitHub commits:

c179d691d2
74f244dfd9
e4a48c847f
325a6465ec

Reviewed By: wittgenst

fbshipit-source-id: 34a07307cf5fb7585131a4789c562680120810c4
2020-09-10 16:07:30 -07:00
svcscm
82e11f48bd Updating submodules
Summary:
GitHub commits:

3bfd1f47d3
704c7ec4a6
71c7065dc0

Reviewed By: wittgenst

fbshipit-source-id: f5b4f90803ce2c781065920f8c17205e236c5bd1
2020-09-10 13:54:23 -07:00
Katie Mancini
2d6fd038e9 Make TreeInode::prefetch metadata prefetching aware
Summary:
Readdir tries to be smart and prefetch the metadata for each of the children.
But this uses the old path to read metadata for files which can cause eden to
download the blob. When metadata prefetching is turned on in the backing store
it is better to leave this to metadata prefetching to the backing store.

Reviewed By: wez

Differential Revision: D23476876

fbshipit-source-id: 41cc5e6f423f19adb18581564c069c12621b6c1b
2020-09-10 13:29:36 -07:00
Zeyi (Rice) Fan
dec1cc3fb2 handle non-empty directory when creating redirections
Summary:
This diff fixes a bug on Windows when the redirection target is a non-empty directory. As seen in P141872812

This doesn't make the exception go away but generate a more meaningful error message so the user can act on it.

Reviewed By: xavierd

Differential Revision: D23605233

fbshipit-source-id: 2d2bde0e9cd94323a6537ebcec29a4c15868806d
2020-09-10 09:20:03 -07:00
svcscm
c180d940a2 Updating submodules
Summary:
GitHub commits:

8049f9705a
3f19ef0ec5
ec5bf9749c

Reviewed By: wittgenst

fbshipit-source-id: 4a73f4331e8a910731f110914ee14ad497084792
2020-09-10 06:54:55 -07:00
Viet Hung Nguyen
4a6351c8a2 mononoke/repo_import: check dependent systems for small repo,
Summary: Once we start to move the bookmark for the large repo commits, small repo commits should also start to appear for the dependent systems (e.g. Phabricator) through back-syncing. This diff adds this functionality to see if the commits have been recognised by the tools.

Reviewed By: StanislavGlebik

Differential Revision: D23566994

fbshipit-source-id: 2f6f3b9099bb864fec6a488064abe1abe7f06813
2020-09-10 05:46:35 -07:00
svcscm
215c5e78e3 Updating submodules
Summary:
GitHub commits:

10ee4469c1
983c38d949
041de5a486

Reviewed By: wittgenst

fbshipit-source-id: 72a629da9a0c3d2a640c9ff8db0667cd81efb738
2020-09-10 04:56:24 -07:00
Lukasz Piatkowski
1d2340782a mononoke/integration: exclude the most flaky tests (#55)
Summary: Pull Request resolved: https://github.com/facebookexperimental/eden/pull/55

Reviewed By: farnz

Differential Revision: D23622449

Pulled By: lukaspiatkowski

fbshipit-source-id: 79e1895f2c6191a2968d0cff226a38ba47188431
2020-09-10 03:26:09 -07:00
Simon Farnsworth
1f7d61a04f Teach mononoke_admin blobstore-fetch to save the raw contents to a file
Summary: Useful when looking into blobstore corruption - you can compare all the blobstore versions by manual fetchees.

Reviewed By: krallin

Differential Revision: D23604436

fbshipit-source-id: 7b56947b0188536499514bae6615c6e81b9106c3
2020-09-10 02:29:48 -07:00
Simon Farnsworth
4754357f62 Asyncify more of blobstore_fetch admin command
Summary: Going to add more features, so simplify by asyncifying first

Reviewed By: krallin

Differential Revision: D23604437

fbshipit-source-id: 52b2b372e4d3fbf1d59168c6c11311d9edf4ff0f
2020-09-10 02:29:48 -07:00
Simon Farnsworth
89e30973ff Report write errors when scrubbing
Summary: When we're scrubbing blobstores, it's not actually a success state if a scrub fails to write. Report this back to the caller - no-one will usually be scrubbing unless they expect repair writes to succeed, and a failure is a sign that we need to investigate further

Reviewed By: mitrandir77

Differential Revision: D23601541

fbshipit-source-id: d328935af9999c944719a6b863d0c86b28c54f59
2020-09-10 02:29:47 -07:00
Lukasz Piatkowski
c044f1669a mononoke/integration tests: deal with bash issues on tests (#50)
Summary:
One test was fixed earlier by switching MacOS to use modern version of bash, the other is fixed here by installing "nmap" and using "ncat" from within it on both linux and mac.

Pull Request resolved: https://github.com/facebookexperimental/eden/pull/50

Reviewed By: krallin

Differential Revision: D23599695

Pulled By: lukaspiatkowski

fbshipit-source-id: e2736cee62e82d1e9da6eaf16ef0f2c65d3d8930
2020-09-10 01:56:54 -07:00
svcscm
86c4677d04 Updating submodules
Summary:
GitHub commits:

77553efbe0

Reviewed By: wittgenst

fbshipit-source-id: e1232bd6c2f219acbccb527e4bcecbae87ea51cf
2020-09-09 23:44:13 -07:00
Arun Kulshreshtha
54641e8d1b edenapi_server: remove extraneous fields/methods from RequestContext
Summary: Remove unused fields and superfluous methods from `RequestContext`.

Reviewed By: singhsrb

Differential Revision: D23619076

fbshipit-source-id: 0fc42d6c29a8bb5c197d3559baa497a9e6e9c825
2020-09-09 22:43:31 -07:00
svcscm
d60b0e41cb Updating submodules
Summary:
GitHub commits:

da9e73228c
15d2fa399f

Reviewed By: wittgenst

fbshipit-source-id: 71ae569b7ca833c3815695be3824bc695dc1e727
2020-09-09 22:43:30 -07:00
svcscm
beb8e1245b Updating submodules
Summary:
GitHub commits:

031e6b5752
3d69f701b8
7c364fc2ce
bfde457b0d
eb39d85eb8
2e62befa55
276c78c18b
3636fa1cfc
5be6845c54
ce52ea3cee
e17b2c12d1
fd85675c65

Reviewed By: wittgenst

fbshipit-source-id: 980755322648b08d3d4c9a45a2ec6d3469e8c5f3
2020-09-09 20:22:36 -07:00
Durham Goode
f5a2347fbb py3: fix Mononoke Python 3 test failures
Summary:
Fixes a few issues with Mononoke tests in Python 3.

1. We need to use different APIs to account for the unicode vs bytes difference
for path hash encoding.
2. We need to set the language environment for tests that create utf8 file
paths.
3. We need the redaction message and marker to be bytes.  Oddly this test still
fails with jq CLI errors, but it makes it past the original error.

Reviewed By: quark-zju

Differential Revision: D23582976

fbshipit-source-id: 44959903aedc5dc9c492ec09a17b9c8e3bdf9457
2020-09-09 18:31:04 -07:00