Commit Graph

81417 Commits

Author SHA1 Message Date
Zhaolong Zhu
10b0369f9c dag: update doc of DagAlgorithm::sort
Summary: Makes it explicitly mention that `sort` method sorts the set in topo descending order, this is different than the `sort` function in revset, which sort the set in ascending order by default.

Reviewed By: quark-zju

Differential Revision: D44728173

fbshipit-source-id: aa95993b237ebacc587147da9caccdf43ff48b80
2023-04-07 05:24:14 -07:00
Zhaolong Zhu
a73dc83fe8 copytrace: add unit test infra and simple test
Summary: Add test utilities for testing copy trace logic, also added a simple test case as an example.

Reviewed By: quark-zju

Differential Revision: D44559585

fbshipit-source-id: b03796fa3869d94edc528d570d511b1d84b15861
2023-04-07 05:24:14 -07:00
Zhaolong Zhu
cdfebae59a dag: add vertex_fn parameter to ImportAscii trait
Summary:
add vertex_fn parameter to ImportAscii trait, so that we can control
how to generate Vertex from a string: for example HgId expects 20-bytes vertex.

Reviewed By: quark-zju

Differential Revision: D44739947

fbshipit-source-id: c82c95ce4d6c45562c32ad4ccc3e5b40fd517770
2023-04-07 05:24:14 -07:00
Evan Krause
faea0c6871 Add "see more" container
Summary:
Commit messages may be very long in the sidebar. This pushes useful info like files changed to an unreasonably far scrolling distance.

Instead, we can show the first bit of each field, and truncate it if it's too long. Then we add a "see more" button which uncollapses the rest of the field.

This requires us to measure the rendered height of the content we're hiding, and determining if we should show the "see more" button or not. It's always slightly annoying to have to deal with measuring DOM heights, here we have to do one extra trick to our useLayoutEffect to ensure we rerender often enough. Otherwise the UI may be too long and get truncated without rendering the "see more" button, which is confusing.

Reviewed By: zzl0

Differential Revision: D44734415

fbshipit-source-id: 06d821ae68fc7d04e00ab4071adf7da2b916beb2
2023-04-06 20:44:04 -07:00
Evan Krause
4db3cc2c8f Consolidate "name" and "key" in commit message field config
Summary:
Now that we're moving towards dynamic commit message field configs, we should make it easier to define. The "key" value we had here was purely for convenience in typescript, so we could use things like `commitMessageFields.testPlan`. However, since this is dynamic, we can't really do this anyway, so it makes more sense to just unify everything to use the same label value.

So, if we parse a commit message like:
```
  my commit
  Summary: my summary!
  Test Plan: my test plan!
```
Then we would extract this into an object like:
```
{
  "Title": "my commit",
  "Summary": "my summary!",
  "Test Plan": "my test plan!",
}
```

This makes the field config simpler to define.

We may need to add a new field back into this config, which allows for display-only names, which may be useful internally (e.g. we could show "Diff" instead of "Differential Revision").

Reviewed By: muirdm

Differential Revision: D44689896

fbshipit-source-id: c95afd83e06f444cd735302524b589f3cba6a305
2023-04-06 20:44:04 -07:00
Evan Krause
f3be70eb2f Make commitMessageFieldsSchema into a recoil atom
Summary:
The field config schema defines which fields we expect in commit messages in this repo, and how the user should interact with them.
Previously, we had the field config schema defined as a global constant, overwritten for internal builds.

instead, we want this to be a fully dynamic value, which could be set by an sl config. This allows repos to configure their own commit message field formats, in case you want to always have a summary/test plan/fixes PR #xyz, etc.

Making this get set in recoil means we can dynamically update this schema and use it for rendering.

Reviewed By: muirdm

Differential Revision: D44688584

fbshipit-source-id: 286b52990266848fce752d980a2849b7fffc60e4
2023-04-06 20:44:04 -07:00
Evan Krause
1bf7a8c007 Make parseCommitMessageFields use dynamic config
Summary:
like the previous diff, but for parsing from string into commitMessageFields instead of converting into a string.

This uses the logic we use internally (adapted slightly for generality). Again, this is overkill for OSS, where we just take the entire description. Eventually, this will be possibly useful in OSS where you might set this via config.

Reviewed By: muirdm

