Commit Graph

71356 Commits

Author SHA1 Message Date
Muir Manders
d68bac7192 lfs: retry fetch requests on 503 response code
Summary:
Currently a single LFS 503 during clone/checkout aborts the operation and leaves the user in a situation that is difficult to recover from. Now we treat a 503 as any other 5XX server error and retry.

The 5XX retry count/backoff can be configured via the lfs.backofftimes config knob. It defaults in the code to [1, 4, 8], which is 3 retries with rand(1), rand(4) and rand(8) sleep in between.

503 can be served from proxygen indicating there are no live lfs servers, or from x2pagentd in cases of network failure.

Reviewed By: quark-zju

Differential Revision: D33804601

fbshipit-source-id: cbb3514051843d3517bb676cf7c83dce057e42b9
2022-02-02 17:37:32 -08:00
Saul Gutierrez
56742d0027 initrepo: add python binding for Rust repo
Summary: Adds a Python binding for the Rust `repo` crate. For now it only exposes the static `Repo::init` method.

Reviewed By: DurhamG

Differential Revision: D33796094

fbshipit-source-id: 9cf49bcdd24bbabead79902e64a49ec8dc6fac55
2022-02-02 17:31:43 -08:00
Saul Gutierrez
6c9f70da66 repo: add method for repo initialization
Summary:
Adds a method that will be used in the future for replacing the repo initialization done in Python.

More specifically, this method creates and populates the files required for a new repo in the same way as we currently do via the constructor of `localrepo` with the extensions and configs we have enabled by default.

Reviewed By: DurhamG

Differential Revision: D33901712

fbshipit-source-id: 0d12732f5c9d36fb115a97e53b356a88fd609b6c
2022-02-02 17:31:43 -08:00
svcscm svcscm
5c59c2ed98 Updating submodules
Summary:
GitHub commits:

b3785d0cf0
abb809f9fe
bfc426c7c2
2d0a613a74
1021d2e799
b8471b9317
973388b091
c8c8f4e79d
0f9eedb347

Reviewed By: jurajh-fb

fbshipit-source-id: d081f1e2c0a8e33f28e181f736e5c0a93895a5cf
2022-02-02 17:11:44 -08:00
svcscm svcscm
4816d8f206 Updating submodules
Summary:
GitHub commits:

2f9fd7fbb4
a263419db7
dd44bb44c3
7e5c48f20a
33a69d15c0
99ba2c0e3e
7ebea4b6ac
a6a5a043f1
a4a85f3f7a
d650c217cd
050b3fcc83

Reviewed By: jurajh-fb

fbshipit-source-id: 0a2f6e39aa5506eccd9e890bdd73aef00a659d35
2022-02-02 16:43:46 -08:00
svcscm svcscm
dbd23dfdbb Updating submodules
Summary:
GitHub commits:

9511fd7548
9f51023fe7
f249c071e0
7e27b793b9
53bc65f5f5
edcef60203
3d8e21976a
23c78a849e
cf4f9c295a
5839edc095
f11caca065
79e5b2cc82

Reviewed By: jurajh-fb

fbshipit-source-id: 6933115a3982b787a91b495fa725dbf732b5b7a7
2022-02-02 16:18:34 -08:00
svcscm svcscm
4e8d7a8f57 Updating submodules
Summary:
GitHub commits:

02e007f423
d842a2f576
4dabe9e67f
4a8837f322
f09e9fbf77
8cc00432b6
de0f1b22c6
879fe066a7
b0695e2bac
1ca4c4e66c
d3a275d0e7
e8e6b30eae
86e8af36b3

Reviewed By: jurajh-fb

fbshipit-source-id: 502da7c5b78c0bd5d6119451950f6d74d1fb3ab9
2022-02-02 15:45:49 -08:00
Jun Wu
1c8e6aa573 git: support debugbundle
Summary: This command is used by jf to find commits in a bundle.

Reviewed By: DurhamG

Differential Revision: D33948840

