Commit Graph

81725 Commits

Author SHA1 Message Date
Katie Mancini
b25fc2af3a only register valid ports with portmapper
Summary:
UDS don't have port numbers, so trying to register their port with the
portmapper is going to fail. This can cause eden to fail to start when we
enable uds. The current portmapper version we use can't support
this, so let's just skip attempting to register uds servers with the
portmapper.

Reviewed By: xavierd

Differential Revision: D45196379

fbshipit-source-id: 584e6e04129d1ddbcc756ed66c55a03c3955705a
2023-04-21 17:43:55 -07:00
Open Source Bot
6bd256c869 Updating submodules
Summary:
GitHub commits:

77e9aec876
e58db95c79
0934f6c285

Reviewed By: bigfootjon

fbshipit-source-id: 1491c96b7c4047c92d7c0ac2c1cd53eadcd5f06f
2023-04-21 16:51:26 -07:00
Open Source Bot
8b7b9ec778 Updating submodules
Summary:
GitHub commits:

57f362bf5d
3ef24683ab
ba9c101dad

Reviewed By: bigfootjon

fbshipit-source-id: 28fc9280c4f2e9e98dbaef9a7f0f57a4ae2f4d80
2023-04-21 15:52:39 -07:00
Jun Wu
a86449be3a stack: add reorder support
Summary:
Use `FileStack.remapRevs` to calculate the file contents after reordering.
It is a bit tricky since there are various of mappings.

Reviewed By: evangrayk

Differential Revision: D45073071

fbshipit-source-id: 8b8a7e14b15d2ff2a1bbf706764be23b9ae968d7
2023-04-21 15:51:13 -07:00
Jun Wu
45c8d5e5f0 shared: add zip() function
Summary: This seems handy to use without depending on lodash. Code written by ChatGPT 4.

Reviewed By: zzl0

Differential Revision: D45073069

fbshipit-source-id: 9bb4a73d476d14310003dcce78df2515d4ff614c
2023-04-21 15:51:13 -07:00
Jun Wu
2f93193774 stack: add drop support
Summary: Add "drop" operation to drop a commit.

Reviewed By: muirdm

Differential Revision: D45073068

fbshipit-source-id: ff743a4fbc6991120e50a90aa42574b20ddcdc12
2023-04-21 15:51:13 -07:00
Jun Wu
73e9fe2e56 stack: support switching file content source of truth between linelog and string
Summary:
Previously, the file content in commit stack is a string, or a base85 string.
This diff extends it to support a 3rd type: lazily defined by (file stack
index, file stack rev). So if we only edit things without showing the file
contents, it might do less work under the hood.

Reviewed By: muirdm

Differential Revision: D45073072

fbshipit-source-id: 1eb351c03a464c7cf3f55af656167dab115f421a
2023-04-21 15:51:13 -07:00
Jun Wu
c262c34a67 shared: add util to test if a generator contains a given value
Summary: This is useful in the upcoming changes.

Reviewed By: zzl0

Differential Revision: D45073070

fbshipit-source-id: 248ad013e3737e207c475ba05043bc2a3abfceb8
2023-04-21 15:51:13 -07:00
Jun Wu
a951aa5fef stack: support folding commits
Summary: Add a way to fold down commits. The tricky parts are about rename handling.

Reviewed By: evangrayk

Differential Revision: D44856154

fbshipit-source-id: 49627f779a554f63c133494867dcbf6dc6e4ecbb
2023-04-21 15:51:13 -07:00
Jun Wu
19cbcb1233 stack: add logic to calculate commit dependencies
Summary: This will be useful to figure out what commit reorders are meaningful.

Reviewed By: evangrayk

Differential Revision: D44845635

fbshipit-source-id: a6b78bea89fa1a6f95b6439560620076d967064c
2023-04-21 15:51:13 -07:00
Jun Wu
8df31f7cac stack: extract logic to find the parent of a file
Summary: This is useful to figure out file dependencies.