Differential Revision: D44688587

fbshipit-source-id: 4b4f178283732bf94c137f7ed58c7d8bfaaf027a
2023-04-06 20:44:04 -07:00
Evan Krause
74a2650cd4 Make commitMessageFieldsToString use dynamic config
Summary: Continue refactoring as in previous diff, now for conversion from commitMessageFields back into a string. This is much more complicated than necessary for OSS right now, because OSS only uses the title and entire description. But soon we'll support arbitrary fields for OSS too, so they'll need this as well.

Reviewed By: muirdm

Differential Revision: D44688586

fbshipit-source-id: e33b4d10e972d556cdc531504b4d66ee36c471c9
2023-04-06 20:44:04 -07:00
Evan Krause
796f47e250 Make fields being edited use dynamic config
Summary: Continue refactoring as in previous diff, now for the various fieldsBeingEdited utils.

Reviewed By: muirdm

Differential Revision: D44688582

fbshipit-source-id: 9f870cfb57d3460f2d469ef929fb077d5ff8deff
2023-04-06 20:44:04 -07:00
Evan Krause
22f6440096 Make emptyCommitMessageFields not part of utils
Summary:
Context:
Start a set of incremental refactors which will make the CommitMessageFieldsUtils type only contain the field schema, and no other utils. From there, we'll make that field config a recoil atom so it can be determiend completely dynamically by the server / sl config.

This is part 1, where we make `emptyCommitMessageFields` not part of the utils object, and instead just a util function which takes in the config.

Reviewed By: muirdm

Differential Revision: D44688585

fbshipit-source-id: d9ed56fa0975514452ff547bdea58aaaed120653
2023-04-06 20:44:04 -07:00
Evan Krause
9c084d2993 Make commit message field types not-generic
Summary:
Previous diffs made the types for commit message fields be generic and statically typed, differing between internal and external. We're instead going to go for a completely dynamic field config determined by sl config. This means we should make these types not statically known at all. This diff is the first step in doing this.

Next, we can remove the internal only implementations of utils and make the field config be returned by the server.

Reviewed By: muirdm

Differential Revision: D44688588

fbshipit-source-id: e63d6343596e48a0563975763c438e45d615f5b4
2023-04-06 20:44:04 -07:00
Evan Krause
abee61d2ee Fix all commit info view tests
Summary:
After splitting the commit info view into fields, it broke a lot of tests. We need to go fix some of our test utils and some tests themselves.

These tests were extremely useful, I caught at least 5 bugs I hadn't noticed thanks to them, noticeably around edge cases like focus and optimistic state.

Reviewed By: muirdm

Differential Revision: D44648335

fbshipit-source-id: f4e222480f7fba12a55b2f7f6287f3114be73b03
2023-04-06 20:44:04 -07:00
Evan Krause
de65fc0409 Fix autofocusing the topmost field
Summary:
After the last diff added fields to the commit info view, there were many bugs remaining, most of which I found while fixing unit tests.

One such bug was that we lost our autofocus behavior which was both now missing and would have been incorrect even if it was kept.

The old behavior focused the description if the title wasn't being edited, and focused the title otherwise.

Instead, we need to go through fields one-by-one down in order until we find one that's being edited. Only that field should be focused.

Reviewed By: muirdm

Differential Revision: D44648086

fbshipit-source-id: 1117cff205f2ab65cdc3a8e9157a8a8f929ca484
2023-04-06 20:44:04 -07:00
Evan Krause
8cd3d6d501 Add fields to commit message
Summary:
Change commit info view to render individual fields rather than just one big text box.
Well, at least internally there are differnet fields. In OSS, we don't know what format to use so its still just one big text box.

The idea is that we have a config that defines what fields there are, and what kind. Some are expandable text areas for lots of text, others are one-line fields which will need tokenization and autocomplete etc.

With the fields config, we can render a generic `<CommitInfoViewField>` for each which handles all cases.

Most of the heavy lifting is done by the CommitMessageFieldsUtils (which differs between internal and OSS).

The bulk of this diff is migrating things that previously hardcoded `'title'` and `'description'` fields to now use arbitrary fields.

Note that the design is not final in this diff. This is just rough draft to get something resembling fields. We'll probably do some work to better handle fields with lots of content and better information density for other fields, etc.

{F929608384}