fbshipit-source-id: 2b7b8c09cb2b30c192a00e83437d079010be5a41
2022-02-02 14:25:38 -08:00
Simon Farnsworth
d3d1f33470 Special-case linkfile src="."
Summary:
I am making it impossible to put "." or ".." as a path element in Mononoke's `MPath` abstraction, since Mononoke does not do path traversal, and canonicalization is a minefield.

However, `linkfile src="."` occurs in https://fburl.com/code/evq63pto as a special case. Treat it specially in our code, so that I can forbid path traversal type elements in an `MPath`.

Reviewed By: mojsarn

Differential Revision: D33952767

fbshipit-source-id: 0c4ce68014fb6877163035d1c7eb813616748dd2
2022-02-02 14:17:56 -08:00
svcscm svcscm
46655a8b7b Updating submodules
Summary:
GitHub commits:

c2f1a79b2a
02b7a37bba
76b048c694
a3b2f298f0
d9ddb5398e
862845d1b6
9813798b20
c01830dfd5
c949517c65
65309f1a4e
a722bd103f

Reviewed By: jurajh-fb

fbshipit-source-id: dbf3cd67a4279b110f029e302e3522c80cff7a88
2022-02-02 13:55:28 -08:00
svcscm svcscm
68668eebab Updating submodules
Summary:
GitHub commits:

f8810db8d1
9c23343be5
a02ba06a19
1db84bc33c
8f3f295272
74cda38ade

Reviewed By: jurajh-fb

fbshipit-source-id: acbe08f520d62aeca8447369256716b594a2ba61
2022-02-02 13:20:38 -08:00
Katie Mancini
aa18aba9c3 teach eden doctor to recognize stale NFS mounts
Summary:
`eden doctor` does not know how to detect or fix broken NFS mounts.

Let's teach it to recognize NFS mounts, recognize when those mounts are stale,
and fix it.

Recognizing a stale mount is a bit different on NFS and FUSE. FUSE is kind and
responds with errors when you try to read a stale mount. NFS is not so kind.
It just hangs. So instead of certain errors indicating stale mounts, hangs
will have to indicate them.

Reviewed By: chadaustin

Differential Revision: D33283361

fbshipit-source-id: 939c212db1dcb1904fc8bbf3bbf32cd39970a101
2022-02-02 13:16:41 -08:00
svcscm svcscm
0b2af69670 Updating submodules
Summary:
GitHub commits:

eda7c881bf
6892dd28d4
156dd2a6d4
4372c6b458
0ab65df1fa
832a791dde
02a10b669e
4e0dd84113

Reviewed By: jurajh-fb

fbshipit-source-id: b73cef12bd88041f573ef331124edc8e463b9c7e
2022-02-02 12:05:48 -08:00
svcscm svcscm
40538ae7b4 Updating submodules
Summary:
GitHub commits:

1c5fd0271d
22e2ab3ff5
a4286a71b2
9072f8a9c5
595747b584
98b3f23aad
bdafce0590
da28b698a9
7921788f03
1263711421

Reviewed By: jurajh-fb

fbshipit-source-id: 8323e2d88fca57419e75d6c69becf7f66751d96d
2022-02-02 11:41:17 -08:00
svcscm svcscm
ce73bdbdd3 Updating submodules
Summary:
GitHub commits:

b950bac658
f9682142fd
7b4b3be247
b16293e9d5
3f319a674a
c5fcd5cafc
ad195e7a9e
f35624ad07
6c675dd450
591b5158b4
d11cf44c21
df4c7f5e06

Reviewed By: jurajh-fb

fbshipit-source-id: 3c1d6f17d0186bdefb9d76be08d062030ddbb368
2022-02-02 11:05:04 -08:00
Yan Soares Couto
80517b6fda Default master-fastpath to True
Summary:
## Context
See D33771940 (d274a0f575)

## This diff
I move `pull.master-fastpath` to True.

Reviewed By: quark-zju

Differential Revision: D33892184

fbshipit-source-id: 105c587da85287915ce3963315d568bf65b798c9
2022-02-02 11:01:34 -08:00
svcscm svcscm
43341dab14 Updating submodules
Summary:
GitHub commits:

886ed94b5d

Reviewed By: jurajh-fb

fbshipit-source-id: df2584d7042dcb7e80d80874df8cd7d6de5474e2
2022-02-02 09:56:56 -08:00
Muir Manders
7bbc2e1517 lfs: only log hash mismatch if size matches expected
Summary: In production we do currently see some cases of lfs_read_hash_mismatch. I realized it may be due to missing chunks rather than bad chunk integrity. The new "skip_hash_on_read" path is still able to detect size mismatch, so tweak things to only log mismatch message if the sizes match.

Reviewed By: quark-zju

Differential Revision: D33928640

fbshipit-source-id: 5b63db2b05bc7b53779cdb5ae0041a7d22bb3962
2022-02-02 09:50:03 -08:00
Yan Soares Couto
2c677eb49c Default exchange.httpcommitlookup to True
Summary:
## Context
See D33771940 (d274a0f575)

## This diff
I move `exchange.httpcommitlookup` to True.

Reviewed By: quark-zju

Differential Revision: D33892116

fbshipit-source-id: 48a4b5b9effaeca0df62b56c173cb53ad231c497
2022-02-02 08:42:48 -08:00
Yan Soares Couto
4e25a7ef08 Default httpbookmarks to True
Summary:
## Context
See D33771940

## This diff
I move `pull.httpbookmarks` and `infinitepush.httpbookmarks` to True.

Reviewed By: quark-zju

Differential Revision: D33891956

fbshipit-source-id: cbc3d92aa7ac7ac9edf90b4f99ab9804e9d750be
2022-02-02 07:43:38 -08:00
Yan Soares Couto
d274a0f575 Default pull.httpmutations to true
Summary:
## Context

There are some config options that have been rolled out to 100% of users for some time, but they're still not used in tests by default, which makes our coverage worse.

The best way to change the behaviour of hg regarding config is to change the default value on `configitems.py`, and then (eventually, when this rolls out everywhere), delete them from the configerator overrides config.

The other option would be to leave them in configerator (or in eden/scm/lib/configparser/src/fb/mod.rs), but then they would also need to be replicated in all tests that want to use it, or at the very least duplicated in the base hgrc for integration tests, which is very prone to errors (or simply forgetting to do it, the state we are in today).

Notice that this still allows us to set them to false via configerator quickly, if necessary.

## This diff

This diff defaults `pull.httpmutations` to true: It was previously always set to true on configparser/src/fb/mod.rs

Reviewed By: quark-zju

Differential Revision: D33771940

fbshipit-source-id: 987db9cfaff720645eac4ad65edf560f875b3655
2022-02-02 07:43:38 -08:00
Yan Soares Couto
544f9d27f3 Make edenapi-e2e test less flaky
Summary:
This is already done in another `hg pull` in this test, but needed to be done in the clone as well, as the test is a bit flaky right now.

Ideally we need to fix this so we don't need to sleep anymore, but this will unblock us for now. I tried flushing WBC in another diff (D33771281) but it did not fix the whole issue, there might be more underneath.

Reviewed By: markbt

Differential Revision: D33917157

fbshipit-source-id: c78b3718cb4d32480d1dce8dc2c962928f3f79ad
2022-02-02 07:21:28 -08:00
svcscm svcscm
3c5c594650 Updating submodules
Summary:
GitHub commits:

8378abadc3
1a5d4dc80d
811d315bef
6e866ae74d
33cdc17a44

Reviewed By: jurajh-fb

fbshipit-source-id: 172d4feb675e12a94619fce7ef1a879201a3524c
2022-02-02 06:49:16 -08:00
svcscm svcscm
46011c3708 Updating submodules
Summary:
GitHub commits:

32e639ebeb
f35814a080

Reviewed By: jurajh-fb

fbshipit-source-id: 83d87b778c7cef84cb931e46472b433e2db79c34
2022-02-02 06:17:40 -08:00
svcscm svcscm
53a6a32a08 Updating submodules
Summary:
GitHub commits:

1c249db84c
fd45cecdf7
8da8e95861
e16a1e1126

Reviewed By: jurajh-fb

fbshipit-source-id: 2686402d288821c8be171c7a575e64d823b4dd3f
2022-02-02 04:32:46 -08:00
Mark Juggurnauth-Thomas
e3b24a3725 testtool: add mononoke-testtool drawdag
Summary:
Add a command that lets us inject a dag of commits into a test repo.

This is based on the `drawdag` implementation for unit tests.  We
extend the specification format so we can call `CreateCommitContext`
methods from the integration test code.

Reviewed By: yancouto

Differential Revision: D33854929

fbshipit-source-id: 8c903adfc2caa87d24ad89744a4415619aa5ebad
2022-02-02 04:27:29 -08:00
Mark Juggurnauth-Thomas
2f338593de testtool: add tool for integration tests
Summary:
Add a new tool `mononoke-testtool`, which will be used for commands that make
integration tests easier to write.

Since this tool is expected to only be used for tests, it will detect
production configurations and refuse to run.

Reviewed By: yancouto

Differential Revision: D33854930

fbshipit-source-id: c07cb73c726c8c60ef7a94a704f485fe9fc2576d
2022-02-02 04:27:29 -08:00
svcscm svcscm
0706eff178 Updating submodules
Summary:
GitHub commits:

eb41b4c8c9

Reviewed By: jurajh-fb

fbshipit-source-id: 5c4d56e4a806fde43d65f2d92c951984ed23ec7e
2022-02-02 04:03:59 -08:00
Mark Juggurnauth-Thomas
d5d31930a1 tools/admin: add fetch command
Summary:
Add `fetch`, which will match the features of `bonsai-fetch` and
`content-fetch` in the old admin tool.

Reviewed By: kris1319

Differential Revision: D33829451

fbshipit-source-id: dd123e60b3bf168ad6cdf1b5c3e3e2f929da5ebb
2022-02-02 02:50:51 -08:00
svcscm svcscm
625c6aa2d8 Updating submodules
Summary:
GitHub commits:

84c401ca38
74cf2e8a3c
87d32ca882
6f66243369

Reviewed By: jurajh-fb

fbshipit-source-id: 9cd65ae1e69253fe10830781ff4e6a45a1a5d8aa
2022-02-02 02:43:41 -08:00
svcscm svcscm
8165d2c374 Updating submodules
Summary:
GitHub commits:

a4e1f58e12

Reviewed By: jurajh-fb

fbshipit-source-id: 2f7e3614ecc8e66609e00df412ce5772af043ebb
2022-02-02 02:11:46 -08:00
svcscm svcscm
6cf606ff0b Updating submodules
Summary:
GitHub commits:

5e89e050e5
41b7879d6e
3894a7ec05
b23489f1eb

Reviewed By: jurajh-fb

fbshipit-source-id: f11f3bd3180fc21c49b798069fd568c2df9b5e95
2022-02-02 01:42:29 -08:00
svcscm svcscm
437e572bc0 Updating submodules
Summary:
GitHub commits:

154ea30aea
a29aef1117

Reviewed By: jurajh-fb

fbshipit-source-id: df3d344f56a3a12f51f772c186df31bc2b3a529f
2022-02-02 01:17:22 -08:00
svcscm svcscm
65157e6f3d Updating submodules
Summary:
GitHub commits:

0a5609bbb6
edebf58294
c47d300fac
b2455c5ad8
2f935b9964

Reviewed By: jurajh-fb

fbshipit-source-id: 76bc45b82a35aa8e539a3b3627b1d52764ce26ba
2022-02-02 00:44:15 -08:00
svcscm svcscm
c79977af52 Updating submodules
Summary:
GitHub commits:

38f6a28dc9
c33da309c3
de26b9ca64
ee0698ce6e
0d1f719d0a
c149a0601e

Reviewed By: jurajh-fb

