Commit Graph

73380 Commits

Author SHA1 Message Date
Rajiv Sharma
5489153987 Instrumenting snapshot update client command
Summary: Current console output includes only high level snapshot update/restore data. This diff adds instrumentation over the individual steps within the snapshot update/restore command.

Reviewed By: yancouto

Differential Revision: D35750512

fbshipit-source-id: 0d7dfb9550f5fb72ecaf08091e5a5501d652bfe4
2022-04-20 10:45:14 -07:00
Aida Getoeva
fd315fe28c mononoke/walker: switch old walker to the new one
Summary:
This diff replaces old cmdlib walker target with the new one. It also changes the TW config because scuba logging arg name now different.

I will stop the conveyor from the updates before I land these changes.

Reviewed By: markbt

Differential Revision: D35532342

fbshipit-source-id: e243d9ce11ea25061812b4021a575e8f57e828c4
2022-04-20 07:05:28 -07:00
svcscm svcscm
88a9e1c2e1 Updating submodules
Summary:
GitHub commits:

1cf9928412
94b8f6a9bc
2f2b70bb68
4020a15157
f673281fde
a9cd97dbbf

Reviewed By: yns88

fbshipit-source-id: 9a64be5b48206f1a832c992ab6c3d925100b4a42
2022-04-20 04:10:28 -07:00
svcscm svcscm
38418f0a33 Updating submodules
Summary:
GitHub commits:

a633e89de6
d929a6641d
86aa1fa713
9280f125e0
d0c995462c
3e1dab69f2
19c17b3240

Reviewed By: yns88

fbshipit-source-id: b2eef538312f7ba1465e742c7546474f97e76475
2022-04-20 03:04:26 -07:00
svcscm svcscm
c6a914c8ca Updating submodules
Summary:
GitHub commits:

dd0cfb2d3c
7f65300865
f641b78516
27fdd83a64
9b0af1d813
5eaa1f6fcc
0f98c82d48

Reviewed By: yns88

fbshipit-source-id: 46f8104973ddb73c182ea43dae4460d095592deb
2022-04-20 02:31:06 -07:00
svcscm svcscm
a9d8795a4a Updating submodules
Summary:
GitHub commits:

5963de6d4b
12c1838d37
f28150f57f
22103fe0b8
0eb2fadf65
1ac8947c2f
b77dbfcf7b
723a96b2cf
ce1cbc3b0a
aa4f21524d

Reviewed By: yns88

fbshipit-source-id: 86a458c2a3faa4f7fe2591e1711fb6164288e284
2022-04-20 01:54:52 -07:00
svcscm svcscm
5060616e0a Updating submodules
Summary:
GitHub commits:

0429f9e0ed
8978a7b7a9
910263263a
a4fc840651
e186050846
149065226f
49902ae057
d76e630931
07a916ff09
89d432f490
b25bc7b56e

Reviewed By: yns88

fbshipit-source-id: 569697fd8bc20ba1c0294e1db572746739275ccc
2022-04-20 01:22:40 -07:00
svcscm svcscm
bcd2c748f3 Updating submodules
Summary:
GitHub commits:

cd396f9aab
a193d6a3f8
7f68928655
77de3e8432
c0f03b2ad2
ca9b32f210

Reviewed By: yns88

fbshipit-source-id: 803665c9dea1ae583593e9bacbea60efa2c328d7
2022-04-20 00:59:05 -07:00
svcscm svcscm
5cfe0d57e7 Updating submodules
Summary:
GitHub commits:

d089963db7
1e9e506194
f6d679b168
6dbe320767
5847f85be4
d128e5005d
454faa01fc

Reviewed By: yns88

fbshipit-source-id: e94aba1d68d4b504abe02bebb4b6c17a711f8702
2022-04-20 00:26:39 -07:00
svcscm svcscm
e82554b1ec Updating submodules
Summary:
GitHub commits:

e0835ce226
d2b581b628
3ead795de2
43c629a953
a932cb3444
9c2d369584
6892d1cd99
2a2ce46d29
8d9d7b637a
b548f9fb9f