Reviewed By: muirdm

Differential Revision: D44598445

fbshipit-source-id: 195dcc81d7cd6779fd47aa140e6d0c0e94493c48
2023-04-06 20:44:04 -07:00
Evan Krause
1b3292a46a Commit message fields types
Summary: In preparation for adding fields to the commit info view, define how internally/externally we define and parse commit message fields.

Reviewed By: muirdm

Differential Revision: D44597627

fbshipit-source-id: f20b6936bff2ea782a3ebb25e1437c61cbad68db
2023-04-06 20:44:04 -07:00
Open Source Bot
0c13dd3d3c Updating submodules
Summary:
GitHub commits:

db57854d8c
de2ba993b6

Reviewed By: jailby

fbshipit-source-id: d8c4ccdd577cda5bfbf03d018136b6c9147d39fb
2023-04-06 20:18:55 -07:00
Open Source Bot
248f704a4a Updating submodules
Summary:
GitHub commits:

08e911b0e0
466112fded
318a54a96d
28d976ab4f

Reviewed By: jailby

fbshipit-source-id: 87bb35ab2e4298dfc812330a1aef97d6ee775b25
2023-04-06 19:23:10 -07:00
Mark Shroyer
b260939c66 Move ProjFS enumerator into getEnumerationData callback
Summary:
Even though we only need the Enumeration in the future's callback, if we don't
move the Enumerator it can get dereferenced while we're awaiting the future
returned by prepareEnumeration().

Reviewed By: xavierd

Differential Revision: D44770398

fbshipit-source-id: a9fc91c0766b4a9f43f566887d714cbde66b1cf3
2023-04-06 19:09:05 -07:00
Xavier Deguillard
7afc5962ef utils: rewrite getMaterializedFileSize
Summary:
This allows errors to be caught and raised as well as getting file sizes bigger
than off_t which is 32-bits on Windows.

Reviewed By: chadaustin

Differential Revision: D44737139

fbshipit-source-id: 16b00c7f436da361b41ffbe8074958519e9bfc81
2023-04-06 18:29:04 -07:00
Xavier Deguillard
2ddf81496b inodes: store a MaterializedState in FileInodeState
Summary:
When the FileInode is materialized, the NonMaterializedState is entirely unused
but still consume memory. On Windows, we've seen cases where the working copy
contains 100k modified files leading to diff taking a really long time due to
EdenFS spending most of its time computing the sha1 of materialized files,
since these are not cached, this computation would be done repeatadly.

For now, this merely creates the scaffolding to enable this caching, future
diffs will move the sha1 and sizes currently stored in the Linux/macOS
OverlayFileAccess in the MaterializedState and care will be taken to invalidate
these on materialization/writes.

For now I've gone with a `union` approach as the existing `Tag` is sufficient
to know which branch of the `union` should be looked at. This is however
potentially error prone, reviewers' opinion on whether I should revamp this and
switch to a `std::variant` would be very welcome.

Reviewed By: chadaustin

Differential Revision: D44652779

fbshipit-source-id: e769f4cc0cd7e8eea0c4cde863cd37f4ceadb01f
2023-04-06 18:29:04 -07:00
Muir Manders
74e9bd7ed9 tests: fix test-eager-exchange.t
Summary:
Tweak revlog commit import to maintain a stable order (this broke after recent change to top sort the commits).

Unfortunately the new stable order is inconsistent w/ fullsegments output in test-eager-exchange.t, so separate the tests.

Reviewed By: quark-zju

Differential Revision: D44768930

fbshipit-source-id: 6757450d7d446373d1b8c943d6cbcc6029b07443
2023-04-06 17:45:16 -07:00
Jun Wu
559c6bef26 parents: use pathhistory to implement 'parents FILE'
Summary:
This works better with Git. The old filenode-based logic does not seem correct
since it might not trigger adjustlinkrev.

Reviewed By: zzl0

Differential Revision: D44751613

fbshipit-source-id: e5a2367e544f1d55c6a2c149fd33db13af623e46
2023-04-06 17:28:52 -07:00
Open Source Bot
67ff928adf Updating submodules
Summary:
GitHub commits:

5d96696f80
0578d9f951
06ecd91736
293214ecb2
34a4b9d24e
75bdfb6f48

Reviewed By: jailby

