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
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
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
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
Summary: These connections are no longer used, so they and their setup code can all be removed.
Differential Revision: D44635160
fbshipit-source-id: 4407a9318086b61942523cf551988e394c6df2e1
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
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
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
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
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
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
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
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
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
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
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
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
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
Summary: This avoids revlog and its problematic code paths for all `pull` commands.
Reviewed By: sggutier
Differential Revision: D44805076
fbshipit-source-id: a4efacf111f03cda5752fe1b25d26a278c25f242
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
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
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
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
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
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
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
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