Commit Graph

55641 Commits

Author SHA1 Message Date
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
Alex Hornby
c88ad00fcf mononoke: create bounded_traversal crate with bounded_traversal_stream
Summary: create a bounded traversal crate with the 0.1 version of bounded_traversal_stream functionality,  prior to updating to futures 0.3

Reviewed By: farnz

Differential Revision: D19804873

fbshipit-source-id: e98e00111fee5b1a9fcfc20bb054eeae1263fb26
2020-02-10 06:02:42 -08:00
Alex Hornby
dba8424409 mononoke: walker: replace use of spawn_future with tokio 0.2 join handle
Summary: replace use of spawn_future with tokio 0.2 join handle

Reviewed By: krallin

Differential Revision: D19770171

fbshipit-source-id: e0b7bf3da58896b223149b339a72bfec997215ee
2020-02-10 06:02:41 -08:00
Alex Hornby
0105ad492b mononoke: walker: update the step methods to new futures
Summary:
Update the walker step methods to use new futures, and combine them with async fn

Later in stack planning to:
  * remove use of spawn_future and replace it with the tokio 0.2 join handles
  * port bounded_traversal_stream to new futures so all these 0.3 futures don't immediated get compat'd back to 0.1

Reviewed By: farnz

Differential Revision: D19767902

fbshipit-source-id: 10fd6236a064efbb7d0815fadbdd32036bcafead
2020-02-10 06:02:41 -08:00
Harvey Hunt
3d6d9754b5 mononoke: Add original_timestamp column to blobstore_sync_queue sqlite schema
Summary:
D19767626 added an original_timestamp column to the
blobstore_sync_queue. Update the sqlite schema to keep it in sync.

Reviewed By: krallin

Differential Revision: D19787488

fbshipit-source-id: ad576e2ec99349953e2ab69e3defb73d1ff556c0
2020-02-10 04:37:40 -08:00
Harvey Hunt
78c44c5ec2 mononoke: Populate multiplex_id when writing blobs and update the healer to read them
Summary:
Modify the multiplexed blobstore implementation so that the
multiplex_id is written to the healer queue after a put. Further, update the
blobstore healer to only look at entries with the same multiplex ID as it's
configured to run with.

Reviewed By: ahornby

Differential Revision: D19770057

fbshipit-source-id: 41db19f0b0f84c048d49ab9e6258cccc89cf4195
2020-02-10 04:37:40 -08:00
Simon Farnsworth
3a2ae2f772 Move task spawning to last minute to reduce flakiness
Summary:
This test deliberately races itself. Unfortunately, tokio's scheduler is sufficiently quick that if we spawn all the futures as they're created, they sometimes don't race each other.

Fix this by spawning in the join line instead.

Reviewed By: ahornby

Differential Revision: D19812651

fbshipit-source-id: 86685bbb71c451e9c2a96100c83ddff28d0718dd
2020-02-10 03:42:30 -08:00
Alex Hornby
c147600793 mononoke: walker: fix performance regression loading file data
Summary: Fix performance regression in loading file data.

Reviewed By: farnz

Differential Revision: D19808562

fbshipit-source-id: 098fbd30dcd962b951e3ec040a799b4883ec421e
2020-02-10 01:49:59 -08:00
Stanislau Hlebik
2b7e7e5676 mononoke: log if derived data is not enabled
Summary:
Before we start blocking generation of derived data let's start with logging if
derived data is not specified.

Reviewed By: farnz

Differential Revision: D19791523

fbshipit-source-id: 15bed8463f8a021de76a2878f06ec95d9fef877f
2020-02-10 01:44:09 -08:00
Stanislau Hlebik
8abe1af621 mononoke: add DerivedDataConfig
Summary:
See D19787960 for more details why we need to do it.
This diff just adds a struct in BlobRepo

Reviewed By: HarveyHunt

Differential Revision: D19788395