fbshipit-source-id: bc945325ceb325642373553a7e48b8d82d656293
2022-02-01 23:21:46 -08:00
svcscm svcscm
e68a799f61 Updating submodules
Summary:
GitHub commits:

f7ee87b6ab
90a858a131
6a832aa71c
a6d46bb758
3122cb4358
2a44e7338a
92e9c04c52
4a46ac84a1
80e759c35c
46da7bff3f

Reviewed By: jurajh-fb

fbshipit-source-id: 2ce94acbc9ddd4263142d3533b0e7f09cfe87c67
2022-02-01 22:52:37 -08:00
svcscm svcscm
81a759397f Updating submodules
Summary:
GitHub commits:

ccd374ad79
7f72ce716a
dcaaaae591
49b20be296
da4c6dbb4b
26dfc6254e
db2a13f294
05cd11189a
9c12c7efa1
015eb02c47

Reviewed By: jurajh-fb

fbshipit-source-id: aa755a6e7410c6055123356e5b3772e930000950
2022-02-01 22:31:37 -08:00
svcscm svcscm
29c3d6aced Updating submodules
Summary:
GitHub commits:

42a12593e8
eaf32275bd
9adda7dd16
573f745ea8
7ff0d184f6

Reviewed By: jurajh-fb

fbshipit-source-id: 37e4b2f756b2a5aee6f0a1e3c12eadcdca1cbdb6
2022-02-01 21:57:31 -08:00
svcscm svcscm
7c6a0429c8 Updating submodules
Summary:
GitHub commits:

4bb8875646
fcc2adc020

Reviewed By: jurajh-fb

fbshipit-source-id: 1c280f5e22c8621e94f35a481e0638b6fe589947
2022-02-01 21:32:03 -08:00
svcscm svcscm
666228247f Updating submodules
Summary:
GitHub commits:

c8bb3b8a95
1290ab9c6f
56d738273d
3ed510b955

Reviewed By: jurajh-fb

fbshipit-source-id: 46b0f568f65f9e3a64f8af0355d39c850db01ebb
2022-02-01 20:54:47 -08:00
Xavier Deguillard
9b3486480b inodes: update SNAPSHOT at the beginning of checkout
Summary:
During checkout, the overlay is updated from the leaf up to the root, and thus
halfway through the operation, the overlay contains hashes from both the old
commit and the new commit. When the operation finishes, this discrepency no
longer exist as the overlay has been fully updated to the destination commit.

However, if EdenFS either crashes, or is being killed during the checkout
operation, the overlay will be left in this half updated state. Restarting
EdenFS and running a status or checkout operation will walk the inodes
hierarchy and construct them from the overlay, forcing a large amount of blobs
and manifests to be fetched from the network. This can be disruptive and lead
to updates/status taking a very long time due to potentially having to fetch
the entirety of the repository.

Thankfully, EdenFS can recognize this situation by simply updating its SNAPSHOT
file at the beginning of the checkout operation. If EdenFS crashes or is
killed, Mercurial will send EdenFS its own parent commit, which EdenFS can
compare and disagree about, failing the operation instead of fetching large
parts of the repository.

Reviewed By: chadaustin

Differential Revision: D33591210

fbshipit-source-id: b724429bb848425d2b1684b160ad8e1bdfee252a
2022-02-01 20:47:05 -08:00
Xavier Deguillard
572b6d9a8f config: update SNAPSHOT with in progress checkout information
Summary:
If a checkout is interrupted midway, EdenFS is unable to recover without
fetching very large parts of the repository. This leads to a poor user
experience as Mercurial suddenly hangs when doing anything.

In order to solve this, let's introduce a new SNAPSHOT version that allows
tracking the ongoing checkout operation and the commit origin and destination.

Since there is no current way for EdenFS to recover from this, let's also ask
the user to reclone if EdenFS is killed/crashed during checkout.

Reviewed By: genevievehelsel

Differential Revision: D33859121

fbshipit-source-id: b7cc4d2bc7aade047a230f5b579d8461c8586451
2022-02-01 20:47:05 -08:00
svcscm svcscm
67e59f902a Updating submodules
Summary:
GitHub commits:

933b39e99a
c9fa1f5baa
c2f17250e1
c51281207c
92fef8858e
d0ae49bfba
d12a1f9427

Reviewed By: jurajh-fb

fbshipit-source-id: 0a28b59fd1b0ab4f8a03ef0d8a36ebbd062db363
2022-02-01 20:32:09 -08:00
svcscm svcscm
769bf09e2b Updating submodules
Summary:
GitHub commits:

e86582beef
b005a78ccc
9a05087bc7
193369569b
38ffc94990
5ddf5827b9
05ee576f0d
f0b665ea6d
f8bfd0411a

Reviewed By: jurajh-fb

fbshipit-source-id: 121beef9389b8faccfcf088e2a423a32019c5f04
2022-02-01 19:54:59 -08:00
svcscm svcscm
0996ac3835 Updating submodules
Summary:
GitHub commits:

fea2cd768b
63cfa8ad25
238a5aa9c5
abb17c3362
92c43dc88b
464e8ef9b9
cadb1811f8
9ff03780bf
401bbfbf78
cb24e50c3d
a23221dd62
b0b292d07e

Reviewed By: jurajh-fb

fbshipit-source-id: 031f5fc7ed46e6b02da9ea7111bf967efd6bafa4
2022-02-01 19:33:52 -08:00
svcscm svcscm
c06ac51483 Updating submodules
Summary:
GitHub commits:

3fe0a8657f
d65ad021c8
7498c49bec
fa2f89f911
a89428646a
920386f2b7
ad2b32e9cd
8e0183e7d5
139ac2ff12
30eb9fe8ce
a65c390121
8ae721f2d7
5ac0a72374
48eeb54f06
49fe829358

Reviewed By: jurajh-fb

fbshipit-source-id: 2d4de1fe70ce77b57b1510dc443a5cbed473ef63
2022-02-01 18:15:47 -08:00
Chad Austin
25e0c222bd limit parallelism based on available RAM
Summary:
A long time ago, getdeps scheduled each build up to the number of hardware threads. For some builds, that was too heavy, so it got throttled back to only ever use half the hardware threads. This left parallelism on the table for CPU-bound projects that don't use much RAM per compilation.

This commit makes better use of the hardware with finer-grained logic that allows each manifest to specify a `job_weight_mib` estimate in MiB, and limit concurrency to `available_ram / job_weight`.

Reviewed By: ahornby

Differential Revision: D33754018

fbshipit-source-id: 785bed6c6cfe3c473244e0806a77cec1fc119e1f
2022-02-01 17:12:48 -08:00
Xavier Deguillard
8d63827a14 service: fix use after free in getAttributesFromFiles
Summary:
When write notifications are pending on Windows, waitForPendingNotification
would wait for some time. Unfortunately, this means that the mountPoint thrift
argument would get freed, and since the lambda only captured a piece of the
path, and not the path directly, the mount path would get used after the
underlying path has been freed. We need to copy the path to avoid this issue.

Reviewed By: MichaelCuevas

Differential Revision: D33927317

fbshipit-source-id: 790bcb26cb46cdac750826ebe13c56e0d1275c22
2022-02-01 17:03:04 -08:00
svcscm svcscm
e893ca112b Updating submodules
Summary:
GitHub commits:

8f30d50e1d
56ac24701c
f8d5a0e919
10b738561c
7cd5763274
997ceaf8be
82dc891aa5
793fcc3975
3233e302d7
9f220f6c26
bfb952ec2c

Reviewed By: jurajh-fb

fbshipit-source-id: 25cc8c9035aaf81cc8573f78283bec846f006bf9
2022-02-01 17:00:27 -08:00
Jun Wu
472a1148b1 git: support bundle and unbundle
Summary: Delegate to git's own bundle implementation for bundle and unbundle.

Reviewed By: DurhamG

Differential Revision: D33895676

fbshipit-source-id: 3d17160c6f83c2f43ff41bcf3f74c00aecded630
2022-02-01 16:14:02 -08:00