Commit Graph

55641 Commits

Author SHA1 Message Date
Jun Wu
4ec1633c15 test-fb-hgext-treemanifest-server: attempt to fix '[[' not found error
Summary:
This is an attempt to fix the following error:

```
 --- test-fb-hgext-treemanifest-server.t
+++ test-fb-hgext-treemanifest-server.t.simplecachestore.err
@@ -167,8 +167,9 @@
   $ hg push --to mybook
   pushing to ssh://user@dummy/master
   searching for changes
-  remote: prepushrebase.myhook hook exited with status 1
+  remote: prepushrebase.myhook hook exited with status 2
   abort: push failed on remote
+  remote: $TESTTMP/myhook.sh: 2: $TESTTMP/myhook.sh: [[: not found
   [255]
```

which I suspect is caused by a non-bash default shell.

Reviewed By: xavierd

Differential Revision: D19887222

fbshipit-source-id: b6fe5d89e4c41ff49fca86da927c4e702ed1e7c1
2020-02-13 14:50:51 -08:00
Puneet Kaushik
8aed2fb637 On Windows verify Windows path seperator in PathComponentSanityCheck
Summary: On Windows we will verify both Windows and POSIX path separators, because we have both types of paths.

Reviewed By: simpkins

Differential Revision: D19562772

fbshipit-source-id: a6d8280e3bae4f6cd32b1f379bb59e22dd584211
2020-02-13 14:19:48 -08:00
svcscm
94d6bf00e0 Updating submodules
Summary:
GitHub commits:

0cfddad978
e195d5c3fa
5138764eb5
bfb3ea1038
fb0b3ae1a8

Reviewed By: zpao

fbshipit-source-id: b0de4fe76f2892540d9f9af6f120c64cd5ee469f
2020-02-13 13:53:13 -08:00
Jun Wu
d1750883cb py3: sshserver: detect client close correctly
Summary:
This is needed by the next diff. Otherwise Python 3 ssh tests in the next diff
will hang.

Reviewed By: DurhamG

Differential Revision: D19879882

fbshipit-source-id: ecc317d0685993c6b1bef8c72068bf4315030d0f
2020-02-13 12:16:22 -08:00
Jun Wu
594f668295 connectionpool: add a debug note saying connection being reused
Summary:
I'm going to change the connection pool logic but I'm not sure where it gets
used. This change exposes at least one test using it.

Reviewed By: xavierd

Differential Revision: D19872614

fbshipit-source-id: 4921b92c3fe3fd7ba1a72de17eef92604964eb2e
2020-02-13 12:16:21 -08:00
Puneet Kaushik
94f7f9bb9c Removed getTreeEntry from WinStore
Summary: There is a bug in WinStore::getTreeEntry(). It fetches the shared_ptr to the Tree and returns the raw pointer to the entry in the Tree. Using the entry without holding the Tree shared_ptr is unsafe. This bug was introduced while refactoring the code in D19377522.

Reviewed By: simpkins

Differential Revision: D19762486

fbshipit-source-id: 6f0a849f0dc9731bada9a56bdc2a6c18740b0b18
2020-02-13 10:52:37 -08:00
Mark Thomas
950ff5dff4 scs_server: ensure monitoring future never returns
Summary:
The SCS monitoring future should run forever and never return, even if there is
an error.

If an error does occur, we should just log it, and try again next time.

Also convert to new futures.

Reviewed By: krallin

Differential Revision: D19879621

fbshipit-source-id: 45b7097d1c5af61f3c390f6aa6ada5832062fbc9
2020-02-13 10:07:28 -08:00
svcscm
8552fd30f9 Updating submodules
Summary:
GitHub commits:

839ce2a764

Reviewed By: zpao

fbshipit-source-id: 9c57d3f41920ca5f9d64ad8fa9afbbb57e3b666a
2020-02-13 08:58:42 -08:00
Pavel Aslanov
91c7c20b8f pass origin_line into blame compact format
Summary: Extend compact blame format to include `origin_line`