fbshipit-source-id: d609638432db3061f17aaa6272315f0c2efe9328
2020-02-10 01:44:09 -08:00
Thomas Orozco
46037e13d0 mononoke: update test-lfs-server-proxy-skip-upstream.t to be more deterministic
Summary:
Looks like most of our tests got slower recently, and this particular test
started failing as a result since it's sensitive to timing. Unlike when this
test was written, we can now get a little more info from Mononoke LFS by
looking at Scuba logs, to know if we went to upstream or not. So, let's do
that.

Reviewed By: HarveyHunt

Differential Revision: D19790000

fbshipit-source-id: 5617b088595c911018166d2c13eb43dc6adca60b
2020-02-10 01:40:41 -08:00
svcscm
3bd05c344c Updating submodules
Summary:
GitHub commits:

88cc7c9355

Reviewed By: yns88

fbshipit-source-id: 0143c3f0adcbdfae64c24d1f3aade17bc3f1a114
2020-02-10 01:40:40 -08:00
svcscm
2fc24f93f7 Updating submodules
Summary:
GitHub commits:

09446426df

Reviewed By: yns88

fbshipit-source-id: b4dbc20cba139a757e95aaee04784339e3d69c73
2020-02-09 23:52:34 -08:00
svcscm
583fe39ca8 Updating submodules
Summary:
GitHub commits:

76b030e84b
987dfdc1b8

Reviewed By: yns88

fbshipit-source-id: ce1f5d186d1b13169057bd123e6105e246c96aed
2020-02-09 23:52:33 -08:00
svcscm
96f358ac3c Updating submodules
Summary:
GitHub commits:

d6785c6fa1
9bfeb6a951
b25d19c478

Reviewed By: yns88

fbshipit-source-id: 72505634bd114aa8b39a54e653a15278672b7110
2020-02-09 15:55:38 -08:00
svcscm
3a2b035fdb Updating submodules
Summary:
GitHub commits:

c809df6536
c63feee30b
a67ff280c9

Reviewed By: yns88

fbshipit-source-id: c3c05e026ff726799ebe518e6ba37ca5a15f7eae
2020-02-08 19:23:16 -08:00
svcscm
9ab828bfdb Updating submodules
Summary:
GitHub commits:

2703e3a0a2
ec5e903333
84b41a6969

Reviewed By: yns88

fbshipit-source-id: 9cb62264ca38813e1a0565af30f28b1b9c775e54
2020-02-07 19:01:45 -08:00
generatedunixname89002005307016
1143bd18c2 Update pyre version for eden
Summary: Automatic upgrade to remove `version` override and silence errors.

Reviewed By: grievejia

Differential Revision: D19792646

fbshipit-source-id: f2ba11c409730a19139ac897af93f3df7ce4c882
2020-02-07 17:43:04 -08:00
Arun Kulshreshtha
ea60863fca edenapi_server: shut down gracefully
Summary: Make the EdenAPI server report that it is exiting when asked to shut down. This ensures that Proxygen will stop sending traffic to servers that are about to be shut down by Tupperware. This diff is basically the same as krallin's diff D17626009 for the LFS server.

Reviewed By: quark-zju

Differential Revision: D19782432

fbshipit-source-id: 41b9e6761145402e7dcf18c53a2b33799588594c
2020-02-07 16:41:14 -08:00
Arun Kulshreshtha
d7292d5ede edenapi_server: use Mononoke API
Summary: This diff sets up the Mononoke API (from the `mononoke_api` crate) in the EdenAPI server, and makes it available to route handlers by adding it to a new `EdenApiContext` struct that is maintained as part of the server's global state. The server's route handlers should use the Mononoke API for accessing source control data, and any new source control business logic should be incorporated into that crate rather than being part of the EdenAPI server itself.

Reviewed By: xavierd

Differential Revision: D19778441

fbshipit-source-id: bc2efb82e0276d75c49980c52fa0d3017a4ce2f1
2020-02-07 16:41:14 -08:00
svcscm
631cec6fd9 Updating submodules
Summary:
GitHub commits:

8e52a6669f
0eb09b752d
4e457278fa
9e82512508
149b600870
1a8dfecc83
8e3e8ad08d

Reviewed By: yns88