fbshipit-source-id: 47f2a76377717f0bccbc6905fd01e53a088db7ef
2023-04-06 17:08:39 -07:00
Jun Wu
af8ac9b65b debugshell: make globals() match locals() in interactive shell
Summary: This fixes issues like https://github.com/ipython/ipython/issues/62.

Reviewed By: zzl0

Differential Revision: D44759311

fbshipit-source-id: 5ce94040cef09ac67962c147e86711971c545f91
2023-04-06 17:04:18 -07:00
Open Source Bot
6076c346f7 Updating submodules
Summary:
GitHub commits:

4a128bfe47
e5f0312c75
069c83f282
1b59f11790
585d3e1918

Reviewed By: jailby

fbshipit-source-id: 9a27111b1a35895d0b0f629d0ac5e46df70f9111
2023-04-06 16:11:44 -07:00
Xavier Deguillard
02cd4ece0d store: split import queues per Blob/Tree/BlobMetadata
Summary:
There is a collision between Blob and BlobMetadata ObjectId causing crashes in
EdenFS. To avoid these collision, let's just split the request tracker. Kudos
to chadaustin for finding the root cause of the crashes.

Reviewed By: chadaustin

Differential Revision: D44728974

fbshipit-source-id: 52bbc3f5317342ed975507f0a431bf4d3f712d8b
2023-04-06 15:59:56 -07:00
Liubov Dmitrieva
911a35fc62 return usage of commit graph for revlog clones
Summary:
return usage of commit graph for revlog clones

Disabling is no longer needed after D44734552

Reviewed By: quark-zju

Differential Revision: D44760863

fbshipit-source-id: 0ba65f63bf8c980fc0ab9b0dce1ec895f6b5f10d
2023-04-06 14:52:57 -07:00
Open Source Bot
3eccb47b17 Updating submodules
Summary:
GitHub commits:

cf80bd71af
c4db0eb646
6df3bc66a9
f552a1a21f

Reviewed By: jailby

fbshipit-source-id: ab543c60fbf1a0119e4a3875c92410c08c25cf35
2023-04-06 14:16:47 -07:00
Open Source Bot
277e03eec7 Updating submodules
Summary:
GitHub commits:

3033c0eb21
ad4ad70a94
656c11e672
96205567bb

Reviewed By: jailby

fbshipit-source-id: 47fd207ebd028232f4c0212042b57a3be1f543fb
2023-04-06 13:17:50 -07:00
Katie Mancini
aad9cd3dd1 allow mounting nfs mount
Summary:
I'm getting nfs to run on windows to prototype it and see how feasible it
might be as an option on Windows. PrjFS has a very different model than EdenFS,
and that has made EdenFS correctness on Windows very difficult. NFS may be
easier to get correct, though the performance is suspect. Just exploring
options here.

After this change theoretically we should be able to mount an NFS repo.
This isn't totally true, because I cannot get the Windows NFS client to point
at a specific port, so some port mapper changes are probably going to be needed
before that really works.

NOTE: this one is more than removing ifdefs, please review carefully

Reviewed By: xavierd

Differential Revision: D44155041

fbshipit-source-id: ae424a01dc2073138070253d80e3d101863840fd
2023-04-06 13:00:32 -07:00
Katie Mancini
bca274d519 make NFS Server run on windows
Summary:
I'm getting nfs to run on windows to prototype it and see how feasible it
might be as an option on Windows. PrjFS has a very different model than EdenFS,
and that has made EdenFS correctness on Windows very difficult. NFS may be
easier to get correct, though the performance is suspect. Just exploring
options here.

After this change the NFS Server opens a socket to accept incoming connections!

Reviewed By: xavierd

Differential Revision: D44154505

fbshipit-source-id: 10c679cb390c2bab99591656d6fe96ccdf4443fe
2023-04-06 13:00:32 -07:00
Katie Mancini
04c2b8b54c get NfsDispatcherImpl building on Windows
Summary:
I'm getting nfs to build on windows to prototype it and see how feasible it
might be as an option on Windows. PrjFS has a very different model than EdenFS,
and that has made EdenFS correctness on Windows very difficult. NFS may be
easier to get correct, though the performance is suspect. Just exploring
options here.

After this change NFS builds on Windows!

NOTE: this one is more than removing ifdefs, probably the most non trivial in the stack, please review carefully