Reviewed By: evangrayk

Differential Revision: D44845632

fbshipit-source-id: d5c6130a29223006224120bb1f794c64f0d7f036
2023-04-21 15:51:13 -07:00
Jun Wu
ae11492a3d stack: build file stacks from commit stack
Summary:
This diff adds logic to build file stacks from the commit stack so we can
reason about file changes for related files. The main complexity is around
renames/copies.

Reviewed By: evangrayk

Differential Revision: D44845634

fbshipit-source-id: e83b5c8f87fa9bccfa7c719e7b6c748d2e47fd31
2023-04-21 15:51:13 -07:00
Jun Wu
bab93917e4 vscode: add vscode config to debug isl tests
Summary:
I used this to investigate some non-obvious logic run by isl tests.
`console.log` takes too much space in `yarn test` output.

I didn't set `runtimeExecutable`. This makes it possible to specify which
`node` to use using vscode remote settings that is not checked in source
control:

  "debug.javascript.defaultRuntimeExecutable": {
    "node": "/home/quark/bin/node",
    "pwa-node": "/home/quark/bin/node"
  },

This avoids issues where the system `/usr/local/bin/node` is too old to run the
test.

Reviewed By: evangrayk

Differential Revision: D44845631

fbshipit-source-id: a632360d196313a03d3852a3baca4504b3350f16
2023-04-21 15:51:13 -07:00
Jun Wu
31e39d7694 stack: update FileStackState.revLength when appending revs
Summary:
Update `revLength` during `editText`. This makes it possible to append new
texts to construct a file stack instead of preparing all texts before hand.

Reviewed By: evangrayk

Differential Revision: D44845636

fbshipit-source-id: cc71e3552072ee8841296aee93bf917ef27726a1
2023-04-21 15:51:13 -07:00
Jun Wu
89425970ce stack: use ABSENT_FILE instead of null to represent deleted file
Summary:
It turns out `null` forces a lot of annoying cases to handle.
Inside commit stack let's use a non-none structure to represent absent
or deleted files.

Reviewed By: evangrayk

Differential Revision: D44845637

fbshipit-source-id: 4c05420613db86aab227ca3b4cbfe177a8d774e0
2023-04-21 15:51:13 -07:00
Jun Wu
24633119bb stack: initial commitStackState
Summary:
The commitStackState maintains a stack of commits and is intended to provide
read and write operations.

This diff adds basic read operations (cat, log). More complex operations
will be added later.

Right now, the implementation supports forks in the stack (but not merges or
disconnected stacks). If that adds too much undesired complexity we might want
to restrict it to linear stack later.

Reviewed By: evangrayk

Differential Revision: D44845639

fbshipit-source-id: 2a9833dd6fabe7b5c4ecd3f199a362d25f306bd3
2023-04-21 15:51:13 -07:00
Jun Wu
8ca2e93b9f stack: change stack types from Map<A,B> to {A: B}
Summary:
The stack types are meant to be JSON (de-)serialized. `Map` does not play well
with JSON so let's change them to classic object `{A: B}` format.

Reviewed By: evangrayk

Differential Revision: D44845633

fbshipit-source-id: 9f8eb539defe084f325ce9d1de2fa7159914467f
2023-04-21 15:51:13 -07:00
Zhaolong Zhu
25e8cf5efc absorb: skip obsolete commits in the stack
Summary:
The case that I met was like the following DAG, and I'd like to skip those `Landed` commits when running `hg ab` since they already landed.

```
╷ o  zzz  Apr 21 at 18:18  zhaolong
╷ │  commit zzz
╷ │
╷ o  yyy  Apr 21 at 17:18  zhaolong
╷ │  commit yyy
╷ │
╷ x  ccc [Landed as ddd]  Apr 21 at 9:00  zhaolong
╷ ╷  commit bbb
╷ ╷
╷ x  aaa [Landed as bbb]  Apr 12 at 08:00  zhaolong
╭─╯  commit aaa
```

