Summary:
We have a concept in Hargow collect Volumettes, which are directories of data. The backend storage for them is the RE CAS, and we would like to be able to mount volumettes using eden.
However, we have our own use-cases, which have their own storage (Manifold buckets and ZippDBs). So to make this work, we need some way to be able to specify the use-case.
We pass the use-case in using a new `--re-use-case` parameter, and store it in a `CheckoutConfig` option under `recas/use-case`.
Reviewed By: miaoyipu
Differential Revision: D41001049
fbshipit-source-id: a4b3d5c602e29a71560d17d3d3802b4b0a5922c0
Summary: if the mount is busy when we run `sudo umount`, users will need to pass the lazy flag as well. Let's suggest it by default since it doesn't hurt
Reviewed By: genevievehelsel
Differential Revision: D40477030
fbshipit-source-id: 03539cd0418232c92942359435cfc5497355800f
Summary:
Currently, the case-sensitivity of an Eden checkout is set at clone time based on the OS: Linux = case-sensitive, macOS and Windows = case-insensitive. This works fine but leads to patchy integration test coverage of case-sensitivity features, since coverage is tied to the OS the tests happen to be running on. Relatedly, there's no clean way to query the case-sensitivity of an existing checkout other than reaching into `config.toml`.
Here we introduce a pair of hidden `eden clone` flags to allow changing case sensitivity, and add a `case_sensitive` boolean field to the output of `eden info`. Because we don't want end-users to rely on this, setting case sensitivity to anything other than the default on each platform triggers a warning.
I will use this in a separate diff to refactor certain existing integration tests (namely `casing_test` and parts of `glob_test`) to run with all possible case-sensitivity settings on every platform.
Reviewed By: xavierd
Differential Revision: D40180643
fbshipit-source-id: 4b4c935f3c9bb40f8e3564383a91dc38ea25eab5
Summary: Add basic support to sniff ".hg" vs ".sl" dot dir, and otherwise default based on env vars.
Reviewed By: quark-zju
Differential Revision: D39900481
fbshipit-source-id: d9900755f54711a9d067d8fd65f2fc25aa278a7a
Summary:
Removing state underneath a running EdenFS mount is a bad idea. In the past, we rarely hit the timeout so this was fine. We've now seen more and more people hit this timeout (due to thrift queue timeouts).
Let's avoid messing up the EdenFS state even further and instead give users methods for remediating a hanging mount.
Reviewed By: fanzeyi
Differential Revision: D40113414
fbshipit-source-id: 35f2c11717be346d2c14b3392a7ee6d98b603483
Summary: Unmounting can take some time (especially since we're seeing frequent thrift queue timeouts). Let's raise the timeout a bit and give the user a warning message that it may take longer than usual.
Reviewed By: fanzeyi
Differential Revision: D40113277
fbshipit-source-id: d96d909d8ff66e23d2f7862584a3d0556aecc72d
Summary: Adding http backend in the eden server and cli. Following recas as a template.
Reviewed By: chadaustin
Differential Revision: D39641932
fbshipit-source-id: ff840fb9603b2b9d794da53d5b0df50ee7ebcb1e
Summary:
eden clone trys to start eden if it isn't healthy. starting doesn't count as
healthy. lets wait for eden to start instead of starting it in clone.
This should get rid of more flock errors on windows and some sort of pid file
error on linux and mac as well. Xavier just noticed this flock error today.
There might be more of these healthy/starting check issues in the cli. will
audit for them.
Reviewed By: xavierd
Differential Revision: D39765586
fbshipit-source-id: 8949ccb7d4bbba8ee8df607d37c767b055113398
Summary:
This will only clean the orphaned redirections. This will be used in a nightly
script to clean all the orphaned redirections on a periodic manner
automatically instead of having users run `eden du --clean` manually.
Reviewed By: MichaelCuevas
Differential Revision: D39488493
fbshipit-source-id: 2146aa1aea6b7a4fda129f7676dba577eb14050e
Summary:
Adds a flag to edenfsctl to let us specify a checkout directory outside our current working directory. This is necessary if we're going to use `buck2 run edenfsctl` as an `eden-dev` replacement, since buck requires us to run from the source directory, which may be different from the checkout we want edenfsctl to operate on.
With this change, we can approximate `eden-dev` like this:
```
% buck2 run edenfsctl -- --config-dir=$HOME/local/eden-dev-state --checkout-dir=$HOME/fbsource-dev trace fs
```
This is implemented by altering both the Rust and Python entry points to accept the new flag and change to the given directory.
Reviewed By: xavierd
Differential Revision: D38961247
fbshipit-source-id: 814306871ebf01f1cabab87c98e85adce68b4ac8
Summary:
We would like to improve the UX of the *eden rm* command. The *eden rm* command seems to "hang" from the users' perspective when it is performing a large task such as deleting a large directory tree in a repo that has been crawled in for some or other reason. This diff introduces a couple of print outs to indicate what the command is doing, and is introducing a progress spinner for the *rmtree* command.
Since the *shutil.rmtree* command is a black box, we can take advantage of the internal recursive behavior and produce a spinner that spins as long as the command keeps executing.
Reviewed By: xavierd
Differential Revision: D38754866
fbshipit-source-id: d04b403baa8c2de00c11e3f4f851605afc099ba6
Summary:
It is often hard if any eden doctor checks failed in the middle and hard to debug where it went wrong.
This diff adds some error context and improves how we report these exceptions so we can see where it is originated from.
Reviewed By: xavierd
Differential Revision: D38593356
fbshipit-source-id: 322f17a8f6290ba7c38ede0cf9f125341a3f83f2
Summary:
Users get confused about when to use eden rm and when to use rm -rf.
Usually they just want a big hammer that gets rid of a repository, so let's make
'eden rm' do 'rm -rf' if necessary.
Reviewed By: xavierd
Differential Revision: D37390756
fbshipit-source-id: 9484026b6df94561f05a9ca5f5c10c8ee65f131d
Summary: There is an issue on write_back_cache for flash disk, that might cause builds very slow so disable for now.
Reviewed By: genevievehelsel
Differential Revision: D37510215
fbshipit-source-id: 6246682f8ce78766d1cd4599854f6b565d4474c5
Summary:
Applies new import merging and sorting from µsort v1.0.
When merging imports, µsort will make a best-effort to move associated
comments to match merged elements, but there are known limitations due to
the diynamic nature of Python and developer tooling. These changes should
not produce any dangerous runtime changes, but may require touch-ups to
satisfy linters and other tooling.
Note that µsort uses case-insensitive, lexicographical sorting, which
results in a different ordering compared to isort. This provides a more
consistent sorting order, matching the case-insensitive order used when
sorting import statements by module name, and ensures that "frog", "FROG",
and "Frog" always sort next to each other.
For details on µsort's sorting and merging semantics, see the user guide:
https://usort.readthedocs.io/en/stable/guide.html#sorting
Reviewed By: lisroach
Differential Revision: D36402162
fbshipit-source-id: 6d180e9003d466c4f866fc9d454c6531766ca1dd
Summary:
- Ignore encoding errors when parsing output from `handle.exe`
- Split cleanup and destroy mount, so the error message makes more sense.
- Print exception stacktrace if `--debug` is passed in `eden rm`.
Reviewed By: chadaustin
Differential Revision: D36210915
fbshipit-source-id: 71f2541aae62902ef9d6aac9b233f1ff59580e73
Summary:
When an `edenfsctl` command is invoked from the E-Menu, a PowerShell Window is opened and is immediately closed once the command finishes. This makes it hard/impossible for the user to see the command's output.
The desired behavior here is to keep the Window open long enough for the user to acknowledge the output. I did this by adding a `--press-to-continue` flag to all `edenfsctl` commands. This will mainly be used by the E-Menu, but may have uses elsewhere.
Reviewed By: chadaustin
Differential Revision: D36137709
fbshipit-source-id: a46bebb5bb5820949cd4b70579a29406afb34048
Summary:
Our systemd code is unused, and is causing a bunch of tests to fail. In the
case where systemd is needed again in the future, its shape will be
significantly different than what we have today, so there even less need to
keep this version around.
Reviewed By: fanzeyi
Differential Revision: D35829902
fbshipit-source-id: 6013f5fe7c3debdcfbb9929d2748819a96403fe7
Summary: Typoing a path with `eden rm` would tell users that there isn't an existing checkout with that name. That can be confusing. Instead, we should be more specific and let users know when they typo'd
Reviewed By: kmancini
Differential Revision: D35690339
fbshipit-source-id: 8d2bae48d3bb3724cd6c1b4049af3df71c04a287
Summary:
When EdenFS is starting, `eden start` will attempt to start another EdenFS daemon then it will get a flock error.
On Windows, sometimes we saw a long EdenFS startup process, and this behavior misleads people to think they are not able to start EdenFS.
Reviewed By: xavierd
Differential Revision: D35799954
fbshipit-source-id: 5f58e3ad89962f61d233f962a3e464fe55a9cd8b
Summary: This will be used in a later diff to give users a "one click" report option.
Reviewed By: chadaustin
Differential Revision: D35330514
fbshipit-source-id: 0d9f3987d788d21cebc71afc796c252eb71028a3
Summary: This trick doesn't matter on Windows, so let's not suggest it on Windows.
Reviewed By: chadaustin
Differential Revision: D35820427
fbshipit-source-id: 44c1d0373d20d921fa55a8edf7e3d9565682a609
Summary:
In order to properly support reset on Windows, EdenFS needs to keep track of
both the checked out revision, and the reset one. Since this state needs to
persist across EdenFS restarts, we'll need to store it in the SNAPSHOT file.
This diff merely adds support for this new SNAPSHOT format, but doesn't write
it.
Reviewed By: chadaustin
Differential Revision: D35448641
fbshipit-source-id: 59fbafdadc885dfec8efd119c4fe1ff582987af0
Summary:
This is the same as `eden trace fs`, redirect people to that. The command will
simply be removed later.
Reviewed By: fanzeyi
Differential Revision: D35483104
fbshipit-source-id: bdacda6c5e6f9d8d809f44b64b1178aacbee4228
Summary:
Certain users have older Python 3 version installed and it would cause issues on these machine.
This diff fixes them.
Reviewed By: kmancini
Differential Revision: D35150380
fbshipit-source-id: e230b6990114ef1835724aa34e4307873b34b93f
Summary:
Some times, when user failed their `eden rm` on Windows because of files being in use by other process. They would try to run the same `eden rm` command again. It wouldn't work because the mount point is no longer an EdenFS directory so we bail out.
This has confused our user a bit and this diff will allow `eden rm` to detect if the path is a previously EdenFS mount on Windows, and continue the clean up process.
Reviewed By: xavierd
Differential Revision: D34794411
fbshipit-source-id: eaa86390257412daf80908bf88559b8f639c7a36
Summary: Currently eden redirection list will list all redirections include its nested mounts and redirection in the nested mounts. It is better to ignore the nested mounts and redirection in the nested mounts if list redirection from its ancestor mount.
Reviewed By: chadaustin
Differential Revision: D34156017
fbshipit-source-id: ba3ed5e6b5c79b4a62034f5f8563705cf886a44d
Summary:
Sometimes on Windows, we receive user reports that `edenfsctl` hangs indefinitely. We would like to see where it hangs in these cases. Adding this will allow us to see the traceback when ctrl-c edenfsctl with the environment variable set.
Note `--debug` is shared with Rust edenfsctl (where it enables verbose logging).
Reviewed By: xavierd
Differential Revision: D34731381
fbshipit-source-id: 24477d05c01d353f9f7a45fc3c5d28f29b62e3be
Summary:
Let's be consistent and use EdenFS everywhere in our user facing documentation
and messages.
Reviewed By: fanzeyi
Differential Revision: D34692175
fbshipit-source-id: 6346bd9ac3516199fe47123d81833d2c457efbbc
Summary:
On Windows, the default asyncio event loop would throw an exception on tear down.
This diff fixes that by opting to the older event loop. The older event loop doesn't support subprocess but it doesn't look like we use it anyway.
https://stackoverflow.com/a/62413786/694963
Reviewed By: xavierd
Differential Revision: D34486221
fbshipit-source-id: 765056f1e82c9a53d89482527725154445e59494
Summary:
macFUSE support on apple is going away soon. If macFUSE breaks for folks,
they will need to migrate to NFS. This makes the migration a one command step.
In case folks see any issues with NFS during our migration we also have
an option to migrate back to fuse. This will temporarily unblock them
while we fix any bugs that come up.
Reviewed By: xavierd
Differential Revision: D34081417
fbshipit-source-id: ea89345b5ccc019cbfe6387a1dfa366ae9dd6345
Summary:
With Facebook having been renamed Meta Platforms, we need to change the license
headers.
Reviewed By: fanzeyi
Differential Revision: D33407812
fbshipit-source-id: b11bfbbf13a48873f0cea75f212cc7b07a68fb2e
Summary:
On clone, the CLI tries to open an .arcconfig file at the given revision for
the solve purpose of printing a slightly different log message. Since this log
isn't necessary to be present, let's avoid the `hg cat` and simplify the code a
bit on top of making it faster.
This should make cloning a couple of seconds faster on Windows due to Mercurial
taking roughly a second to start.
Reviewed By: chadaustin
Differential Revision: D33070099
fbshipit-source-id: 81c5cba8348d0c8d82c57a6656e6eb79c2b1f878
Summary:
By default, we do not want to support nested checkouts. Their behavior is not well defined and can cause issues.
This diff disallows nested checkouts unless specifically requested by users. They can use the --allow-nested-checkout or -n flags to force nested checkout creation. If these flags are not used, the clone is aborted and an error message is printed.
Reviewed By: chadaustin
Differential Revision: D32514269
fbshipit-source-id: d04a7ef82c6d31993801648da42e4182167f37e6
Summary:
On Windows, printing paths by default use backward slashes, but forward
slashses are also acceptable. For the sake of making tests pass, let's always
use forward slashes.
Reviewed By: chadaustin
Differential Revision: D32960607
fbshipit-source-id: c1424c4a090d805bab337fc6d540563e8205e5dc
Summary:
This config has been enabled for many months now, let's simply assume it is set
to true on Windows.
Reviewed By: genevievehelsel
Differential Revision: D32192585
fbshipit-source-id: 76829a031f859594a5139dd09a6479cabeda2089
Summary:
As a first step, as I ramp up on Rust and the edenfsctl codebase and in order to more quickly support basic top functionality in windows, we're adding a minitop subcommand that will have a subset of the `eden top` output.
This diff adds scaffolding for the minitop subcommand.
Reviewed By: fanzeyi
Differential Revision: D31841478
fbshipit-source-id: 7020e81a0c8021bad45de835f2e279c049b76200
Summary:
When eden is not running on windows `eden rm` will spit out some error
messages and exits with error code 1. But it does actually successfully
remove the repo.
On linux removing a repo while eden is not running behaves just like if
eden were running.
Let's make the removal more graceful on windows.
Reviewed By: xavierd
Differential Revision: D31519805
fbshipit-source-id: d393922a9474e64251142207ae38a602766f17bf