fbshipit-source-id: bbfd078171ac18a4885479bdf5671f5183af8baf
2020-02-07 16:41:13 -08:00
svcscm
c32bef6c61 Updating submodules
Summary:
GitHub commits:

307e46ac84
a14c8b756b
8cbad71f1e
b42fa1497f

Reviewed By: yns88

fbshipit-source-id: 3655a7444237590f06b083658b8ef3e1361801c0
2020-02-07 15:11:57 -08:00
Jun Wu
abb8ccb346 minibytes: add serde support
Summary:
See also https://github.com/serde-rs/bytes/.

This will be used in the `dag` crate.

Reviewed By: DurhamG

Differential Revision: D19770858

fbshipit-source-id: 2a870a564e0ceecdc7a4667853b2b2a5ea4ce6e3
2020-02-07 14:21:39 -08:00
Jun Wu
8029cd3878 minibytes: port benchmark from tokio/bytes
Summary:
Performance looks okay comparing with tokio/bytes v0.5.4:

minibytes:

  test clone_arc_vec        ... bench:      16,542 ns/iter (+/- 1,524)
  test clone_shared         ... bench:      16,211 ns/iter (+/- 596)
  test clone_static         ... bench:       1,437 ns/iter (+/- 502)
  test deref_shared         ... bench:         367 ns/iter (+/- 101)
  test deref_static         ... bench:         366 ns/iter (+/- 1)
  test deref_unique         ... bench:         367 ns/iter (+/- 4)
  test from_long_slicd      ... bench:          91 ns/iter (+/- 18) = 1406 MB/s
  test slice_empty          ... bench:      10,382 ns/iter (+/- 104)
  test slice_short_from_arc ... bench:      23,823 ns/iter (+/- 1,411)

tokio/bytes:

  test clone_arc_vec        ... bench:      16,213 ns/iter (+/- 1,864)
  test clone_shared         ... bench:      18,685 ns/iter (+/- 634)
  test clone_static         ... bench:       3,983 ns/iter (+/- 163)
  test deref_shared         ... bench:         366 ns/iter (+/- 26)
  test deref_static         ... bench:         373 ns/iter (+/- 36)
  test deref_unique         ... bench:         391 ns/iter (+/- 33)
  test from_long_slice      ... bench:          67 ns/iter (+/- 7) = 1910 MB/s
  test slice_empty          ... bench:      15,149 ns/iter (+/- 1,708)
  test slice_short_from_arc ... bench:      36,541 ns/iter (+/- 3,485)

clone_static is faster because minibytes don't call into vtable's clone.
from_long_slice is slower because minibytes uses Arc unconditionally while bytes
can avoid Arc overhead if refcount is 1.

Reviewed By: DurhamG

Differential Revision: D19770857

fbshipit-source-id: 5bafcc57a38c68baccfcafd3906f1a47b2bf4530
2020-02-07 14:21:39 -08:00
Jun Wu
108f1c947a minibytes: minimalist zero-copy Bytes with mmap support
Summary:
This crate provides the core features of the commonly known `Bytes` crate:
zero-copy slicing and cloning, while also supports mmap-backed buffers.

The main motivation is to replace `Mmap` in `indexedlog`. That has multiple
benefits:
- Handles 0-sized mmap more cleanly.
- Handles clones more cleanly.
- Gain the flexibility to zero-copy data without lifetime / reference.
- Gain the flexibility to switch to non-mmap data.

The `bytes::Bytes` crate does not yet support mmap buffers as of its latest
release (0.5.4).

Implementation wise, `minibytes::Bytes` uses `Option<Arc<dyn Trait>>` for the
"trait object". This makes implementing the mmap storage just one line.
`bytes 0.5.4` re-invents the "trait object" manually using unsafe code. It requires
about 50 lines to implement the mmap storage (in D19756122).

Reviewed By: xavierd

Differential Revision: D19770856

fbshipit-source-id: 8cfa7052a18ac2e0cd6348b77d5e2a4acc61195c
2020-02-07 14:21:38 -08:00