Commit Graph

62586 Commits

Author SHA1 Message Date
Alex Hornby
4c99a8e49a mononoke: fix divide by zero if walk is really fast to complete
Summary: If progress is logged less than one millisecond apart it gives a divide by zero.  Fix it.

Reviewed By: farnz

Differential Revision: D25997768

fbshipit-source-id: 65dcba2dc7a789540a8e4fce6aeca0ee9668895d
2021-01-21 10:01:00 -08:00
Stanislau Hlebik
53360c82dc mononoke: fix backsyncing mapping change via commit extra
Summary:
Yesterday I landed a diff (D25950531 (79c34c5094)) which allows changing a mapping by
landing a commit with a special commit extra. The implementation was done
inside backsyncer.

However, this was incorrect for a few reasons, the main reason being backsyncer
is not the only thing that rewrites commits between repos (x-repo commit lookup
is another thing for example).
So we need to push this implementation down to CommitSyncer level so that
everyone rewrites commits in the same way.

This diff fixes this issue, and moves all the logic of figuring out correct
mapping version down to CommitSyncer level. Doing so allowed me to also
simplify backsyncer to use normal sync_commit() method to backsync commits.

Another important note is about how we handle commits with no parents. We allow
syncing them only if there's an unambiguous version that we can pick. In case
of any ambiguity we don't sync them and return an error, which means that e.g.
merging a new repo and simultaneously changing the mapping is not possible.

Reviewed By: ikostia

Differential Revision: D25975842

fbshipit-source-id: a87fee545ac1305832ac905337610e7b87884477
2021-01-21 09:43:29 -08:00
svcscm
add03cb3bf Updating submodules
Summary:
GitHub commits:

66f614d724
75c772b320
8a485cf970

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 1582c24c3a6f1651ce767ffd0aeddfad9c7c69bf
2021-01-21 07:16:59 -08:00
Stanislau Hlebik
7a6e92b8e8 mononoke: add get_version function
Summary:
this is the function that will be responsible for figuring out which version to
use for remapping a commit. We'll extend it in the next diff.

Differential Revision: D25973951

fbshipit-source-id: 42b02608b4b88a216f6ea895943c49573fb29171
2021-01-21 06:00:29 -08:00
Stanislau Hlebik
91b2778ec5 mononoke: remove unneeded check
Summary:
We do the same check a little bit below - let's remove the first one, since
it's unnecessary

Differential Revision: D25973248

fbshipit-source-id: ab88128906b938c5ee57e23a261a7fc997e0ef72
2021-01-21 06:00:29 -08:00
Johan Schuijt-Li
a44eecde1d send correct websocket headers and add test
Summary:
D25883922 (c1c9a9c585) does a refactor which messes up the headers, which will break
proxygen. Correct this and add a test to make sure we don't repeat this
mistake.

Reviewed By: krallin

Differential Revision: D25983271

fbshipit-source-id: 4994a4992fd6df7c62c5d91970f76165f848cc08
2021-01-20 22:55:10 -08:00
svcscm
660703a532 Updating submodules
Summary:
GitHub commits:

7a21ca5b0a
ece23fac57
02d961487f
0e54b25be2
cea043b6e4
fdc014dfe4
54219f0506
e49e32b6cc
455aabbc1c
cb38570881
010744dd29

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: b8e6fcf29ea59948368a0d406872e98be38cd271
2021-01-20 22:55:09 -08:00
svcscm
b5d21bcd69 Updating submodules
Summary:
GitHub commits:

dfc2dd26f1
bc40ae2ed5
594df25ce9
7ba43ce313
1d9aa6793a
e10d1c93b8
537020ac1e
68e81b3b82
78520ea345
5abe676385
1ebf759c76
24322cc827

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 63714a755d28be2a145b4bed9dffcd1b5c92346c
2021-01-20 22:11:03 -08:00
Udip Pant
b899ce837f update to libbpf-0.3 in getdeps
Summary: Allows us to use new APIs in libbpf

