Commit Graph

81493 Commits

Author SHA1 Message Date
generatedunixname89002005307016
6579e0b911 Add annotations to eden/scm/edenscm/hooks.py
Reviewed By: zzl0

Differential Revision: D44814520

fbshipit-source-id: 4e04c45bdca7171d812c5616993932ea7d8237f2
2023-04-12 09:32:23 -07:00
generatedunixname89002005307016
c9c51e6fa4 Add annotations to eden/scm/edenscm/ext/extorder.py
Reviewed By: zzl0

Differential Revision: D44868907

fbshipit-source-id: 909402e3af08b48656550e937a10214ddaeaa031
2023-04-12 09:30:00 -07:00
Pierre Chevalier
512037a028 Migrate from clap 3 to clap 4
Summary:
See the list of breaking changes upstream:
https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#400---2022-09-28

Reviewed By: markbt

Differential Revision: D44704538

fbshipit-source-id: a651f3c37a5f0de852ac26332131c0d70d697811
2023-04-12 09:15:41 -07:00
Martin Conraux
9f5b978bf0 update comfy-table
Summary: Update comfy-table to 6.4.1

Reviewed By: zertosh

Differential Revision: D44744141

fbshipit-source-id: 3206b40a292a6b6ca03bcc7532bff21aa70046b6
2023-04-12 08:55:19 -07:00
Muir Manders
70b82edccc metrics: log the (first) mononoke host we talk to
Summary: Log the first mononoke host we connect to. Under normal circumstances all connections from a particular client should go to a host in the same datacenter, so this will allow us to look at performance trends taking into account cross datacenter factors.

Reviewed By: zzl0

Differential Revision: D44900086

fbshipit-source-id: c9bb38dac419a8faf468c6bb79a44af3c152c502
2023-04-12 08:47:07 -07:00
Open Source Bot
c67c8e174c Updating submodules
Summary:
GitHub commits:

d9b004dd91
49fd6e5f44
8be145fc53
da4b8a98f0

Reviewed By: jurajh-fb

fbshipit-source-id: 637399610235d848773a54698eaa989c9afe8e30
2023-04-12 08:41:38 -07:00
Liubov Dmitrieva
3d7819efab log duration for origin request
Summary:
log duration for the origin request

so that we will be able configure replay in a more flexible way

Reviewed By: clara-9

Differential Revision: D44910760

fbshipit-source-id: 8d716376702283e24bb4151eb0a68b8bc2e57e6f
2023-04-12 05:56:04 -07:00
Mark Juggurnauth-Thomas
064d46dfd1 mononoke_api: when diffing, filter out missing copy sources
Summary:
An invalid bonsai changeset or mutable rename could lead to a copy source that does not exist.

For Mercurial derived data, we already ignore this.  Do the same for general diffing.

Reviewed By: mitrandir77

Differential Revision: D44909673

fbshipit-source-id: ac754e0e483e75976afb07078e57bc1f33008a17
2023-04-12 05:28:09 -07:00
Open Source Bot
68015c1479 Updating submodules
Summary:
GitHub commits:

f72160da1f
9632bc11c5

Reviewed By: jurajh-fb

fbshipit-source-id: 6fa93b8e4154df9f3a93f40b5f6484ea1d3bfc28
2023-04-12 04:25:14 -07:00
Open Source Bot
44f7107d85 Updating submodules
Summary:
GitHub commits:

f09d0420ea
090c69c4bf

Reviewed By: jurajh-fb

fbshipit-source-id: ff714bec07aa394bbf7800a24f1ae80b5e8b4bb7
2023-04-12 02:21:50 -07:00
Mark Juggurnauth-Thomas
515b140897 repo_factory: construct sql more consistently
Summary:
In the repo factory, we do different things for sql connection creation in tests and prod.  In prod we cache `MetadataSqlFactory` instances for each metadata database configuration, and request a new connection from the cached factory each time.  In tests, this doesn't work, as requesting a new sqlite connection from the factory is the same as opening the file again, which can be slow for large numbers of connections, so instead we cache connections directly in the repo factory, which isn't really the right place.