Reviewed By: sggutier

Differential Revision: D45184140

fbshipit-source-id: a539468843032d41ab4d61e5c461b9a1de53cb40
2023-04-21 14:52:40 -07:00
Open Source Bot
733ec587f4 Updating submodules
Summary:
GitHub commits:

0525804e52
7aedf4d435
adfa5199db
7a3b6e57df
1220cedc11
1e3b1fbc3b
8e92b69569
f4db7d65c5

Reviewed By: bigfootjon

fbshipit-source-id: b4934a0b98d79840ed9620e813eeb4f219bf970e
2023-04-21 13:11:04 -07:00
Open Source Bot
42c43963ea Updating submodules
Summary:
GitHub commits:

a22550b908
89e86cff92
fc8514ed53
aa3c626e90
202d24b374
066daf99ad

Reviewed By: bigfootjon

fbshipit-source-id: 1de584efe7f7f9c704998331cd063c2dbeff6355
2023-04-21 12:10:21 -07:00
Rajiv Sharma
08dd7b8ff6 Upload raw git tags during repo import
Summary: Like in the previous diffs, this diff uploads the raw git tags during repo import through `gitimport`.

Differential Revision: D45118571

fbshipit-source-id: f5a6bb9b5805235e9f66f97ab3a58bd165ef475c
2023-04-21 11:59:38 -07:00
Rajiv Sharma
5a76b73fe1 Upload raw git trees associated with commit during git import
Summary: The previous diff uploaded raw git commit data while the commit gets imported in Mononoke through gitimport or remote-gitimport. This diff ensures that the git `tree` associated with the commit also gets  uploaded in Mononoke.

Differential Revision: D45085959

fbshipit-source-id: cf4f4a5ebd0d077972f75fe9c6a8d1dfc5067180
2023-04-21 11:59:38 -07:00
Open Source Bot
ff58ae9641 Updating submodules
Summary:
GitHub commits:

ae499882a1
3606904f48
d73f9769cd
e264875c3f

Reviewed By: bigfootjon

fbshipit-source-id: 4c4a0755cbef465ecf7b7fcf6ca7d10f22b4936d
2023-04-21 10:53:18 -07:00
Rajiv Sharma
53d0bcb32a Upload raw git commits during git import
Summary:
With the `upload_object` method in place, this diff utilizes the new uploader method to upload the raw git commit in Mononoke store before creating its corresponding Changeset at Mononoke end.

This diff has the following changes:
- Modified the `get_object` method in `GitReader` to return the raw git content (i.e. header + body bytes of git object) along with the parsed `GitObject`
- Added the `read_raw_commit` method in the `gitimport_objects` library to read the raw commit bytes
- Modified the `ExtractedCommit` type to contain the raw bytes of the commit as well
- Modified all modes of `gitimport` execution to upload the raw git commit before creating the corresponding changeset at Mononoke end
- Made changes in integration test to validate the commit upload behavior

Differential Revision: D45082135

fbshipit-source-id: f339b2851646996be7f43f02458ea5afabb9ca48
2023-04-21 10:13:50 -07:00
Rajiv Sharma
fa889aad25 Implement upload_objects for Direct and Remote Git Uploader
Summary:
This diff includes the following changes:
- Introduces the `upload_object` method in the `GitUploader` trait for uploading raw git-objects (e.g. commit, tree, tag) in the mercurial mirror of the repo
- Implements the `upload_object` method in `Direct` and `Remote` implementations of the `GitUploader` trait allowing the objects to uploaded from both `gitimport` and `remote-gitimport`

This diff just introduces this method, follow-up diffs will use it for uploading different commit objects.

Differential Revision: D45046811