Reviewed By: anakryiko

Differential Revision: D25933787

fbshipit-source-id: f0988caae351760b814eba74f6f716db51f728bd
2021-01-20 21:20:09 -08:00
svcscm
683caf6d4e Updating submodules
Summary:
GitHub commits:

9c9f1d2db4
8bb30bbf74
c7ea550124

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 9dfbf25f141ff2977eddb064f9e343a4c8a2f6d2
2021-01-20 21:20:09 -08:00
svcscm
3183f03942 Updating submodules
Summary:
GitHub commits:

59b47473bf
5493332d47
4226eac1ea
59b91a569a
79bdfab8c5
e883b6ede9

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 0bf46af1afd2aaf10f4020cfe5381e238eca57e5
2021-01-20 19:19:34 -08:00
Chad Austin
acaba247cf implement FUSE_FALLOCATE
Summary:
Some linkers (lld being one) use fallocate() or posix_fallocate() on
the output file before writing its contents. EdenFS would return
ENOSYS or ENOTSUP so glibc would fall back and write a single byte to
every 512 byte block, which is terribly slow and generates a bunch of
fake traffic in the Watchman journal.

This diff implements basic support for FUSE_FALLOCATE, avoiding this
slow emulation.

Reviewed By: xavierd

Differential Revision: D25934694

fbshipit-source-id: c6c90ea2b517d4dbedce29d9a4340870c8c177c3
2021-01-20 19:04:59 -08:00
svcscm
b0023da0c2 Updating submodules
Summary:
GitHub commits:

3fa09cb1c5
3516ecec71
f50f6c6253
0d34840d70
51f8b9ff8d

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 0181c6b74574d0b22d354db364f2d15acf7e7f6c
2021-01-20 17:22:04 -08:00
Katie Mancini
84710bce2b Include backing repos in eden list
Summary:
A lot of users have been having trouble getting their eden repos recloned
recently, to make this process simplier I add the reclone process to the clone
script.

In this script I check if a user has multiple repos depending on the same
backing store. This allows me to warn them that they might lose changes from
these other repos. This diff threads along the backing store to the
`eden list` result for that check.

Reviewed By: chadaustin

Differential Revision: D25078423

fbshipit-source-id: 9ceb1f9acc4ec170cbb12d4b0b3b7d51987f88e3
2021-01-20 15:56:28 -08:00
Liubov Dmitrieva
9bd3235f3f deprecate owner_team option in favour of ui.supportcontact
Summary:
The both options have basically the same value.

This is my next step for resolving mismatches between CC dynamic config and the current configuration and generally improving CC configuration.

Reviewed By: DurhamG

Differential Revision: D25973556

fbshipit-source-id: aae21efcd5174ed58efcb9e5d8c85831d35777ea
2021-01-20 14:15:54 -08:00
Stanislau Hlebik
0e4eb0b684 mononoke: add removed test
Summary:
In D25954401 (75e60ef4db) I by mistake removed a big chunk of an integration test. This diff
adds it back.

Reviewed By: krallin

Differential Revision: D25969563

fbshipit-source-id: 7b4143359e99a1ad0182d0561b6c0ab6af4295e0
2021-01-20 10:56:36 -08:00
Thomas Orozco
d872917609 mononoke: allow using ALPN to identify hgcli traffic
Summary:
I'd like to eventually add an actual HTTP stack in Mononoke Server. Doing this
will be easier / nicer if we don't have to peek at the traffic to decide how
to interpret it (i.e. ALPN vs. HTTP).

To do so, we can use ALPN. If the client tells us they want the hgcli protocol,
we can use that, and skip peeking at the traffic entirely.

Obviously, we can't roll this out in one go, so first, let's accept traffic
advertised as hgcli via ALPN. Later, we can stop peeking at the traffic
entirely once we're not receiving any traffic from hgcli not advertised via
ALPN. I added ODS counters so we can canary this.

Note that the way I set this up is that if the client requests something that
isn't ALPN (e.g. H2), we just continue the handshake but don't select anything.