We can fix this by making the `MetadataSqlFactory` handle the caching of sqlite connections for us.  This makes the repo factory consistent between prod and test.  It also means the `MetadataSqlFactory` can hold on to the original connection to the sqlite database and perform the creation queries directly, rather than having to hold it separately in the wrapper around `SqlConnections`, and we can deduplicate the code for opening the database, too.

Reviewed By: mitrandir77

Differential Revision: D44665118

fbshipit-source-id: 1c7d45ac1900d5f2b36285e01159924d0cdb09eb
2023-04-12 01:48:40 -07:00
Mark Juggurnauth-Thomas
8ea1da962c backsyncer: remove connections from TargetRepoDbs
Summary: These connections are no longer used, so they and their setup code can all be removed.

Differential Revision: D44635160

fbshipit-source-id: 4407a9318086b61942523cf551988e394c6df2e1
2023-04-12 01:48:40 -07:00
Mark Juggurnauth-Thomas
6224b73493 tests_utils: extract random repo generation from simulated repo benchmark
Summary: This is already used by a couple of other tests, so it makes sense to move it out of the benchmark.

Differential Revision: D44635161

fbshipit-source-id: 41414b66b380ea1d5635c6131df4fa3f3084fcfc
2023-04-12 01:48:40 -07:00
Open Source Bot
0863e127c2 Updating submodules
Summary:
GitHub commits:

f2de94f842
eba2356b2d

Reviewed By: jurajh-fb

fbshipit-source-id: be418a1b70ed2e9416e718c7af1fd9cced3762c4
2023-04-12 01:20:10 -07:00
Evan Krause
af5c128bce Add tests for different file path display types
Summary: Add test for previous stack of diffs, including showing a picker for how files should be displayed, and making sure the different display formats work correctly, notably the tree view is more complicated

Reviewed By: quark-zju

Differential Revision: D44807466

fbshipit-source-id: 2fb640c5c92edc1807de7a21d33ec03d186dd3c2
2023-04-11 22:57:12 -07:00
Evan Krause
f8df4a17a0 Add useDeepMemo
Summary:
In the previous diffs we added a function to build a tree structure for rendering files. This build process constructs a lot of temporary Maps, so it would be ideal to memoize it for performance. However, we need it to re-render if the list of paths changes in any way. This means regular react useMemo won't work, we need deep memoization.

One way to do this might be to use Recoil selectors more aggressively, so we memoize higher in the chain. But we call Uncommitted changes with different parameters in different places simultaneously, so it's a bit more convenient in our rendering to use useMemo instead.

Reviewed By: quark-zju

Differential Revision: D44775134

fbshipit-source-id: f4be2b01126d4bb21ad7758184914a0a16ed0d9c
2023-04-11 22:57:12 -07:00
Evan Krause
04c381c7f6 Use level in tree collapsed key
Summary:
Small potential bug from the last diff, if you had two folders with the same collapsed name at different places in the tree, they would get collapsed at the same time because we just used the folder name as the key to look them up.

For example:
```
isl/
  src/
     file1.txt
  file2.txt
isl-server/
  src/
    file3.txt
  file4.txt
```

Since file1 and file3 both live in folders that end up being labelled `src`, clicking either "src" would have collapsed both of them.

To prevent this we need to use a full accumulated path from the root, passed through the recursion.

Reviewed By: quark-zju

Differential Revision: D44775133

fbshipit-source-id: 571fa3c97be2f0cceb1087f0bee294019654b6ba
2023-04-11 22:57:12 -07:00
Evan Krause
3d1fe510a9 Add picker for changed files type
Summary:
Use the new `buildPathTree` and `changedFilesDisplayType` state to actually render changed files differently.

'short', 'fullPaths' and 'fish' are pretty easy, they're basically like before but we tweak the display slightly.