Reviewed By: xavierd

Differential Revision: D44153443

fbshipit-source-id: b07e19f8bde1aa455eec97647ea450849133041f
2023-04-06 13:00:32 -07:00
Evan Krause
30004e3b68 VS Code extension 0.1.12
Summary: Version bump and chagnelog entry for new OSS vscode extension release

Reviewed By: zzl0

Differential Revision: D44726134

fbshipit-source-id: aed6bf966367ed01204099c7bdf297034f622887
2023-04-06 12:17:39 -07:00
Open Source Bot
64b41ccdf1 Updating submodules
Summary:
GitHub commits:

ff5676e823
ebfecdf78d
e1e7e9db4b
4a90b982f6
49787d7921
b3c43a5b99
6c65baf53c
0062dbd82c
aa4744ad1d
a432e35a00
75c9683e14

Reviewed By: jailby

fbshipit-source-id: 4931f9499806446ef633f71c4a3d81da5e53cdb5
2023-04-06 12:10:35 -07:00
Open Source Bot
1443c5bfdb Updating submodules
Summary:
GitHub commits:

338f9f61a7
22468024cd

Reviewed By: jailby

fbshipit-source-id: 1f15f67c8de824ef20201bf21c00e7be2bbd3cad
2023-04-06 10:41:05 -07:00
Youssef Ibrahim
f2ae8faeb7 tunables: add special keys :override: and :default: to by-repo tunables
Summary: Sometimes it's desirable to set the value for a by-repo tunable for all repos (e.g. to roll out a change everywhere after testing on some of the largest repos, or to quickly roll back) or to specify a default value, and right now the only two ways of doing this is either to specify the value for every single repo separately, or to have another non-by-repo tuanble that overrides it. Instead let's have two special keys: ":override:" and ":default:", so whenever we try to lookup a by-repo tunable we first check if it's set for ":override:" and use its value if so, otherwise we lookup the repo specific value, otherwise we lookup the value for ":default:".

Reviewed By: markbt, RajivTS

Differential Revision: D44750394

fbshipit-source-id: d8fe074ec700f69e52129dfa7de87b7972d11012
2023-04-06 10:36:48 -07:00
Katie Mancini
df836e85cd remove accidental network fetch
Summary:
This continues my slashing of fetch retries. This diff is -1 fetch retry.

DatapackStore::getTree is not a local only tree access. It may fallback to
fetching from edenAPI.

DatapackStore::getTree is used in the hg importer fallback code path for when
normal edenAPI rust binding fetching fails. It's unnessecary to be doing this
extra network fetch here, because we only want one edenAPI attempt and then to
fall back to the importer.

If I had to guess why this is here:
IIRC this method use to be a local only access to the hgcache. That seems to
line up with the logging comments around this fetch. So I think when the
datapack store gained remote fetching capabilities this one just wasn't changed.

With this change we are now down to what looks like 5 network fetch attempts.

Reviewed By: xavierd

Differential Revision: D44523824

fbshipit-source-id: f5e784660b396ad3a8f1e7effcd7551c3b126521
2023-04-06 10:09:53 -07:00
Evan Krause
20a8a855fa Add env var flag for showing full test output
Summary:
We use React Testing Library for testing our UI states, which is mostly awesome. Sometimes it's annoying if a lot of tests fail, because it spews out the entire DOM that doesn't match a particular selector. If more than 1-2 tests fail, then the test output is truncated and you can't see which tests in particular failed.

There's a way to configure the error messages, which lets you remove this extra context. Here I set this config when an env var is set, so that you can run `HIDE_RTL_DOM_ERRORS=1 yarn test` and get more readable output

Reviewed By: zzl0

Differential Revision: D44725386

fbshipit-source-id: 6f62739f9bfa7417361cc00aa421010e715062bf
2023-04-06 10:09:50 -07:00
Evan Krause
1c6fea0eaf Add timeout to reduce flakey test
Summary: I noticed our CI job that runs `verify-addons-folder` was somewhat flakey, always on the comparison view test. It was timing out when waiting for the comparison view to load and send a diff fetch request to the server. I think this is because of dynamic importing of the comparison view javascript, which seemingly takes time on the CI machines. So just bumping the timeout on this `waitFor` assertion to reduce flakiness.