Finally, note that client side, we don't care (or even try to read) what the
server actually selected.

Reviewed By: johansglock

Differential Revision: D25954535

fbshipit-source-id: 183f6f56b2c8895aa8b18101565a4f2cd643be8d
2021-01-20 09:16:29 -08:00
Thomas Orozco
418cf3a5c5 mononoke: add a library for ALPN support
Summary:
I'd like to update our connection acceptor to support ALPN in order to
distinguish hgcli traffic from http traffic (the former will have ALPN and the
latter will not).

To do so, I need to parse ALPN, which is a length-prefixed bytestring format.
Let's add support for it in a library. This is what this does.

Reviewed By: johansglock

Differential Revision: D25954536

fbshipit-source-id: 3756dde90906a5f0f36630b866bcb17d03bc94c6
2021-01-20 09:16:29 -08:00
Liubov Dmitrieva
8d6f9be84c fix make local build
Summary:
Make local build is broken with

```
building 'hgmain' binary
error: failed to select a version for the requirement `indicatif = "^0.14"`
candidate versions found which didn't match: 0.15.0
location searched: directory source `/data/users/liubovd/fbsource/fbcode/eden/scm/../../../third-party/rust/vendor` (which is replacing registry `https://github.com/rust-lang/crates.io-index`)
required by package `hgcommands v0.1.0 (/data/users/liubovd/fbsource/fbcode/eden/scm/lib/hgcommands)`
    ... which is depended on by `hgmain v0.1.0 (/data/users/liubovd/fbsource/fbcode/eden/scm/exec/hgmain)`