'tree' is of course the harder one. We use the newly built tree and recursively map that into components. We also need to handle collapsing paths.

Reviewed By: quark-zju

Differential Revision: D44774137

fbshipit-source-id: 77f93a87e537591223c34b2ee1c76be8e027aca9
2023-04-11 22:57:12 -07:00
Evan Krause
2f1761d008 Add component to change file path display type
Summary:
Add a component to let you change your current display method for files in the uncommitted changes file list.

This component is backed by an atom which itself is backed by an sl config. This means if you reload the page, it will remember what you changed the display type to last time.

I found one bug in the `persistAtomToConfigEffect` code while doing this, it was not distinguishing between different config IDs so they would trample each other.

Reviewed By: quark-zju

Differential Revision: D44774139

fbshipit-source-id: 0f77baef78189d34c9ea4b29589ffc61056d4d83
2023-04-11 22:57:12 -07:00
Evan Krause
54be9691cc Add util to extract tree structure from list of paths
Summary:
In the next diffs, I'll add an option to render uncommitted changes as a tree instead of as a linear list

To do this, we'll extract the tree structure from the list of file paths, so we can render as a tree in the DOM.

Here I add a very simple algorithm to construct a map of maps recursively to represent each layer in the tree, to hold an arbitrary data structure per file.

I believe we can assume `/` as the pathsep here, even on windows—though it's probably worth confirming that's what we get from `sl status` since I don't remember and haven't tested windows in a while.

Reviewed By: quark-zju

Differential Revision: D44774138

fbshipit-source-id: 20217d02904e89db0cc535d3b53c3315ccc0607f
2023-04-11 22:57:12 -07:00
Open Source Bot
41abc02163 Updating submodules
Summary:
GitHub commits:

1347a456c4

Reviewed By: jurajh-fb

fbshipit-source-id: 567568632e4112243d81293b623f43c7f144778d
2023-04-11 22:19:55 -07:00
Open Source Bot
a426eb851e Updating submodules
Summary:
GitHub commits:

4dc071dc2f
b141689f6a
bcddc0df86
647cd73674
939a99ed7c
ede4e2ba62
343e306921
92f41ce07f
85195642d5

Reviewed By: jurajh-fb

fbshipit-source-id: 383b361c3ed2326c62eda2e59b0e4275947e6e40
2023-04-11 19:24:13 -07:00
Mark Shroyer
afb10611d1 Add config to disable doctor checks
Summary:
This adds the configuration `doctor.ignored-problem-class-names` so that we can
make doctor ignore individual problem classes via config rollout.

This doesn't actually stop the checks from running, but it stops reporting (or
attempting fixes for) ignored problems. Ignored tests will still be logged in the
edenfs_events table's

Reviewed By: xavierd

Differential Revision: D44720584

fbshipit-source-id: 954d1131dfbbf6a3264abf55b5e0f01ab61836d0
2023-04-11 18:53:10 -07:00
Muir Manders
15d8a74ff2 rcutil: add warning for duplicate configs
Summary: Warn user about potentially confusing duplicate config entries when we are making automated edits to repo/user config file.

Reviewed By: quark-zju

Differential Revision: D44876243

fbshipit-source-id: 7d50df7f55e68f3655f6086156e803e52a2b4154
2023-04-11 17:51:25 -07:00
Muir Manders
b48f2144af rcutil: handle duplicate keys better
Summary: When there are duplicate config keys present, we now update the final (load bearing) one instead of the first one.

Reviewed By: quark-zju

Differential Revision: D44875407

fbshipit-source-id: fa546482cbbdb432fb7d02a716e4692022388dc5
2023-04-11 17:51:25 -07:00
Xavier Deguillard
39c4b2a309 prjfs: handle invalidation concurrently to stop
Summary:
We've seen cases where invalidation is happening concurrently to
`PrjfsChannel::stop`. In that case, `getInner` would return a `nullptr` and
thus crash EdenFS as the code doesn't handle `nullptr` gracefully.