Reviewed By: yns88

fbshipit-source-id: 44d5dbb78d8a7e6548fa12609c9bd361df7a9ede
2022-04-19 23:53:13 -07:00
svcscm svcscm
d5cef546a3 Updating submodules
Summary:
GitHub commits:

c2959a837c
74450c49a6
4e91286b16
0e65c2b95c
38adbe2665
95516beaf5
1a36813c61
81492952bc
8ae1168a7e
6122df94e1
95ef2db758
40d85ff250

Reviewed By: yns88

fbshipit-source-id: 7034b136ed3e9730f7a2eb7631ddb43dabf4d906
2022-04-19 23:23:01 -07:00
svcscm svcscm
98961d7695 Updating submodules
Summary:
GitHub commits:

a56b1999d9
548d50dff3

Reviewed By: yns88

fbshipit-source-id: 27664197f27d0bdd24e0fa277ab7e5aa908d9b92
2022-04-19 22:55:31 -07:00
svcscm svcscm
f21135d301 Updating submodules
Summary:
GitHub commits:

b07b3f5973
f6d2680d34
ebcc62aaeb
70bc7bf04e
9be3f5873a
ab18e9958b
1a8abeafe3
d507c376ce

Reviewed By: yns88

fbshipit-source-id: 4e75bea776cfe5b9cb7e612a6fa0e63241d56e09
2022-04-19 20:56:31 -07:00
Katie Mancini
8f3f873874 fix invalidation on NFS
Summary:
TL;DR: File invalidation after checkout is broken on NFS macOS. This proposes a
fix.

Previously, to invalidate things on NFS we opened and closed all the parent
directories of any files/directories that changed during a checkout operation.

This worked on Linux because all open calls result in some request into the
EdenFS daemon (usually a getattr I think). The returned response from this
would show that the directory had update timestamps. So the open would see the
parent directories in their updated state. This would trigger the NFS client to
clear it's caches for that directory and their recursive children to preserve
CTO. CTO or close-to-open consistency guarantees that if on process observed a
file in state A and closed the file, then another process opened that same file
, it will see the file in state A or a later state.

macOS does not seem to do CTO.

It seems that most of the "read" filesystem calls can basically be served from
cache on NFS. Only writes seem to be guaranteed to make it into eden.

So instead of using a "read" filesystem call to trigger invalidation, we need to
use a write one.

I tried opening things in write mode, but the problem is that we need to
invalidate directories (to ensure the entry information is updated) and
directories can not be opened in write mode.

I tried writing 0 bytes to the files themselves that have changed, but this
empty write is short circuited somewhere in the kernel.

The only filesystem call that can be a noop, and seems to trigger a call into
eden is chmod. We are not really working off any guarantees any more, but
it seems to work on both Linux and macOS in my testing so far and is better
than our current broken state of invalidation.

So now to invalidate we chmod parent directories that have changed with their
current mode. Note that this could get extra tricky if we were mixing updating
directory permissions with invalidating them. We would need to ensure we chmod
with the most up to date mode bits. However, because we do not update
permissions anywhere that we also invalidate (checkout does not know how to
update directory permissions) things are a little simpler.