fbshipit-source-id: 9b4e6a295ec22e06294e410735e67877e6d0ef10
2023-04-21 10:13:50 -07:00
Rajiv Sharma
98426e3b65 Restructure mononoke_api git methods to exist as free functions
Summary:
The existing `mononoke_api` git methods were defined under `RepoContext` which relies on a specific type of `Repo` facet container as defined in `mononoke_api` crate. These methods can easily be used through SCS which serves as an external entry point into the `mononoke_api` crate. `remote-gitimport` uses SCS and thus can leverage the necessary endpoints.

However, `gitimport` (or `direct-gitimport`) directly references the logic behind these methods. To ensure that we don't repeat ourselves, there are two alternatives.
- Make `gitimport` use the same `Repo` facet container as the one in `mononoke_api` crate
- Decouple the git methods from `RepoContext` and define them with explicit `facet` dependencies

I chose the later since using the same facet container would have made `gitimport` use a much bulkier `Repo` definition than is necessary. I also made some changes in the `create_annotated_tag` method which are as follows:
- Removed the `start_write()` statement which was essentially an authorization check to validate if writing to the repo is allowed. This check makes sense when validating an external caller (e.g. SCS) but direct references of the library should be allowed
- Removed `CreateChangeset` permission check since we are not actually creating a changeset that corresponds to a commit. Additionally, any auth checks need to be performed at the call-site (e.g. SCS) and not in the API
- Removed the `allowed_no_parents` check since any changeset created for representing a `Tag` object will not have a parent. Infact the concept of parent is invalid for a tag.
- Replaced the returned `MononokeError` into `GitError` to maintain consistency with other methods
- Replaced the instance `save_changeset` method with the struct-level `save_changeset` method. The new method doesn't log to the scribe category thus preventing users tailing it from receiving an invalid commit creation notification. Additionally, the new method doesn't consider any bubble changes but they are anyway irrelevant in the context of these git methods.

Differential Revision: D45046639

fbshipit-source-id: 7ff02cde3fd356eb7a18f5ca12e6c478e23ee315
2023-04-21 10:13:50 -07:00
generatedunixname89002005287564
bd72e48b09 Reviewed By: zertosh
Differential Revision: D45176968

fbshipit-source-id: ded28098710321c5f96aabcc555c481dc26ec457
2023-04-21 08:46:00 -07:00
Xavier Deguillard
3659954679 inodes: on NFS filter AppleDouble from the Overlay
Summary:
Previously, the nfs.allow-apple-double was tentatively rolled out but had to be
rolled back as XCode disliked when an AppleDouble file was present on disk but
a new one couldn't be created. To avoid this issue, let's prevent AppleDouble
from being loaded from the Overlay and re-write the Overlay for directories
that contains one at the same time.

As a slight behavior change, the nfs.allow-apple-double is no longer read on
the fly but only read at startup time to avoid cases where a TreeInode is
already loaded with an AppleDouble and the config is flipped which would cause
XCode to fail to save files.

Reviewed By: chadaustin

Differential Revision: D44854105

fbshipit-source-id: 2c263411719d19eb1d457e26661620e8d6c905ce
2023-04-21 08:33:34 -07:00
Xavier Deguillard
f23137cda1 config: allow unordered_set in config
Summary: A future diff will create a ConfigSetting<std::unordered_set<T>>.

Reviewed By: kmancini

Differential Revision: D45162159

fbshipit-source-id: a67b3b94d708ae694041753d7dffaa6f0ff974de
2023-04-21 08:27:20 -07:00
Rajiv Sharma
2c8e74370b Back out "Generalize Hash and add Hash32"
Reviewed By: markbt

Differential Revision: D45180105

fbshipit-source-id: 94d73b5f95c6495b2953da335ce927f3b5ad9ff0
2023-04-21 07:12:24 -07:00
Mark Juggurnauth-Thomas
e6ef902125 blame: make blame v2 the default version
Summary: In preparation for deleting blame v1, make blame v2 the default.

Differential Revision: D45044338