The root cause of why `stop` is being called on a mount that is still being
used is not entirely clear at this point due to the complexity of the
mount/unmount code which chadaustin is currently looking into. While this diff
should be revisited once Chad has reworked mount/unmount, we can make the code
correct by simply handling the `nullptr` case to avoid crashing.

Reviewed By: chadaustin

Differential Revision: D44875003

fbshipit-source-id: 977c59af9fcf0ae2c66929f22489370c18b92f94
2023-04-11 17:28:23 -07:00
Muir Manders
9a47a90b52 debugnetwork: test mononoke connectivity via local auth_proxy
Summary: If auth_proxy.unix_socket_path is configured, use that when testing for Mononoke HTTP connectivity.

Reviewed By: johansglock

Differential Revision: D44883873

fbshipit-source-id: 1c30645072842391ad9aa6b2548ee87bd1449896
2023-04-11 17:24:32 -07:00
Open Source Bot
fc53de2d98 Updating submodules
Summary:
GitHub commits:

74aebe2db1
74a0aab3da
810e9335fe

Reviewed By: jurajh-fb

fbshipit-source-id: 94488cd8733197ef804003619dd847502567b6fb
2023-04-11 17:08:12 -07:00
generatedunixname89002005307016
394036b283 upgrade pyre version in fbcode/eden - batch 1
Differential Revision: D44881818

fbshipit-source-id: ae9f23f8032e877541745a0418bb40174cc78de8
2023-04-11 16:59:03 -07:00
Open Source Bot
40e307859c Updating submodules
Summary:
GitHub commits:

63b4e165b7
3da5f7ea5c
0816170dc4
3b8e7a579c

Reviewed By: jurajh-fb

fbshipit-source-id: b1be5a18d8ee6b5d020eb6333f885bcbcabb0f08
2023-04-11 16:21:22 -07:00
Jun Wu
56d9b52517 rebase: support more descriptive conflict labels
Summary:
Added a config option `experimental.rebase-long-labels`. Once set to true,
produce more descriptive conflict markers "dest (rebasing onto)" and
"source (being rebased)" on conflicts.

Eventually we probably want this to be the default everywhere. For now, not
all users are compatible with this change so it's not yet the default.

Reviewed By: muirdm

Differential Revision: D44847924

fbshipit-source-id: b832f362cc1dd80e25a3fd80e0f334bffc4b12d8
2023-04-11 15:49:08 -07:00
Jun Wu
b7b797a485 clone: migrate revlog to lazytext after clone
Summary: This avoids revlog and its problematic code paths for all `pull` commands.

Reviewed By: sggutier

Differential Revision: D44805076

fbshipit-source-id: a4efacf111f03cda5752fe1b25d26a278c25f242
2023-04-11 15:32:51 -07:00
Mark Juggurnauth-Thomas
5ca0d3803d walker: stop logging ODS stats per blob type
Reviewed By: mitrandir77

Differential Revision: D44752057

fbshipit-source-id: 28d22fd6ab74a82feb5d80da3d34445d6a06445b
2023-04-11 14:38:55 -07:00
Open Source Bot
16af8ce846 Updating submodules
Summary:
GitHub commits:

1552810792
b728f04b52
1e7a8907ab

Reviewed By: jurajh-fb

fbshipit-source-id: abcbd1710e313bf540eff965a3f371c7c5c8529a
2023-04-11 13:02:12 -07:00
Open Source Bot
49b921effc Updating submodules
Summary:
GitHub commits:

5182eae0e0
b7ffc6cc7d
36e47504d2
721f7e0e8c
60a6d4d3a6

Reviewed By: jurajh-fb

fbshipit-source-id: 6f823acaf7f113417f81140050b61a5bc2aa6213
2023-04-11 11:54:46 -07:00
Clara Rull
4a173f7127 Migrate commit validator to Clapv3
Summary: Migrate commit validator tool to Clapv3