Reviewed By: zzl0

Differential Revision: D44727954

fbshipit-source-id: de09a8f1e8a186d42a32b903bfa1dab0b1921241
2023-04-06 09:48:59 -07:00
Open Source Bot
5d260bd2bb Updating submodules
Summary:
GitHub commits:

7a2710b9ec
3b685c25e7

Reviewed By: yns88

fbshipit-source-id: 1dc8270c71f93df49a11ce857d2c7d12ccfc7fee
2023-04-06 08:42:14 -07:00
generatedunixname89002005307016
7870b8259b Add annotations to eden/scm/edenscm/ext/checkserverbookmark.py
Reviewed By: zzl0

Differential Revision: D44612808

fbshipit-source-id: 1f886282a52f47288fdeb105802746dc9c994302
2023-04-06 08:23:27 -07:00
Liubov Dmitrieva
222aea47f2 intro high level transaction for cloud sync
Summary:
intro high level transaction for cloud sync

this is for syncs that are not running with best effort option

the transaction is needed to eliminate repo changed while backing up errors

this is a follow up after https://www.internalfb.com/diff/D41871718 that hasn't resolved the errors fully

Reviewed By: markbt

Differential Revision: D44664729

fbshipit-source-id: da411cd20fb909c22ff8976dd31bd46034a28226
2023-04-06 07:00:57 -07:00
Open Source Bot
e28063d267 Updating submodules
Summary:
GitHub commits:

b179b838d1
81f34677f4

Reviewed By: yns88

fbshipit-source-id: 5007b9dc314ba06f9fbf60aae8033ddc59279cb8
2023-04-06 03:47:01 -07:00
Open Source Bot
85a7defc67 Updating submodules
Summary:
GitHub commits:

0128995aa7
400c64969b
9458686429

Reviewed By: yns88

fbshipit-source-id: f295ac07fd7eb7907fe0e0053ad68f5a4b9e62af
2023-04-05 22:13:19 -07:00
Muir Manders
1d54e0e605 revlog: topo sort commits before adding
Summary:
In certain edge cases, during pull we are using EdenAPI to fetch nodes and feeding them into a revlog changelog (via doublewrite). This was erroring out since the RevlogCommits.add_commits expected nodes to be sorted parent-before-child. Work around by sorting the nodes.
[MSDK] Update icsp_domain_config_type_linter component on ICSP:master
```

Reviewed By: quark-zju

Differential Revision: D44734552

fbshipit-source-id: 7f00a93b93921baa827a55c7c1ec9388b74ac0f7
2023-04-05 20:47:38 -07:00
Open Source Bot
005d8b5e40 Updating submodules
Summary:
GitHub commits:

a25a202973
7ee9fefc3e
27c7d025c1

Reviewed By: yns88

fbshipit-source-id: 595e993838bc383717395bed8f2938f761290539
2023-04-05 20:29:19 -07:00
Open Source Bot
9b497acdaa Updating submodules
Summary:
GitHub commits:

91defeebcc
0623c5b903
953afc563a
9eaaa683c1

Reviewed By: yns88

fbshipit-source-id: 6084a07c7771b934527f850fc47675ab6113f0f1
2023-04-05 17:39:45 -07:00
Chad Austin
7d4a54eb11 DirList -> {Fuse,Nfs}DirList
Reviewed By: xavierd

Differential Revision: D44716052

fbshipit-source-id: 45bd5d4b1e55792a3f43853dd4decc1faf4a1a9e
2023-04-05 16:35:43 -07:00
Chad Austin
6a3f255736 return ImmediateFuture from FuseChannel::flushInvalidations
Summary: We don't want arbitrary callbacks running on the invalidation thread.

Reviewed By: xavierd

Differential Revision: D44657334

fbshipit-source-id: a1c2017334cac45cb66f0f7c50a1215323d297e8
2023-04-05 16:27:02 -07:00
Chad Austin
76b5324623 rename EdenMount::startChannel to startFsChannel
Summary:
To disambiguate Thrift channels from filesystem channels, rename
startChannel to startFsChannel.

Reviewed By: xavierd

Differential Revision: D44657273

fbshipit-source-id: 4b43cf6cf0c094ca273f04bbbcfc0486c3b00cf0
2023-04-05 16:27:02 -07:00