Commit Graph

55765 Commits

Author SHA1 Message Date
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
Michael Klepikov
180fdcfad6 Make AuthorizationService client available in Rust
Summary:
Added "rust" to the languages in the if-service and its dependent targets, added a unique `rust_crate_name` to each one.
Adjusted import names in the dependent code.

Reviewed By: dtolnay

Differential Revision: D19818989

fbshipit-source-id: d1cf5c5f7b82dd64d7c045e50b304b7a58cf2ffc
2020-02-11 17:53:39 -08:00
svcscm
4f82775a4b Updating submodules
Summary:
GitHub commits:

83235fc9c9
5e7db4a79e
a289241eb1
59e20c74d0
f7485852b3
e412a426d6
c71db99ae6
d968de4625
130c6b0eaa

Reviewed By: zpao

fbshipit-source-id: 01e5c7c239d932c116ccd2d0d82dab0a5235231f
2020-02-11 17:53:38 -08:00
svcscm
04af973ac1 Updating submodules
Summary:
GitHub commits:

d7a15a265b
0ea4116666
d5a9ad62b7
3d5b14c79c

Reviewed By: zpao

fbshipit-source-id: 9bc0fbb3cd67243f396322c199710743eed1921f
2020-02-11 14:44:31 -08:00
Puneet Kaushik
d1bf4a21db Functions to convert widechar to RelativePath, AbsolutePath and PathComponent
Reviewed By: simpkins

Differential Revision: D19561988

fbshipit-source-id: 5e88d3751151b896dd7d01a58e1f5f2d8a8a068b
2020-02-11 11:12:54 -08:00
Jun Wu
1714cef464 remotefilelog: remove bgprefetch feature
Summary:
We don't use the feature in production. The main motivation is to remove the
flaky test. People wanting this feature can use normal hooks instead.

Reviewed By: xavierd

Differential Revision: D19830033

fbshipit-source-id: 0b1df7bb6c5de116ee27df4c38071912568d893e
2020-02-11 10:25:34 -08:00
Jun Wu
3279babd74 nointerrupt: remove the extension
Summary:
We never actually enabled it in production, and our new storage (ex. metalog,
indexedlog) are SIGKILL-safe. Only the changelog (revlog) might be subject to
double Ctrl+C issues. And we have debugfixcorrupt which can fix changelog
corruptions. So nointerrupt becomes less important.

The direct motivation is the test has been too flaky recently (and it's hard to
reproduce locally).

Differential Revision: D19830032

fbshipit-source-id: 87722d730fab49efbfd231772b1a5dddf8ec0d7b
2020-02-11 10:25:34 -08:00
Stefan Filip
f3b41ee3a9 warn: remove large file warning
Summary: Not very useful on today's hardware.

Reviewed By: quark-zju

Differential Revision: D19783741

fbshipit-source-id: d8ff29486cdc5f8e31d929d9fbba827e37012381
2020-02-11 10:18:06 -08:00
Durham Goode
2a975077f5 py3: don't assert on byte types in python 2
Summary:
We don't have confidence that python 2 is only using bytes (vs unicode
or other byte-like objects). These asserts break users, so let's disable them
except for in tests. We should uncover issues here as we port to python 3.

Reviewed By: xavierd

Differential Revision: D19819699

fbshipit-source-id: 9e3a9c34e7661fac4db9ee2a79f65be3d5e48cb3
2020-02-11 09:38:55 -08:00
Durham Goode
f918387338 py3: fix graphql producing unicode blobs in python 2
Summary:
As part of the py3 migration we've started enforcing that encodeutf8 is
only called on bytes. graphql is returning unicode, so we need to change it to
return bytes on python 2.

Reviewed By: xavierd

Differential Revision: D19819701

fbshipit-source-id: 433ced2da87d522e4234ff453d11cacfaeebdd8d
2020-02-11 09:38:55 -08:00
Durham Goode
0ccfdfdb6e py3: switch blackbox to use pycompat.encodeutf8
Summary:
ui.log apparently receives non-utf8 data occasionally, which makes the
encoding fail. Let's change this to not encode on python2 (by using pycompat).
As we migrate to python 3 all the strings should become unicode, and this will once
again enforce utf8 encoding

Reviewed By: xavierd

Differential Revision: D19819700

fbshipit-source-id: 66da26d00d1b1c4286e325f0574ad7ff478e5d1f
2020-02-11 09:38:54 -08:00
Alex Hornby
dff471bcbb mononoke: walker: switch to new bounded_traversal crate
Summary: switch to new bounded_traversal crate prior to futures 0.3 uprade

Reviewed By: farnz

Differential Revision: D19804893

fbshipit-source-id: 3af88792397bdc84227b10f6d490fced5e4764c9
2020-02-11 09:18:10 -08:00
Genevieve Helsel
f52ee41ae9 log daemon shutdowns
Summary: logs information about daemon shutdowns, including duration, if it was a graceful restart or not, and if it was successful or not.

Reviewed By: fanzeyi

Differential Revision: D19817811

fbshipit-source-id: a851de8872f98952d046fb148a27fbf9f05b2212
2020-02-11 09:04:33 -08:00
Liubov Dmitrieva
17f3293ee0 mononoke: implement hash prefix resolution API in scs service
Reviewed By: markbt

Differential Revision: D19798317