perhaps a crate was updated and forgotten to be re-vendored?
error: compilation of Rust target 'hgmain' failed
make: *** [Makefile:68: local] Error 1
```

Reviewed By: krallin

Differential Revision: D25973253

fbshipit-source-id: 42c66dcfe26dc5c7713d4bdedc2b353aa5eb20ed
2021-01-20 07:23:59 -08:00
Evgenii Kazakov
42486b81bd mononoke/tunables: add by_repo maps for tunables
Reviewed By: ikostia

Differential Revision: D25955587

fbshipit-source-id: b8c534f711da3f5abbb0cdf128c6fdcf25b199aa
2021-01-20 04:20:25 -08:00
Alex Hornby
94010f8539 mononoke: remove BlobConfig::Scrub variant
Summary:
Scrub was being enabled by mutating the BlobConfig into the BlobConfig::Scrub.

This change removes the BlobConfig::Scrub variant as its not present in the thrift config any more, so there is not need for it to exist. Scrubbing is an optional mode of multiplexed store construction, so instead add ScrubOptions to BlobstoreOptions.

Reviewed By: StanislavGlebik

Differential Revision: D25927253

fbshipit-source-id: 29fceae59be8f7068300a7b8b298c6edbe4da04b
2021-01-20 02:31:36 -08:00
Alex Hornby
a81bda64cb mononoke: introduce ScrubOptions
Summary: Add a ScrubOptions struct for the scrub blobstore in preparation for passing it more arguments in the next diff.

Reviewed By: StanislavGlebik

Differential Revision: D25927255

fbshipit-source-id: 5990ecd1b7ebf19b518306122045f670ad75fb0d
2021-01-20 02:31:35 -08:00
Thomas Orozco
b9f583fdaa mononoke/hgcli: shut down even harder
Summary:
Updating to a newer version of Tokio breaks hgcli.

This seems to be happening because Tokio fixed a bug where shutting down your
runtime could leak threads (https://github.com/tokio-rs/tokio/pull/2649), which
results in the runtime refusing to shutdown if you have a thread waiting to
read on stdin (note: I didn't try to back that out specifically to confirm).

Unfortunately, we have that in hgcli, because we usually kick off a stdin read
before we know if we'll need the data or not.

Here's the backtrace for a blocked shutdown P163996251.

We  were already trying to shut down the runtime and ignore every outstanding
work (because we ensure earlier that there is nothing outstanding), so let's
just try even harder.

Reviewed By: StanislavGlebik

Differential Revision: D25952430

fbshipit-source-id: ae3a1413790cf81a5d990220f2dc5d4599219f73
2021-01-20 01:42:34 -08:00
Thomas Orozco
bcad6c95b7 mononoke/integration: make debug mode more helpful for debugging
Summary:
There are a few reasons why debugging with `--debug` is not optimal right now:

- It's in a namespace, so you can't `gdb -p PID`
- We use chg, so finding hg processes is tricky

This fixes that.

Note that running with `--debug` is very different from what we do in normal
mode anyway so there isn't much sense in keeping them super similar.

Reviewed By: StanislavGlebik

Differential Revision: D25952429

fbshipit-source-id: d15921dd008dd75de8c5f44e06b331f6c55adf58
2021-01-20 01:42:33 -08:00
Thomas Orozco
188f513fdd rage: add bookmark subscriptions
Summary:
We had a user whose `hg sl` was completely hosed because they didn't have
master anymore (or hardly any remote bookmarks for that matter), which made
everything draft.

Let's make this easier to debug by logging subscriptions to hg rage.

Reviewed By: StanislavGlebik

Differential Revision: D25951745

fbshipit-source-id: d08b6bf7febe47923908b312f1881e3be15188c8
2021-01-20 01:38:10 -08:00
svcscm
6606f18cb4 Updating submodules
Summary:
GitHub commits:

be8b189d12
10ad6e5006
aec42249e5
f457e443e2
13c3bf8e14
a6fb3e34b1
0b40f1fd6d
db679c3b26
a1a458375a
d8668e7821
4fdc244983

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 2e2024b99346414c755e82caf6bc84ba97ef8ede
2021-01-20 01:38:10 -08:00
svcscm
da2e890476 Updating submodules
Summary:
GitHub commits:

292b42257e
b451673dac
e7b84a4929
f184a28f2f
4b2937d95b
1cad7c184b
452ea10312
a834db0dfb
1254ff17b2
30aa723292
ef3ed3b97b
5fda125eb5
816259d53f

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 6b0e91a44fc3a0027361b7988f206d400137478f
2021-01-19 22:12:19 -08:00
Pedro Eugenio Rocha Pedreira
4030bd68ed Add protobuf manifest
Summary: Adding protobuf manifest, which will be used to compile f4d/velox.

Reviewed By: spershin

Differential Revision: D25926384

fbshipit-source-id: 08a2dffc9e9baa0d393e5f648ce99ca032a9df5f
2021-01-19 21:34:19 -08:00
Pedro Eugenio Rocha Pedreira
8902557f91 Add lzo manifest
Summary: Adding lzo manifest, which will be used by f4d/velox

Reviewed By: amitkdutta

Differential Revision: D25926434

fbshipit-source-id: 4d7efe5eba7cdca1f682fbd4cfd6ff0337ce7c19
2021-01-19 21:31:01 -08:00
Stefan Filip
10f855d28c newdoc: add Segmented Changelog section
Summary:
I gathered information from various sources in this newdoc entry.
The goal is to have an easy link that gives a general summary of what
Segmented Changelog is and what it does.

Reviewed By: quark-zju

Differential Revision: D25908322

fbshipit-source-id: 8f3d2725afe8db5a9bc179189c287fd54aaca08b
2021-01-19 21:00:13 -08:00
svcscm
46b6c1da7c Updating submodules
Summary:
GitHub commits:

15b762a3c1

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 69baab72b6dfc18d7926608e4f5a0dc1da0f7be5
2021-01-19 18:45:16 -08:00
David Tolnay
00e6c4f3e3 Update to Rust 1.49.0
Summary: Release notes: https://blog.rust-lang.org/2020/12/31/Rust-1.49.0.html

Reviewed By: jsgf

Differential Revision: D25866484

fbshipit-source-id: 25a584547df858f71e76ab0cc88e1adeaac070c7
2021-01-19 17:46:47 -08:00
Stanislau Hlebik
75e60ef4db mononoke: add one more command to change xrepo mapping
Summary:
In previous diffs we added a new way to change xrepo mapping - just landing a
commit with a special extra is enough to change the mapping version used to
rewrite a commit. This diff adds an admin command that let's us do this.

Reviewed By: ikostia

Differential Revision: D25954401

fbshipit-source-id: 8ff3366dc305a6fea8bb013e457ad47fa7163994
2021-01-19 15:50:39 -08:00
svcscm
841f599e15 Updating submodules
Summary:
GitHub commits:

b6d64905f3
4c8cca05cc

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 5fc4ec0b47d834924cb628d82c531d3bc9788499
2021-01-19 15:50:39 -08:00
svcscm
256492bbe5 Updating submodules
Summary:
GitHub commits:

bc4e31a8e5
46eb6991c7

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: f168e991323a81833683cb580883937e236e3935
2021-01-19 10:11:15 -08:00
Jan Mazur
ac1954e099 http persistent connection for netspeedtest requests
Summary:
This is implements http keep-alive behavior for `/netspeedtest` endpoint. `keep-alive` is implicit for `HTTP/1.1`. It means that connection is not closed after sever sends a response. Further request/response pairs can be exchanged.

This enables warmup measurements in netspeedtest before real measurements are made.

The difference is quite significant, even when I am measuring this server-side.

Reviewed By: krallin

Differential Revision: D25946675

fbshipit-source-id: a7b0f812bf61d704ca93615ab09d0897a08f1ba1
2021-01-19 10:03:35 -08:00
Jan Mazur
c1c9a9c585 hg_speed_test on mononoke
Summary:
Now, when direct connection to mononoke is being rolled out, hg_speed_test (part of hg debugnetwork) doesn't work anymore. It was a feature of hg_ssh_wrapper.

This adds server-side of hg_speed_test using HTTP.

Reviewed By: HarveyHunt

Differential Revision: D25883922

fbshipit-source-id: 1522b3db69ff36899bd45743374e59668bda4048
2021-01-19 10:03:34 -08:00
Stanislau Hlebik
59b6bcaf46 mononoke: disallow pushing public commits with change-xrepo-mapping extra
Summary:
In the previous diff we added a special commit extra which allows backsyncer to
change the mapping version that was used to rewrite commits between repos.

This is a dangerous thing since it might corrupt the repository. So to avoid
people accidentally corrupting the repository let's add a check that would
prevent landing public commits with change-xrepo-mapping extra.

Reviewed By: ahornby

Differential Revision: D25951529

fbshipit-source-id: d2de37d1bf2f2eb9f45b3bf3e21706a799a50f69
2021-01-19 08:55:28 -08:00
Stanislau Hlebik
79c34c5094 mononoke: make it possible to change mapping version via commit extra
Summary:
At the moment the procedure to change commit sync mapping version is fairly
complicated [1]. This diff attempts to simplify one aspect of it.

At the moment we need to disable pushredirection and manually sync a commit
between two repos. Disabling pushredirection is quite error prone and led to
SEVs in the past. With this diff we just need to create a commit with a special
extra "change-xrepo-mapping" and let the backsyncer rewrite a commit with the
new version for us.

This means that landing a commit with this extra should not be allowed to
everyone - I'm going to change bookmark movement to check that.

Reviewed By: ikostia

Differential Revision: D25950531

fbshipit-source-id: 78b1f4950e6bb7da8b511e02685ed6084c29a680
2021-01-19 08:55:27 -08:00
svcscm
ef574517e6 Updating submodules
Summary:
GitHub commits:

ccd526b92e
90503e9405
bf9ba68cfd
90635034b0

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 7defbb0ede698c7730b6b5d095b72acc76fec22a
2021-01-19 08:28:34 -08:00
Mark Juggurnauth-Thomas
0afac29010 sync configerator thrift
Reviewed By: StanislavGlebik

Differential Revision: D25952897

fbshipit-source-id: 0fbd43fa36c2cb749a6eed103b88840681a9f706
2021-01-19 08:11:11 -08:00
svcscm
458455103d Updating submodules
Summary:
GitHub commits:

0aa5c17bc4

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 14f422b268147b9ac887b407bdc23c72f38a9877
2021-01-19 07:43:27 -08:00
Kostia Balytskyi
0d52cff58c iterhelpers: add chunk_by_accumulation
Summary:
This implements chunking of the original iterator by saturation of some
accumulator until a condition starts to be satisfied.

Note: I tried looking through `Vec`, `itertools` and `Iterator` methods, and
did not find anything that would allow me to express this easily.

Reviewed By: StanislavGlebik

Differential Revision: D25947821

fbshipit-source-id: 9e4dd738ecd2ab06ebb69123e4a03059f96b3fb6
2021-01-19 07:13:52 -08:00
Kostia Balytskyi
8f226f5e85 admin/rsync: rename file_num_limit into total_file_num_limit
Summary:
This option limits the total number of files copied/removed. I will also add a
mode to chunk copying/removal into multiple commits, let's rename this, so that
it's not confusing.

Reviewed By: ahornby

Differential Revision: D25947233

fbshipit-source-id: 204ef3c0e610072c87548b7534f575fb6fe21fc6
2021-01-19 07:13:52 -08:00
Stanislau Hlebik
d651eb869b mononoke: make it possible to diff SmallRepoCommitSyncConfig
Summary:
This change makes it possible to diff SmallRepoCommitSyncConfigs.
This can be useful to find what's changed between two mapping versions, and it
will be used in the later diffs as well.

Reviewed By: ikostia

Differential Revision: D25947041

fbshipit-source-id: 96b0447e78278c826998ba236bc27bb65daf0fef
2021-01-19 06:51:52 -08:00
Mark Juggurnauth-Thomas
a792523b7a arcconfig: don't loop forever if .arcconfig is missing on Windows
Summary:
The exit condition for looking for the `.arcconfig` file will never be reached
on Windows, as the root directory is usually something like `C:\\`.

Instead, stop if we get to a point where `os.path.dirname` returns the same
thing, as that will probably also be a root.

Reviewed By: singhsrb

Differential Revision: D25947124

fbshipit-source-id: 30f4bf3df0b4119694194bcb1c8bcadca41556e4
2021-01-19 04:05:22 -08:00
svcscm
5733afd36c Updating submodules
Summary:
GitHub commits:

4b91713003
8efd192489

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 40e054603f5aa50d45473506336cb00bb5bc729d
2021-01-18 11:40:05 -08:00
Radu Szasz
5fb5d23ec8 Make tokio-0.2 include test-util feature
Summary:
This feature is useful for testing time-dependent stuff (e.g. it
allows you to stop/forward time). It's already included in the buck build.

Reviewed By: SkyterX

Differential Revision: D25946732

fbshipit-source-id: 5e7b69967a45e6deaddaac34ba78b42d2f2ad90e
2021-01-18 10:38:08 -08:00
Thomas Orozco
4478c476eb configparser: add support for bypassing all shards
Summary:
quark-zju made it much safer to rollout configs recently by enforcing
time-sharding, but one little downside is that it becomes harder to test
them locally (or at diff-time, which I'm working on adding) because the time
shard will usually not pass.

This diffs add an environment variable to force all shards to pass.

Reviewed By: DurhamG

Differential Revision: D25925207

fbshipit-source-id: 343b90165ad2b6bae64b6821eae95c58f7d79698
2021-01-18 07:12:55 -08:00
Kostia Balytskyi
1c718c5b4a megarepotool: add gradual deletion of certain paths
Reviewed By: StanislavGlebik

Differential Revision: D25944074

fbshipit-source-id: b94a0e007f2cabbc410789122361b6ce43617df3
2021-01-18 04:41:28 -08:00