Reviewed By: markbt

Differential Revision: D19642736

fbshipit-source-id: 2d9b22d6096fac0e7041e91de0b2028d56b8b335
2020-02-13 08:56:33 -08:00
Pavel Aslanov
34d578198e extend blame with origin_offset
Summary: This diff extend `Blame` structure with `origin_line` (line at the moment of introduction of a hunk).

Reviewed By: mitrandir77

Differential Revision: D19499125

fbshipit-source-id: 2fa6bc4ee62d484dd6dc6bee17cb1d04ba1db158
2020-02-13 08:56:32 -08:00
Jun Wu
004ebb0ddc tests: fix test-fb-hgext-lfspushrebase-verify-blobs
Summary:
Regressed since D19702533.  This test breakage is only visible if
lfs-test-server exists.

Reviewed By: farnz

Differential Revision: D19872608

fbshipit-source-id: 74ace3eb7363bb1bb773e6b448685e9a3874086f
2020-02-13 07:51:26 -08:00
Jun Wu
60e4f31be9 test-ssh: run contrib/hg-ssh with hg debugpython
Summary: The script does not run with the stock python since it depends on edenscm.

Reviewed By: farnz

Differential Revision: D19872953

fbshipit-source-id: 4c5b2d2935a0c9e8cf0a654f541600d7a4fd7211
2020-02-13 07:51:25 -08:00
Stanislau Hlebik
975d226cf2 mononoke: disable filenodes generation during hg changeset generation, take 2
Reviewed By: aslpavel

Differential Revision: D19856419

fbshipit-source-id: 0d1bcecf9f700d0789bba1227ef8a58748f04bbf
2020-02-13 03:18:13 -08:00
svcscm
4304af9a47 Updating submodules
Summary:
GitHub commits:

3ad75fd14c
346138591b
e67c9356f3
f9d943183a
51e246680d
b0e5a980c8
fb182174da
5b841e9782

Reviewed By: zpao

fbshipit-source-id: 1ea1efbb95c8cca6ec8f4ca9aba1c5316891f3c1
2020-02-13 03:18:13 -08:00
svcscm
4205932d47 Updating submodules
Summary:
GitHub commits:

6707a75daa
7fc7409cdb
c82b3b9182
84183bd6c7
4c624f3d16
1e3f40f195
b3d7f59615
2c32e8d6fe
6e84cbb9c3

Reviewed By: zpao

fbshipit-source-id: ea90b34484d04bb42dfef4c2a3e5de4df5abe5dd
2020-02-13 01:28:17 -08:00
Kostia Balytskyi
a3f1d6ae64 clienttelemetry: report multiple server_hostnames
Summary:
Right now, if the client establishes connection to more than one peer, the
last one to proces `clienttelemetry` wireproto command gets the honor to set
`server_realhostname`. This is not desirable. Specifically, when we have
`fallbackpath` set up for remotefilelog/treemanifest and the prefetch happens
after pulling a commit, we get the hostname of the fallbackpath server,
while losing the hostname of the original `getbundle` server.

Reviewed By: DurhamG

Differential Revision: D19837570

fbshipit-source-id: fdc41565a5dfe670df3caf3b034196c4b7bdf6d9
2020-02-13 00:48:25 -08:00
Stanislau Hlebik
12c2453526 remotenames: log when a node is missing
Reviewed By: DurhamG

Differential Revision: D19832734