Differential Revision: D44744111

fbshipit-source-id: ccd68c9d1e11b51121f55968ee5470f6d1ec477d
2023-04-11 11:23:51 -07:00
Open Source Bot
3603fb8b48 Updating submodules
Summary:
GitHub commits:

c6ebf83dd2
ebd2537ac7
b87e3b5dd5
7d24e54a9a
67fd5ce36f
b6c98eebad

Reviewed By: jurajh-fb

fbshipit-source-id: ada2c54bbf09c0e9f2ce2ddc4ab80eb8d8d21f37
2023-04-11 10:45:56 -07:00
Open Source Bot
e42b7db64a Updating submodules
Summary:
GitHub commits:

e615b505da
ce350ec79a
11117a0b78
a63a4da6e0
fedbd51d58
3596747595
bed3521a3b
279b28ace3
f4b15554ff

Reviewed By: jurajh-fb

fbshipit-source-id: dcd2ac91e2ba3b4c0a686fbc8bb181c492bd36fe
2023-04-11 09:40:47 -07:00
Open Source Bot
7a3cf36fb0 Updating submodules
Summary:
GitHub commits:

4881284e5c
c4053daa63
91482d43f8

Reviewed By: jurajh-fb

fbshipit-source-id: 10344b1ddf19a01cf64e321e0ec1f6599accc215
2023-04-11 08:38:36 -07:00
Rajiv Sharma
7ed783094a Add support for git-extra-headers
Summary: The previous diffs added support in SCS and remote-gitimport for including the `git-extra-headers` as part of the mirrored commits in Mononoke. This diff adds similar support for gitimport.

Differential Revision: D44869271

fbshipit-source-id: 5941b0c8729cd972188cc758837c6c1f1b0f72a1
2023-04-11 08:22:40 -07:00
Rajiv Sharma
d6437e07c8 Log the blobstore key while healing ContentMetadataV2
Summary: The current healing logs just mention that a CMv2 blob was healed, but there is no mention of the actual blobstore key that it healed. This diff updates that.

Reviewed By: mitrandir77

Differential Revision: D44164682

fbshipit-source-id: c156a930716499fb1b5c7b248ce11d6bf88f8281
2023-04-11 05:28:18 -07:00
Rajiv Sharma
0551fadccd Enable double writing of ContentMetadata
Summary: To maintain backwards compatibility for a while, we will be writing both the new `ContentMetadataV2` and the old `ContentMetadata` blobs. This will be behind a tunable which will be removed once we can verify that the code works as expected with `ContentMetadataV2`

Reviewed By: markbt

Differential Revision: D44221076

fbshipit-source-id: 95c01a96198a99e53ab3ea4f1b04b1ba78f4b298
2023-04-11 05:10:37 -07:00
Rajiv Sharma
e5b45f5bf2 ContentMetadataV2: Everything, Everywhere, All At Once
Summary: D44136799 was the backout diff for backing out all the ContentMetadataV2 changes made so far. This was due to the reason that the changes were landed before the backfilling was completed. This diff is the revert of the backout, to be landed when the backfilling is properly completed.

Reviewed By: YousefSalama

Differential Revision: D44195175

fbshipit-source-id: 2872c699cc7c41cf436a1c7123e01a5190db7ece
2023-04-11 05:10:37 -07:00
Open Source Bot
7a23c7e90b Updating submodules
Summary:
GitHub commits:

41934c63a8
1a88dde374

Reviewed By: jurajh-fb

fbshipit-source-id: d32ede0fd9f81f32313e00f4e62ff951ace8c4f8
2023-04-11 00:16:15 -07:00
Open Source Bot
3d9a0e23ce Updating submodules
Summary:
GitHub commits:

534b0f1853
7de47f4efa
6797649c5c
833443260e

Reviewed By: jurajh-fb