fbshipit-source-id: c9c71a148b42f4a3301d6c4fd0de5ad7ed321a3e
2023-04-21 05:58:38 -07:00
Mark Juggurnauth-Thomas
0e00d50d56 walker: switch to blame v2
Summary:
Allow the walker to walk the blame v2 graph.

Since the walker is the main user of blame in the integration tests, we can make v2 the default for the integration tests, too.

Differential Revision: D45044294

fbshipit-source-id: 52c991dd81be78053ffc0a6953caf8a068ef59e3
2023-04-21 05:58:38 -07:00
Mark Juggurnauth-Thomas
96b376b90c benchmark_bulkops: convert to clap4
Differential Revision: D45114047

fbshipit-source-id: f99ebe71b61827079db259a9644f21ba11508950
2023-04-21 04:52:41 -07:00
Mark Juggurnauth-Thomas
f9211aa47f bulkops: move benchmark to the benchmarks directory
Summary: This is a benchmark, so put it with the other benchmarks.

Differential Revision: D45114045

fbshipit-source-id: c524c76671d4183f6baa71ca9cd4c3cdfc402dac
2023-04-21 04:52:41 -07:00
Open Source Bot
7d44b8eb6a Updating submodules
Summary:
GitHub commits:

5cdd0cf007
86f94ae412
8a497d3215

Reviewed By: bigfootjon

fbshipit-source-id: 0071f6efe6c7ba8e7d0f3def3ff7d0d782c63364
2023-04-21 02:22:56 -07:00
Open Source Bot
aec699f4ad Updating submodules
Summary:
GitHub commits:

d55b999bf9
b55b1f4353
5be966c70f
5666ad9a78

Reviewed By: bigfootjon

fbshipit-source-id: c26e79066b1f6217d9088a3eac2cf3ab6a8b2d67
2023-04-20 19:49:35 -07:00
Chad Austin
892e5c83ff enforce the connection handler set is only updated from the EventBase
Summary:
We don't need folly::Synchronized for the RpcServer state
machine. It's only touched from the EventBase, so make it
EventBaseState.

Reviewed By: xavierd

Differential Revision: D44860240

fbshipit-source-id: bcbc3d02e7cc5f2dc377718065c7f95eed30202d
2023-04-20 18:49:40 -07:00
Chad Austin
e384876d86 rename RpcTcpHandler to RpcConnectionHandler
Summary:
There's nothing TCP-specific about RpcTcpHandler, so give it a more
accurate name.

Reviewed By: xavierd

Differential Revision: D44860198

fbshipit-source-id: 55b9dc95b2caa9d87179a17435313b91bacfee49
2023-04-20 18:49:40 -07:00
Chad Austin
b6ea3bc0ed RpcServer is the AcceptCallback
Summary:
RpcServer can handle the accept callbacks directly. There's no need
for an intermediate object.

Reviewed By: xavierd

Differential Revision: D44860163

fbshipit-source-id: fd2d96735810a52cd287c357534c8f5bae9eee90
2023-04-20 18:49:40 -07:00
Chad Austin
2164cd333a lift StateWrapper into a top-level EventBaseState so we can use it elsewhere
Summary:
I plan to use StateWrapper elsewhere so rename it to EventBaseState
and move it to the top level.

Reviewed By: xavierd

Differential Revision: D44860040

fbshipit-source-id: fb03b3b726df50099bcce144e343be0caeeaf1be
2023-04-20 18:49:40 -07:00
Chad Austin
1d73dd9d2b RpcTcpHandler is the WriteCallback
Summary:
There is no need for an intermediate object: RpcTcpHandler can handle
the write callback methods directly.

Reviewed By: xavierd

Differential Revision: D44860027

fbshipit-source-id: fe1f44b83a371291a21a3b1b26422bef5cbbf2a0
2023-04-20 18:49:40 -07:00
Chad Austin
ba132a7e4e assert that acceptStopped was synchronous
Summary:
To simplify RpcServer further, assert that removal of the accept
callback is a synchronous operation. Previously, it wasn't, because
specifying any EventBase in addAcceptCallback created a RemoteAcceptor
which scheduled operations on the other EventBase.