fbshipit-source-id: 2861b05cc754b3e3865dee706290fe3bed08d336
2020-02-13 00:23:54 -08:00
Lukasz Piatkowski
07dd370f28 mononoke: add README.md and the missing pieces for supporting cargo (#13)
Summary:
Take the README.md from
7ead0e29e4/README.md
and apply it on Eden repo.

Re-add the Cargo.toml file that declares Cargo workspace.

Re-add fbcode_builder/getdeps manifest for Mononoke
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/13

Test Plan:
./build/fbcode_builder/getdeps.py build mononoke
  ./build/fbcode_builder/getdeps.py test mononoke

Reviewed By: ahornby

Differential Revision: D19833059

Pulled By: lukaspiatkowski

fbshipit-source-id: fb37e13306c0b9969a7c4e52b05e1a66a577022f
2020-02-13 00:12:36 -08:00
Stanislau Hlebik
6a1358467e mononoke: change how we generate filenodes for octopus merges
Summary:
In the next diff I'm going to refactor BlobRepo::get_manifest_from_bonsai()
function and remove IncompleteFilenodes structure. While doing so I noticed
that the behaviour of get_manifest_from_bonsai() and FilenodesOnlyPublic is
different with regards to generating hg filenodes for octopus merges. In
particular, get_manifest_from_bonsai() at the moment doesn't generate filenodes
for paths that came from stepparents, but FilenodesOnlyPublic does generate
them.

I'd say both of this approach are equally reasonable, however let's try to
preserve the behaviour

Reviewed By: krallin

Differential Revision: D19856420

fbshipit-source-id: 9f8ae656205f39536c450b885fc4d8d6a2534456
2020-02-12 23:56:23 -08:00
svcscm
c4a7ca6741 Updating submodules
Summary:
GitHub commits:

2599f6856a

Reviewed By: zpao

fbshipit-source-id: 0004f486f9c683477eaf0f6b5a72dd8173d86413
2020-02-12 23:56:23 -08:00
svcscm
f4bd46c0f6 Updating submodules
Summary:
GitHub commits:

91df10c469
1329c39b7b
ad78a85b3f
6e97d4de00
326a6fae8b
618e11a230

Reviewed By: zpao

fbshipit-source-id: ab6550b87c252a774e40106be279f82c95d53838
2020-02-12 21:54:50 -08:00
Wez Furlong
90dbc47c5a eden: apfs: add delete-all subcommand
Summary: It is helpful in CI to be able to remove all eden managed volumes at the end of a job, so that is what this command does.

Reviewed By: simpkins

Differential Revision: D19794482

fbshipit-source-id: d832d093d0a6369a4b533d66afbdce626fa78e2c
2020-02-12 17:59:05 -08:00
Wez Furlong
9423f8d70a eden: apfs: fixup mount point detection
Summary:
In the initial iteration of eden_apfs_mount_helper I parsed the human
readable version of the `diskutil apfs list` output to get all of the useful
information from it.  Later, I switched to using `diskutil apfs list -plist`
because it simplified the parsing dramatically.

However, it was overlooked that the `mount_point` field was not present in
the plist output.  That was usually fine, except in the one case that I
didn't test after changing the parser: after reboot macOS picks a volume
name to remount these volumes.  The lack of the mount_point field meant
that we would simply skip the logic that deals with unmounting and remounting
the volume in the correct place.

In order to address this gap we now need to parse the mount table to determine
where the device is mounted, so that is what this diff does.

Reviewed By: simpkins

Differential Revision: D19794478

fbshipit-source-id: ace2df145a46aad7df78c3f4b15fb2198aef3e6f
2020-02-12 17:59:05 -08:00
Wez Furlong
90a69e77ca eden: apfs helper: disable spotlight, fsevents, trashes
Summary:
This is done on a sort of best effort basis; the problem
we're aiming to solve (or at least avoid in the majority of cases)
is in these scenarios:

* `buck clean` gives up cleaning as soon as it finds a directory that
  it doesn't have permissions to remove.
* `yarn` tries to look for node modules inside the `.Trashes` dir,
  which it doesn't have permissions to access

macOS doesn't give us a solid way to indicate that these things should
be disabled at the time that we mount the volume; the various docs
and suggestions online all involve creating marker files to block the
system processes from performing their usual actions, and we could
set those up here, but if we create them with root permissions we'll
trigger the bad behavior in buck and yarn.  If we create them with
regular user permissions then eg: running buck clean would remove them
and allow the system to recreate them.

The system will recreate the `.Trashes` directory when the user sends
something to the trash via Finder.   Similarly, macOS will recreate
the fsevents directories when an application establishes a watch
on the volume using fsevents.

So we can't permanently prevent this problem, but by deleting these
things at mount time we should at least avoid it bubbling up for
the majority of users, and if those things come back and get in the
way, running `eden redirect unmount ; eden redirect fixup` should
remount and re-remove the problematic things.

Reviewed By: fanzeyi

Differential Revision: D19841514

fbshipit-source-id: f530ab3d68edfa643096bd27efae71c80b505184
2020-02-12 17:59:04 -08:00
svcscm
4d35da7974 Updating submodules
Summary:
GitHub commits:

927d8afa7a
e64508917b
40d690970f

Reviewed By: zpao

fbshipit-source-id: 9135af67550f83a598a0a0baa1f9f6b1e4311ddf
2020-02-12 15:43:36 -08:00
Arun Kulshreshtha
e8406247e3 edenapi_server: rename EdenApiContext to EdenApiServerContext
Summary: Later in this stack, we're going to have to introduce a few more context types, including Mononoke's per-session `CoreContext` as well as an LFS-server inspired per-request `RequestContext`. To make the scope of the `EdenApiContext` more clear (namely, that unlike the other contexts, this one persists for the entirety of the server's execution), let's rename this to `EdenApiServerContext`. This mirrors the naming convention for these contexts used in the LFS server.

Reviewed By: xavierd

Differential Revision: D19863296

fbshipit-source-id: 8ad785070328523d0beaf824c86c7350ff6a2697
2020-02-12 14:13:35 -08:00
Arun Kulshreshtha
b0ce12cb2e edenapi_server: use ServerIdentityMiddlware
Summary: Use `ServerIdentityMiddleware` from `gotham_ext` in the EdenAPI server to provide server information in the HTTP response headers returned by the server. This is useful for debugging.

Reviewed By: xavierd

Differential Revision: D19863297

fbshipit-source-id: 6ed8bac35e05af580e062423e6f6389a18d17c2a
2020-02-12 14:13:34 -08:00
Jun Wu
03baa31789 indexedlog: switch from bytes to minibytes
Summary:
This makes it possible to use `Bytes` for mmap buffers.

The changes are because `minibytes::Bytes` does not implement `From<&[u8]>`
with the intention to make slice copy explicit.

Reviewed By: xavierd

Differential Revision: D19818719

fbshipit-source-id: c34ee451bfd2dc7bcbbcebd52a76444b6c236849
2020-02-12 13:57:37 -08:00
Xavier Deguillard
49c953bc7e backingstore: plumb the MemcacheStore
Summary:
EdenFS will now be able to fetch blobs directly from memcache. This won't have
any big benefits as no blobs are in memcache right now, but over time, this
will significantly reduce the cost of fetching blobs.

Reviewed By: fanzeyi

Differential Revision: D19861643

fbshipit-source-id: c2e9d317bd30d4656bf0b3f8897794161697761a
2020-02-12 13:43:00 -08:00
svcscm
97c8b0093c Updating submodules
Summary:
GitHub commits:

615002e01a
474cc847f6
171f51c33e
2f8774c921
94d97ba9aa

Reviewed By: zpao

fbshipit-source-id: ba6181b4075223bedaa5a6e3d3de32a6f70bc578
2020-02-12 12:34:22 -08:00
Liubov Dmitrieva
9f71d2cf15 scs client: add prefix support for resolving commit ids
Summary:
This improves scs client ux as you can see in the test.

Cross scheme collisions have been already supported in the code, and there will
be a proper message.

For the ambiguity within a single scheme, I added a message.

Reviewed By: mitrandir77

Differential Revision: D19834142

fbshipit-source-id: a2cff44f6ef031b1224ebf13d38d76c66c9ee4b9
2020-02-12 12:02:41 -08:00
Arun Kulshreshtha
31fde72573 edenapi_server: fix incorrect license header
Summary: The exact format of the GPL license header changed when the Mononoke directory moved from `/scm/mononoke` to `/eden/mononoke`. This file ended up with the old header somehow (was created prior to the rename but landed after), so let's fix it to make the linter happy.

Reviewed By: farnz

Differential Revision: D19848640

fbshipit-source-id: 39c5b49850e5a3cba1951bf4e5b813cd08940f01
2020-02-12 11:26:08 -08:00
Arun Kulshreshtha
4ac91b4fa9 gotham_ext: lfs_server: move ServerIdentityMiddleware from lfs_server to gotham_ext
Summary: Move the generally-useful ServerIdentityMiddleware into gotham_ext so we can use it in the EdenAPI server.

Reviewed By: xavierd

Differential Revision: D19845282

fbshipit-source-id: 3a01b15dc64cee99cefafcdac229c0b70a4db683
2020-02-12 11:26:07 -08:00
Xavier Deguillard
a4b83e384a revisionstore: add tracing point for memcache
Summary:
These tracing points will help us understand the memcache hit rate as well as
the fetching speed.

Reviewed By: quark-zju

Differential Revision: D19836499

fbshipit-source-id: 1936c44efc3e7715069e6a959f5331139d591d5c
2020-02-12 10:38:59 -08:00
Xavier Deguillard
2c4a10bf4b revisionstore: move memcache set to a background thread
Summary:
Everytime a cache miss is seen, the data fetched from the server will be sent
directly to memcache for future use. Unfortunately, doing so in a blocking
manner severely impact the overall fetching speed from the server. Since
memcache is purely an optimization, we can afford to send data to it
asynchronously.

Let's move as much as possible of the code to a background thread to reduce the
overhead of memcache.

Reviewed By: DurhamG

Differential Revision: D19836011

fbshipit-source-id: 68e506ef7464d6e99d98457d0d37178f514be1a9
2020-02-12 10:38:59 -08:00
Xavier Deguillard
dc7f7908ef revisionstore: prefetch data with get_iter
Summary:
Instead of fetching data one-by-one, let's prefetch data concurrently by using
the new get_iter function.

Reviewed By: DurhamG

Differential Revision: D19836009

fbshipit-source-id: 4a50328c0cbbba677c2de3777ebe4c34cb10c1e2
2020-02-12 10:38:58 -08:00
Pavel Aslanov
c902acbc3f remove the need to pass mapping to ::derive method
Summary: remove the need to pass mapping to `::derive` method

Reviewed By: StanislavGlebik

Differential Revision: D19856560

fbshipit-source-id: 219af827ea7e077a4c3e678a85c51dc0e3822d79
2020-02-12 10:22:39 -08:00
Durham Goode
e9042dfae4 py3: add test for unicode commit messages
Summary: Test that mercurial can accept a unicode commit message.

Reviewed By: xavierd

Differential Revision: D19838221

fbshipit-source-id: b6333e587004b358a3883db70e40d2f32af4da29
2020-02-12 09:10:12 -08:00
Johan Schuijt-Li
d46ee0c475 hook loading: provide base path when loading from configerator
Reviewed By: HarveyHunt

Differential Revision: D19856160

fbshipit-source-id: 1173c113c19e4744fa9c2b1ef125d261230179b6
2020-02-12 07:49:30 -08:00
Harvey Hunt
20ca3f76ce mononoke: fastreplay: Add ability to skip replay for repos
Summary:
Currently admission to fastreplay is controlled at a global level - a
percentage of all repos being replayed are admitted without the ability to turn
off an individual repo.

Update fastreplay to use a config option that controls which repos should be skipped.

Reviewed By: krallin

Differential Revision: D19835304

fbshipit-source-id: 63b7c66b35eaa2cb1370ad96b1c6e98a2c93b712
2020-02-12 05:19:38 -08:00
Pavel Aslanov
b862d0eaf1 convert bounded_traversal crate to new-style futures
Summary: Convert `bounded_traversal` crate to new-style futures

Reviewed By: krallin

Differential Revision: D19836232

fbshipit-source-id: 9296656da058c700b615a2e3fa915427e28fea96
2020-02-12 03:52:28 -08:00
svcscm
b3779e4fc7 Updating submodules
Summary:
GitHub commits:

f155316d5e
7450ee59cd
ef5e7f3550
2b5929f38a
fc61bf05a1
670ff4ca68
fa8bb72eaa
79035aac56

Reviewed By: zpao

fbshipit-source-id: f175698529f9be0dc3768aee9e6168f9249d4e97
2020-02-12 03:52:28 -08:00
svcscm
ca1d5421a7 Updating submodules
Summary:
GitHub commits:

fcd689da92
24482fcdc3
a3adbea41d
f395768971
27d9d36584
eaa9fd74fc
82c31328f8
2dec7a80c2
ed6215ef37

Reviewed By: zpao

fbshipit-source-id: 9293be17b0a40f79dc059ed537df5f46c99a3c1e
2020-02-12 00:35:47 -08:00
Joseph Wu
c787742e29 Fix missing re2 dep in opensource
Summary: platform_mapping library needs RE2 lib.

Reviewed By: shri-khare

Differential Revision: D19838529

fbshipit-source-id: 71a2c06437ce05a42396a2867ddadb029e36926e
2020-02-11 23:31:45 -08:00
svcscm
11563f3b46 Updating submodules
Summary:
GitHub commits:

c5680e4b5e
939e655475

Reviewed By: zpao

fbshipit-source-id: a7e3aca19b4668c5e8581aadd40e9a6d6239526c
2020-02-11 23:31:45 -08:00
svcscm
e18fcfcaa7 Updating submodules
Summary:
GitHub commits:

9fd0d1a3c7
bcaf9cdf1f
3e49249d30
98307ea1ec
f48ebb4d48
353f9c9f29
1caef25fc0
805ab665f2

Reviewed By: zpao

fbshipit-source-id: 609187c69ba2c6b31a05dcfdb1770054002ddb6e
2020-02-11 22:01:41 -08:00
Gaurav Mogre
7b89ae5a50 Push compat 1-level down in rechunker.rs
Summary: Rechunker uses tokio 0.1.0 and legacy futures 0.1.0 . This diff changes rechunker.rs to use new std::future and tokio 0.2.0

Reviewed By: farnz

Differential Revision: D19801966

fbshipit-source-id: 3ba7936e8981c87906a881216ffd66332cdcc761
2020-02-11 20:27:17 -08:00
Kostia Balytskyi
edc40cb269 mononoke: add a perf counter for draft commits, returned by getbundle
Summary:
This will allow us to distinguish `getbundle` for a normal `pull` from the one
for infinitepush pull.

Reviewed By: StanislavGlebik

Differential Revision: D19833206

fbshipit-source-id: 86534320fbb4d60bac04d458a0953701201cba87
2020-02-11 19:26:49 -08:00
Xavier Deguillard
8b082a18f7 revisionstore: don't prefetch with an empty key set
Summary:
Even when memcache would be able to prefetch everything, this would always call
into the underlying remote store with an empt key set. For things like `hg
prefetch` and a large number of keys, the effect of doing that is minimum, but
for EdenFS or `hg log -p`, the roundtrip to the server for every file/revision
would add a significant amount of overhead. Let's simply stop iterating when we
no longer need to fetch anything.

Reviewed By: DurhamG

Differential Revision: D19835797

fbshipit-source-id: 54ad704428c3b20d973cfa87f7171899ec44b3f9
2020-02-11 18:05:16 -08:00
Xavier Deguillard
fd5c00465d remotefilelog: re-use the memcachestore
Summary:
Don't rebuild the memcache store everytime. This avoid spawning a thread and
reconnecting to memcache everytime.

Reviewed By: DurhamG

Differential Revision: D19797911

fbshipit-source-id: 7ecfa111a98ab67c4791b91410a22e458fe169f6
2020-02-11 18:05:16 -08:00