It's important that the chmod can not complete until it seems an updated view of
the parent directory. So we have to be careful about locking here. (Although
that hasn't really changed since we switched from open to chmod.)

One thing that does change is that since chmod is technically a write, it could
cause extra materialization that would be bad for checkout and status
performance. To prevent these problems I have updated setattr to not materialize
a directory when the attribute change is a noop which it should be in our
invalidation technique unless another client modified the directory in the
meantime in which case the directory should be modified anyways. This would
mean that we could end up wiping out clients changes to permissions in the
working copy during checkout. but this matches non eden checkout behavior. So I
think this is ok.

Reviewed By: xavierd

Differential Revision: D35435764

fbshipit-source-id: 196c4995b130b595f9582204237e726e5212993f
2022-04-19 20:32:54 -07:00
svcscm svcscm
93a0f16082 Updating submodules
Summary:
GitHub commits:

3392c372c1

Reviewed By: yns88

fbshipit-source-id: 9332a81a60a2c5d4ebffe2023f3e3c9695098c21
2022-04-19 20:16:39 -07:00
svcscm svcscm
19b47f4bf5 Updating submodules
Summary:
GitHub commits:

37336a28c9
c9aa99674b
fd5d822bca
4b6ecbc946
d4d11ac28c

Reviewed By: yns88

fbshipit-source-id: 817cd1aa59d1736af9671f07ac697aeb8a86a6fe
2022-04-19 18:13:09 -07:00
Muir Manders
8348d87f3f util: fix a couple test on Windows
Summary: Forgot to update these when I changed changed the signature.

Reviewed By: DurhamG

Differential Revision: D35748246

fbshipit-source-id: f1102b60a8dd3d4af8312d7c67a0895691774f6a
2022-04-19 17:55:27 -07:00
svcscm svcscm
ff39832531 Updating submodules
Summary:
GitHub commits:

2ccd212dcf
dd6d0666c2
bc5dd70bae
695531d3fc
70ed398d3e
7a10ead53d
379533ab99
444f381da8

Reviewed By: yns88

fbshipit-source-id: c4abe679189cbb165dfe75a65eb6259ec1ddb747
2022-04-19 17:42:44 -07:00
Xavier Deguillard
d50e81bca9 inodes: use new SNAPSHOT format
Summary:
In Mercurial terminology, a `hg reset` operation simply updates the working
copy parent but doesn't affect the state of the repository. A diff/checkout
operation however would compare the on-disk state of the repository with the
working copy parent. Thus EdenFS must respect this behavior.

On Linux and macOS, a reset operation merely updates some state in the
EdenMount, but since these platforms reads data from the inode hierarchy, the
reset operation doesn't affect future reads to the repository. These would
still read the data from the previously checked out revision.

On Windows however, ProjectedFS requires us to read data from the currently
checked out commit, and thus we bypass the inode hierarchy. The downside is
that a reset operation changes the RootId in the EdenMount which is used to
walk Mercurial's tree hierarchy. What this means is that a read operation
performed after a reset would read the content of the file as it is in the
reset revision. This is not the behavior that Mercurial expects.

To solve this, we need to keep track of both the last checked out revision to
be used in response to read callbacks and the last reset revision, to be used
in diff operations. To achieve this, we can use the newly introduced SNAPSHOT
file format.

Reviewed By: fanzeyi

Differential Revision: D35293079

fbshipit-source-id: 5cfae510db8bc759d51447e6c24f021c104b7353
2022-04-19 17:33:45 -07:00
svcscm svcscm
60440186b4 Updating submodules
Summary:
GitHub commits:

69fc5edffa
0403ff725d
e6aa3ef12f
ec41a0dfdb
1093bed2ab
682fc8ba6a
a168f7f878
18a0879e3c
9b5e0ccee0
222d620bd3
81ce475e1b
56e3b59775
7e8ee6e67b

Reviewed By: yns88

fbshipit-source-id: 47687ea0464e6bfc74df4a187442b342d9a34f5a
2022-04-19 17:18:20 -07:00
svcscm svcscm
89362177ad Updating submodules
Summary:
GitHub commits:

2b2d456602
ed4fa61d0d
e0ab40e455
03e05ad4ec
6d13538905
70ffa7d6fb
4c7c02ff29
7f91707971
0bdf0f6c18
b07188ecf7
d3fadccb79
8517ff4d6f

Reviewed By: yns88

fbshipit-source-id: 1d77f74b33cb7eec8630e62dd2bb1a40dd6b30a5
2022-04-19 16:46:31 -07:00
svcscm svcscm
38a2519349 Updating submodules
Summary:
GitHub commits:

2a06af8135
dc2f16f6a4
616edf56c0
277cb2480a
f147eac7d9
a0609a354a
177c459bce

Reviewed By: yns88

fbshipit-source-id: 895a5269a1fc86bbda8e042780668b2a218460fa
2022-04-19 16:12:52 -07:00
svcscm svcscm
398f7076fc Updating submodules
Summary:
GitHub commits:

6758321328
2a6e5050c3
22690013f4
8966e20453
b83dc906b0
6ac86aa832

Reviewed By: yns88

fbshipit-source-id: 20fd3909940255e207f3f87664f3011575ea7f78
2022-04-19 15:44:15 -07:00
svcscm svcscm
8d6700fac2 Updating submodules
Summary:
GitHub commits:

cb4b62beda

Reviewed By: yns88

fbshipit-source-id: bce323b7a444734c69ca7ac2de16f788d545544b
2022-04-19 15:10:00 -07:00
svcscm svcscm
263cf0b438 Updating submodules
Summary:
GitHub commits:

7e09803a69
da605d806e
06c8f15e84
43aedf0abf
68bd00543a

Reviewed By: yns88

fbshipit-source-id: c589906f7e4b23403390a9c4776a7ce5b2aa2e97
2022-04-19 14:37:10 -07:00
svcscm svcscm
d3f49cd948 Updating submodules
Summary:
GitHub commits:

874e016d5a
a1a7d0f7da

Reviewed By: yns88

fbshipit-source-id: 522adb22b3ca216aa4ba7b8c4a12cb36c90b19f9
2022-04-19 13:59:54 -07:00
svcscm svcscm
10fb572b33 Updating submodules
Summary:
GitHub commits:

cf9a9c58f5
05a1d72a7d
973c4aaadd
37fc4f8174
f8ece92d4a
e57883fe05
5f42058c24

Reviewed By: yns88

fbshipit-source-id: 1294a131a34889fda242c41bd067e5ae5f825924
2022-04-19 12:25:36 -07:00
Jun Wu
6c4ef4f32f testing: fix rm on macOS
Summary:
On macOS unlink(dir) results in a PermissionError instead of a
IsADirectoryError.

Reviewed By: DurhamG

Differential Revision: D35756194

fbshipit-source-id: bbdc828f112e600c1dcecedb5165dd3b7a8694b2
2022-04-19 12:16:08 -07:00
svcscm svcscm
ca78413629 Updating submodules
Summary:
GitHub commits:

2ae3e7c8e5
fd33928ab4
50ae3c2f93
e6afb38de2
3262c61827
28892d891a
054dbb769b

Reviewed By: yns88

fbshipit-source-id: daf3eeca796abbc3b6d008b126c1fc78855ec45c
2022-04-19 11:51:02 -07:00
Aida Getoeva
530581dd3f mononoke/walker: fix flaky integration test
Summary:
The test was flaky because the output sometimes is in different order. The test already had `sort` command for the walker output, however the strings that were sorted included much more than just the failed types:
```
  # The output has globbing, which consumes the beginning (after the "Validation failed: ") and the end of the string

  Validation failed: *hg_link_node_populated* (glob)

  # while the actual string looks like this:

  Validation failed: {"int":{"check_fail":1,"seq":1,"time":1650377693},"normal":{"build_revision":"","build_rule":"fbcode:eden/mo
nonoke/walker:new_walker","check_type":"bonsai_phase_is_public","node_key":"changeset.blake2.2b06a8547bfe6a3ac79392aef3fa7f3f45a82
f4e0beb95c4fa2b914c34b5b215","node_type":"PhaseMapping","repo":"repo","server_hostname":"testingnamespace","session":"kX8ip3P1uUxV
58Mt","src_node_key":"changeset.blake2.2b06a8547bfe6a3ac79392aef3fa7f3f45a82f4e0beb95c4fa2b914c34b5b215","src_node_type":"Changese
t","via_node_key":"hgchangeset.sha1.26805aba1e600a82e93661149f2313866a221a7b","via_node_type":"HgChangeset","walk_type":"validate"
}}
```

So when the numbers changed in between the test runs the order of the results changed too.
Now let's sort the output properly: only the failed types.

Reviewed By: yancouto

Differential Revision: D35747592

fbshipit-source-id: eddca83bc9f1ecc202f87f0079ce2e65abd0c479
2022-04-19 10:59:52 -07:00
Zeyi (Rice) Fan
7990f2f8bb cli_rs: improve eden status reporting
Summary:
The current UX of `eden status` isn't good. It leaks too much internal details and generates confusing error message for the user.

This diff fixes the error reporting by moving the exact detail into trace logging while the actual error is more user-friendly.

This should reduce the confusions.

Reviewed By: chadaustin

Differential Revision: D35663792

fbshipit-source-id: 0b76f9ff9ee4542cce7349ccfa6724f096e1305f
2022-04-19 10:55:12 -07:00
svcscm svcscm
c9304170d2 Updating submodules
Summary:
GitHub commits:

583a0898c0
80c0268c9a

Reviewed By: yns88

fbshipit-source-id: d977507ed5435d5a89cbff78d1533cb2d3d5a2d3
2022-04-19 10:48:28 -07:00
Jeremy Braun
93f731cf79 Limit watchman+eden's fetching of inodes on common hg updates
Summary: Eden's `getEntryInformation` API currently loads Inodes for all paths queried, force-materializing the path component's Inodes. This often isn't required, and eden could be fetching non-loaded data from the object store instead.

Reviewed By: chadaustin

Differential Revision: D35372760

fbshipit-source-id: e31a450a20b09249f03339dcd1aeca2eb363046e
2022-04-19 09:33:32 -07:00
Jeremy Braun
ab3918ad4a Add EdenMount::getInodeOrTreeOrTreeEntry, use it in thrift calls for SHA1 and BlobMetadata
Summary: There's no need to materialized iNodes to request the content Sha1 and/or BlobMetadata, as that can be fetched from the objectStore.

Reviewed By: chadaustin, xavierd

Differential Revision: D35467564

fbshipit-source-id: 2848f4d21725a9f5d40251fde2e0eb29ea81302e
2022-04-19 09:33:32 -07:00
Muir Manders
679a25d42b pyerror: don't strip off anyhow context
Summary: Instead of stripping anyhow context off all errors, only strip within the concrete error handler "specific_error_handler". This way, the fallback error handler (that produces the beloved RustError) gets the top level error with all the anyhow context.

Reviewed By: DurhamG

Differential Revision: D35602091

fbshipit-source-id: 547ae7e1a2352af74817f90ab08cadb0fce65efc
2022-04-19 07:00:24 -07:00
svcscm svcscm
cf533f67b6 Updating submodules
Summary:
GitHub commits:

99e3208711
9dda846765
1418c7dc18
363edcd322
3ff5d8d368

Reviewed By: yns88

fbshipit-source-id: bbfdf40466097c98a42d941a85f561ac7e8233ec
2022-04-19 02:03:59 -07:00
svcscm svcscm
a3f4d47643 Updating submodules
Summary:
GitHub commits:

947887eecd
af5d5f8f39

Reviewed By: yns88

fbshipit-source-id: da3986bef636dafde8ffe7905de29664ffc65dc0
2022-04-19 01:32:49 -07:00
svcscm svcscm
07c2771883 Updating submodules
Summary:
GitHub commits:

01c9eafcdd
747c41c30d

Reviewed By: yns88

fbshipit-source-id: 9da53cca16a92d4eddeeac778926b02d5d4723f8
2022-04-19 01:01:49 -07:00
Stiopa Koltsov
369873ff18 Regenerate
Summary:
Following diff D35738033 adds another crate and reindeer generates unrelated changes.

Run

```
fbcode/common/rust/tools/reindeer/vendor
```

without any changes.

Reviewed By: dtolnay

Differential Revision: D35738034

fbshipit-source-id: 0539b8abbd694479dbe89939cb8c5ddc6272bd71
2022-04-19 00:29:05 -07:00
svcscm svcscm
1f6af995f9 Updating submodules
Summary:
GitHub commits:

3f7a7dcbb7
afce4f2b0c
70048d0356
690f1edf37
c7cb849bb3
a770dfb9ea
e8d19d8ed9

Reviewed By: yns88

fbshipit-source-id: b0c8d19aeaf97095a091ea96187d4a3f86656b59
2022-04-19 00:26:32 -07:00
svcscm svcscm
91d839abae Updating submodules
Summary:
GitHub commits:

601529baf9
4a3d6a310a
25c3e0859b
923de4a387
18bce97cb0
1b26212329
ba0e04bc9a

Reviewed By: yns88

fbshipit-source-id: feb49e3aead1db33e34e3d04205bccc58bb61037
2022-04-18 23:53:09 -07:00
svcscm svcscm
f154124b1f Updating submodules
Summary:
GitHub commits:

28711580a4
11c0b229ec
d626b3efea
8c751d8cea
bd478b13ae
2e64adbee0
32813bf105
17359629bc
53a5d01ff4
52fedd687f

Reviewed By: yns88

fbshipit-source-id: 56f5ccbe4613fadd510a27b3b15614ea1e9786a1
2022-04-18 23:22:41 -07:00
svcscm svcscm
1d9cbee319 Updating submodules
Summary:
GitHub commits:

683a21702b
24035099b8
1de9b6209e
02f84bac21
e5d475badd
fa096d3c23
37902dd7c2
f8dc232aa0
997feae017
ac2fd10e1e
ee941d5d2c
c62bd762f4

Reviewed By: yns88

fbshipit-source-id: d9de6dbb8cdd508ce0d2b99f3ddeabce868476b2
2022-04-18 22:57:10 -07:00
svcscm svcscm
494ef1a09e Updating submodules
Summary:
GitHub commits:

bc3f7af95e
3ca50e348f

Reviewed By: yns88

fbshipit-source-id: 009f3003d7e54da4b8c481c3f57c51577e4aedbd
2022-04-18 22:27:22 -07:00
Katie Mancini
ad04eb9bc1 add unit test for access
Summary: This code has enough risk of a copy paste error that it deserves a unit test.

Reviewed By: chadaustin

Differential Revision: D35161787

fbshipit-source-id: 5691d13a74a0f059dfd6a93ea2852dca8399a165
2022-04-18 21:55:15 -07:00
svcscm svcscm
fb599a7751 Updating submodules
Summary:
GitHub commits:

fe4501c6be
2b7befdf55
457f5a7772
48c0b10a26
775b777b7c
0ba6819687

Reviewed By: yns88

fbshipit-source-id: 746fa519440d73130aef58105266d97d7e450320
2022-04-18 20:23:55 -07:00
svcscm svcscm
1b33c4e0fb Updating submodules
Summary:
GitHub commits:

f701cc4e21

Reviewed By: yns88

fbshipit-source-id: 3f8be412b96d5c194c3646b7e18d10cc9213b057
2022-04-18 19:55:28 -07:00
CodemodService Bot
712c09c627 Daily common/rust/cargo_from_buck/bin/autocargo
Reviewed By: zertosh

Differential Revision: D35670295

fbshipit-source-id: f03ed9d4247923ee4dad6605b261a3ef69b35f67
2022-04-18 19:06:16 -07:00
svcscm svcscm
8c2cb45ff7 Updating submodules
Summary:
GitHub commits:

10b7c07097
c5e55e9958
ec408d53d4
a30c97529c
9ba6076997
e5c76c9114

Reviewed By: yns88

fbshipit-source-id: 19f4c19019712f107b7279f3fb08af8c0abb8915
2022-04-18 18:57:14 -07:00
svcscm svcscm
11b165f1bd Updating submodules
Summary:
GitHub commits:

b9f1e9783c
5ae6de7b75
8b27bfa7b4
915a3537c9
35f15e6177
bcac4aff56

Reviewed By: yns88

fbshipit-source-id: 115af918344eade168b6d1f6e5028941e2a3b22d
2022-04-18 18:25:26 -07:00