Reviewed By: xavierd

Differential Revision: D44853408

fbshipit-source-id: 9369cdcb0bd8450d42e195c15738362d4a53d2e7
2023-04-20 18:49:40 -07:00
Chad Austin
d8400c6faa small RpcServer simplifications
Summary:
I'm trying to track down a subtle lifetime rule violation in
EdenMount. While reading RpcServer, I noticed a few possible
simplifications.

Reviewed By: xavierd

Differential Revision: D44849773

fbshipit-source-id: 4c27c47a7e2c211dcd040acce955e9b2f617b55b
2023-04-20 18:49:40 -07:00
Chad Austin
455e7c6efa unify prjfs takeover "handling"
Summary:
This removes an ifdef _WIN32 in mount shutdown by standardizing the
takeover logic on all three platforms.

Projected FS doesn't support takeover, but removing ifdefs allows
simplifying the control flow and unblocking NFS or other FsChannel
implementations on Windows.

Reviewed By: kmancini

Differential Revision: D44737273

fbshipit-source-id: fc6b718e01698ef3700b5c198750c0e3b1f62063
2023-04-20 18:49:40 -07:00
Chad Austin
2c30d06196 unify FUSE and NFS takeover handling
Summary:
By moving NFS's StopData behind FsStopData, the std::variant and
runtime checks during takeover can be unified into one path. The next
diff will do the same for Windows.

Reviewed By: kmancini

Differential Revision: D44737160

fbshipit-source-id: 19ca623f90b367d25385f177cafa44d7bf7ebb62
2023-04-20 18:49:40 -07:00
Chad Austin
fc265ff4ed cli_rs: log a message when we fall back to Python
Reviewed By: xavierd

Differential Revision: D41896672

fbshipit-source-id: 967aaa758699bf4b312e274f3dad9a2bbe762aca
2023-04-20 18:48:09 -07:00
Evan Krause
cd9c3c0228 Add command to close ISL webview
Summary: To support opting out of the new ISL, we should close the new ISL when you click the opt out button. This means we need a command to close the webview. We could handle this other ways, but a command is pretty easy to do and useful. The command is not exposed in the package.json so it won't be user-visible.

Reviewed By: quark-zju

Differential Revision: D45129282

fbshipit-source-id: 9feb79701ccd48512a1ddfba89427e72e621c261
2023-04-20 18:15:28 -07:00
Evan Krause
a20fd719aa Fix tooltips aggressively wrapping
Summary: I noticed tooltips that wrapped text would cut off words midway. We used `word-break: break-all` to support long file paths, instead of the more reasonable `break-word`.

Reviewed By: quark-zju

Differential Revision: D45126388

fbshipit-source-id: d256e62bfcb692cee1231886e42607c904959d19
2023-04-20 18:15:28 -07:00
Evan Krause
aa92b1abf7 Add one-time opt out button
Summary: Previous diffs this stack set us up to have an opt-out button in vscode to go back to the old ISL. Here we change the UX slightly to have an opt out button and a one-time open old ISL button.

Reviewed By: quark-zju

Differential Revision: D45126343

fbshipit-source-id: caf4a40b0220d28d31bc07e15210fed78b151243
2023-04-20 18:15:28 -07:00
Evan Krause
3823530ebb api for vscode config from webview
Summary: In the previous diff, we added the UI to render the opt out / opt  in button. Here I add an API for the vscode webview to read/subscribe to a vscode config and also set the config. This lets us easily implement the opt out flow without needing a special opt out message to be sent to the platform.

Reviewed By: quark-zju

Differential Revision: D45123610

fbshipit-source-id: 5c3ab94960f81becb95c90c9cd27dda3ed8fc1a5
2023-04-20 18:15:28 -07:00