fbshipit-source-id: 96407adc74a692957f6fb8027a940fe18a0d1b32
2020-02-11 07:43:18 -08:00
Alex Hornby
4a5e62da11 mononoke: bounded_traversal_stream update to new futures
Summary: update to new futures

Reviewed By: farnz

Differential Revision: D19805485

fbshipit-source-id: a75e7816f8819086592dcefa22b2269618ce91b6
2020-02-11 07:40:33 -08:00
Stanislau Hlebik
430427d51c commitcloud: try to update working copy even if there's nothing to sync
Reviewed By: markbt

Differential Revision: D19814471

fbshipit-source-id: 0c9eb2891a3cf06ddac8d6d492f5487a0c80e969
2020-02-11 03:20:53 -08:00
svcscm
562bed6b9a Updating submodules
Summary:
GitHub commits:

5492309669

Reviewed By: zpao

fbshipit-source-id: 486df70a2611fc407cb47ef99b14fb986181b77a
2020-02-11 02:59:28 -08:00
Lukasz Piatkowski
542d1f93d3 Manual synchronization of fbcode/eden and facebookexperimental/eden
Summary:
This commit manually synchronizes the internal move of
fbcode/scm/mononoke under fbcode/eden/mononoke which couldn't be
performed by ShipIt automatically.

Reviewed By: StanislavGlebik

Differential Revision: D19722832

fbshipit-source-id: 52fbc8bc42a8940b39872dfb8b00ce9c0f6b0800
2020-02-11 11:42:43 +01:00
svcscm
754bf64008 Updating submodules
Summary:
GitHub commits:

717dbbe89f
ed9408bfb9
28aa09dcce
edecc77bf6

Reviewed By: zpao

fbshipit-source-id: bfdec1dc2e9aaca4605b77482b94b1ab88371f7f
2020-02-10 23:32:43 -08:00
Jun Wu
3ac689c81f context: do not print verbose KeyError context if the exception is handled
Summary:
Attach the content to the exception object directly so if the exception is
handled, no verbose message will be printed.

Reviewed By: DurhamG

Differential Revision: D19817404

fbshipit-source-id: 9b79952559d07eb62bd7eb2398c6dd022ffe7b28
2020-02-10 22:21:44 -08:00
svcscm
9ca2b66ef3 Updating submodules
Summary:
GitHub commits:

1064ec2c47
cbf5f3be43
e1187ffe3a
1dc9b860b8
a0fe02c004

Reviewed By: zpao

fbshipit-source-id: a03929099724e6ad1c36255365e51958defd313b
2020-02-10 22:21:43 -08:00
svcscm
f49cdeffe3 Updating submodules
Summary:
GitHub commits:

4bc5213b66
9ae570bb89
b2bc1da561
dcde8696bd

Reviewed By: zpao

fbshipit-source-id: c5ca30dab73f80cd13f5a5bf6e3867083b2512ac
2020-02-10 15:07:25 -08:00
svcscm
3a2d845970 Updating submodules
Summary:
GitHub commits:

791fcef36b
debc4ef18b
967c3b8c5f
822b3eacbf

Reviewed By: zpao

fbshipit-source-id: 1d8c0a471f3820e687ce0be5eed641f0260143ad
2020-02-10 15:07:25 -08:00
svcscm
abcd3c053d Updating submodules
Summary:
GitHub commits:

3acab0697d
416bc6ef61

Reviewed By: zpao

fbshipit-source-id: 3ca37693abbfd017862e8822b7fb7ea442895efc
2020-02-10 10:18:42 -08:00
Wez Furlong
0c4d6d82f2 eden: apfs helper: make chown a bit nicer
Summary:
I think I might want to call this from more than one place in
a later diff, so extract it into a helper function.

Reviewed By: chadaustin

Differential Revision: D19770166

fbshipit-source-id: e044003736c6ba21984a9129da1df50ce92b2f35
2020-02-10 08:28:50 -08:00
Wez Furlong
28f7b4a0b0 eden: show desktop notification for blob/tree fetch errors
Summary:
This commit causes a desktop notification to be shown if we generate
EIO or ETIMEDOUT responses via fuse; the prompt is intended to make it obvious
to the user that they need to connect to the VPN.

The commit by itself doesn't show a notification, it allows configuring a
command that can be run to do something to show a notification.

The test plan includes one such configuration for our corp environment.

* It doesn't trigger for thrift-originated downloads (eg: prefetch), only for
  VFS operations through FUSE.
* Ideally we'd know exactly when we have a network related error in the store
  code and use that to trigger the notification.  However, we have a rather
  convoluted set of importers and fallbacks today, one of which is interpreting
  a generic response returned from a pipe, so it is not especially clear
  exactly where we should locate the logic

Reviewed By: chadaustin

Differential Revision: D17513364

fbshipit-source-id: 45134f3672679cb5580cb0c1bc12a0d6e38525ca
2020-02-10 08:28:49 -08:00
Mark Thomas
8869eafe44 scs_server: include error source chain on internal errors
Summary:
Include the full error source chain on any internal errors.  This will improve
debugability when internal errors are encountered, as the outermost context
might not be enough to describe the origin of the error.

Detect when backtraces are disabled, and only include them on the error if a backtrace was captured.

Reviewed By: StanislavGlebik

Differential Revision: D19813785

fbshipit-source-id: c28ffc0c44050a82cb7050afa57e976f37962432
2020-02-10 07:26:03 -08:00