fbshipit-source-id: f4df6d3b4f5cffe7423f8320510cefa2ff274b11
2023-04-10 19:47:47 -07:00
Katie Mancini
5175eb8887 return value instead of error for non source control types
Summary:
Eden's readdir and getfileAttribute endpoint returns an error when an entry in
a directory has a type that is not: regular file, directory, or symlink.

This causes issues for Buck2 because it propagates this error to the user. For
Buck2 a directory having a file that isn't a regular file, directory, or
symlink isn't an error case, it's just a file Buck2 wants to skip over. Buck2
would like to be able to differentiate real errors getting the filetype (like
say a network error) and having a weird file in some directory.

From chatting with Thomas, Buck2 is unlikely to ever care what type the file
is (if its not a file, dir or symlink). So it's sufficient just let buck2
know it's some "other" type of file. I think it makes sense to just add a non
source control type here. I also considered adding dtype as an attribute, but
I don't think we need it, but we could add that too.

In some cases it can be dangerous to add values to thrift enumeration
(SourceControlType enum we change below)
(reference post: https://fb.workplace.com/groups/thriftusers/permalink/785884732120941/).

But in our case, rust + Buck2 handles new enum types gracefully
(and with exactly the behavior we want):
https://our.intern.facebook.com/intern/diffusion/FBS/browse/master/fbcode/buck2/app/buck2_common/src/io/eden.rs?lines=157

so adding a value to the enum is safe (for buck2).

hack is our other client. they are going to handle it less gracefully:
 https://www.internalfb.com/code/fbsource/[65673fd318750984372aeb5b44036a259a0d85d2]/fbcode/hphp/hack/src/facebook/hh_distc/package/package.rs?lines=441 but from what I can tell hack would also
 error if they tried to list a directory with a socket in it with out this
 change. Will confirm with them that this change is ok with them.

Reviewed By: chadaustin

Differential Revision: D44794698

fbshipit-source-id: 4e3ab7964fa2c0932b0363fb9ad62f24af74480c
2023-04-10 18:28:23 -07:00
Open Source Bot
8ec959b3f9 Updating submodules
Summary:
GitHub commits:

e378cfd7d2
f7a5525f74

Reviewed By: jurajh-fb

fbshipit-source-id: 99eb44c0d4ec7ff34b32b63b9aefe4d1b98d140b
2023-04-10 17:45:59 -07:00
Evan Krause
0ed82b40f7 Use no-referrer tag in HTML
Summary:
Because we have our server token in the URL query, we need to be careful not to leak the URL otuside of ISL. Requests to third party resources by default have a referer [sic] header which includes the search query.

By adding a meta `referrer` tag with `no-referrer`, we can disable these referer headers. Yes, the spelling difference is extremely weird.

See the spec: https://www.w3.org/TR/referrer-policy/#referrer-policy-delivery

Reviewed By: muirdm

Differential Revision: D44837405

fbshipit-source-id: eda375ef11b4075f5cc42feb5a7f3d292f1f0c9f
2023-04-10 17:36:39 -07:00
Evan Krause
4a699c8899 tests: Replace uses of egrep with grep -E for failing centos tests
Summary:
I saw builds/tests were failing for centos due to a warning "egrep: warning: egrep is obsolescent; using grep -E".

We can instead use grep -E as recommended.

Note: this isn't every single test, but somehow only these tests had failures in the Centos CI job.

Reviewed By: muirdm

Differential Revision: D44848131

fbshipit-source-id: ba182e8c866ac6bd649f820b76097e4677295105
2023-04-10 16:59:17 -07:00
Muir Manders
b8bb5dc518 pullcreatemarkers: configure post-pull hook in extension
Summary: Configure post pull "debugmarklanded" hook in the requisite extension to avoid trying to run the hook when the extension is disabled.

Reviewed By: zzl0

Differential Revision: D44646572

fbshipit-source-id: 1ac2dd97d35616683b87223a97ebbe7aecaa0a91
2023-04-10 16:25:13 -07:00