Commit Graph

504 Commits

Author SHA1 Message Date
Wez Furlong
34636666ac eden: cli: add redirect unmount command
Summary:
The purpose of this command is to unmount/unlink any configured
redirections without removing their configuration.

The intent is to call this for a mount when we are unmounting; I'll do
that bit in a follow on diff.

Reviewed By: pkaush

Differential Revision: D18801872

fbshipit-source-id: 096d9595091da72aa85f4259cbab022a1fe0c01f
2019-12-04 08:45:26 -08:00
Genevieve Helsel
aae83490c9 compare blob contents sha1 in Diff.cpp
Summary: Even if blobs have different hashes, they could have the same contents. For example, if between the two revisions being compared, if a file was changed and then later reverted. In that case, the contents would be the same but the blobs would have different hashes. Currently, `getScmStatusBetweenRevisions()` would report false positives in this case. This is also needed so we do not report false positives in `getScmStatus()` when hit this code path

Reviewed By: simpkins

Differential Revision: D18647086

fbshipit-source-id: 66e12648a24fd7e5612eee5e599a5b81c7c5f2d1
2019-11-22 08:09:37 -08:00
Genevieve Helsel
3807e751ca make enforceParents configurable for getScmStatusV2
Summary: This reads `enforceParents` from a config instead of always assuming true for `getScmStatusV2()`. This will allow a easy kill switch in case throwing errors from this thrift call causes issues with something that calls hg status

Reviewed By: simpkins

Differential Revision: D18258164

fbshipit-source-id: 1ae421a941c01a678d25d5453c771262b03558d0
2019-11-20 17:51:21 -08:00
Genevieve Helsel
5d2c5ae60a more helpful error message when calling status with out of date parent.
Summary: make the error message returned in the case of out of date parents during a new status call more user friendly and provide possible remediation instructions

Reviewed By: simpkins

Differential Revision: D18328835

fbshipit-source-id: b214f45bb055d008db8b233ddd2a1843332db838
2019-11-14 16:46:15 -08:00
Adam Simpkins
46890ae1ec Merge fb-mercurial sources into the eden repository
Summary:
Merge the fb-mercurial code into the Eden repository, under the
`eden/scm` subdirectory.

Reviewed By: quark-zju

Differential Revision: D18445774

fbshipit-source-id: fc3307f9937e0c7e1c8f7d03c5102c4fe5dedb10
2019-11-13 20:20:32 -08:00
generatedunixname89002005307016
3f46bd1142 Update pyre version for eden
Summary: Automatic upgrade to remove `version` override and silence errors.

Reviewed By: shannonzhu

Differential Revision: D18250419

fbshipit-source-id: b4ab494552f8ad6601224c03eab6ee5904b83255
2019-10-31 15:31:07 -07:00
Genevieve Helsel
495b4394b8 add a new getScmStatusV2() API to replace getScmStatus()
Summary:
Add a new thrift API for computing the difference between the working
directory and a given source control commit.

This has the following differences from the old getScmStatus() commit:

- The parameters are accepted in a GetScmStatusParams structure now.
  This makes it easier for the server-side C++ implementation to tell which
  parameters have actually been specified by the caller.  This will make it
  easier to extend this API in the future without having to replace it with a
  new function call again.

- The return value is a GetScmStatusResult, which includes both the ScmStatus
  and the EdenFS version number.  This will allow code like `hg status` to get
  both the status results and the EdenFS version in a single call, without
  needing to make multiple separate thrift calls.

- This new call will return an error if the caller requests the status against
  a commit that disagrees with EdenFS's view of the current commit.  Because
  the individual `hg` command line processes do not perform any
  synchronization of their own when reading the working directory parent,
  they can often call EdenFS with stale parent information, or while a
  checkout is currently in progress.  This new behavior will reject the
  request with an error, rather than having EdenFS perform a potentially very
  expensive status computation when the results probably aren't actually
  useful to the caller anyway.

Reviewed By: chadaustin

Differential Revision: D15110218

fbshipit-source-id: ebc2f74dafc090d4fd245de8e4d62e2b086500dd
2019-10-29 09:56:31 -07:00
Genevieve Helsel
894416f20a add EdenErrorType to EdenError
Summary: Adds a non-optional EdenErrorType struct for EdenError, this can be used in case of special error case handling of errors without error message parsing. Currently this is just passed along and not consumed anywhere in the client, but later in the stack is used for specific retry of checkout if "CHECKOUT_IN_PROGRESS" on the consuming side.

Reviewed By: chadaustin

Differential Revision: D18139917

fbshipit-source-id: b3f2ec4c480fc5246ff2f46d09c436021bad8b61
2019-10-29 09:23:03 -07:00
Xavier Deguillard
bf08af091a tests: remove fastmanifest requirement
Summary: Fastmanifest is going away, remove it from the test.

Reviewed By: chadaustin

Differential Revision: D18145000

fbshipit-source-id: ee75ebe4eda19caca92fd0a84bf0ae9f48112167
2019-10-28 11:38:49 -07:00
Chad Austin
4f360eafd2 clang-format
Summary: Formatting had diverged in a few places. Fix that up.

Reviewed By: fanzeyi

Differential Revision: D18123219

fbshipit-source-id: 832cdd70789642f665a029196998928a9173be81
2019-10-24 14:56:43 -07:00
Wez Furlong
cb49bbbbf5 eden: improve readability for failed tests.
Summary:
transforms this horrendous mess:

```
> stderr=b"==2460594==AddressSanitizer: libc interceptors initialized\n|| `[0x10007fff8000, 0x7fffffffffff]` || HighMem    ||\n|| `[0x02008fff7000, 0x10007fff7fff]` || HighShadow ||\n|| `[0x00008fff7000, 0x02008fff6fff]` || ShadowGap  ||\n|| `[0x00007fff8000, 0x00008fff6fff]` || LowShadow  ||\n|| `[0x000000000000, 0x00007fff7fff]` || LowMem     ||\nMemToShadow(shadow): 0x00008fff7000 0x000091ff6dff 0x004091ff6e00 0x02008fff6fff\nredzone=16\nmax_redzone=2048\nquarantine_size_mb=256M\nthread_local_quarantine_size_kb=1024K\nmalloc_context_size=30\nSHADOW_SCALE: 3\nSHADOW_GRANULARITY: 8\nSHADOW_OFFSET: 0x7fff8000\n==2460594==Installed the sigaction for signal 11\n==2460594==Installed the sigaction for signal 7\n==2460594==Installed the sigaction for signal 8\n==2460594==T0: FakeStack created:
0x7f524432c000 -- 0x7f5244e35000 stack_size_log: 20; mmapped 11300K, noreserve=0 \n==2460594==T0: stack [0x7ffe4480f000,0x7ffe4500f000) size 0x800000; local=0x7ffe4500bcc8\n==2460594==AddressSanitizer Init done\n==2460674==AddressSanitizer: failed to intercept '__cxa_throw'\n==2460674==AddressSanitizer: libc interceptors initialized\n|| `[0x10007fff8000, 0x7fffffffffff]` || HighMem    ||\n|| `[0x02008fff7000, 0x10007fff7fff]` || HighShadow ||\n|| `[0x00008fff7000, 0x02008fff6fff]` || ShadowGap  ||\n|| `[0x00007fff8000, 0x00008fff6fff]` || LowShadow  ||\n|| `[0x000000000000, 0x00007fff7fff]` || LowMem     ||\nMemToShadow(shadow): 0x00008fff7000 0x000091ff6dff 0x004091ff6e00 0x02008fff6fff\nredzone=16\nmax_redzone=2048\nquarantine_size_mb=256M\nthread_local_quarantine_size_kb=1024K\nmalloc_context_size=30\nSHADOW_SCALE: 3\nSHADOW_GRANULARITY: 8\nSHADOW_OFFSET: 0x7fff8000\n==2460674==Installed the sigaction for signal 11\n==2460674==Installed the sigaction for signal 7\n==2460674==Installed the sigaction for signal 8\n==2460674==T0: FakeStack created: 0x7fa4b4315000 -- 0x7fa4b4e1e000 stack_size_log: 20; mmapped 11300K, noreserve=0 \n==2460674==T0: stack [0x7ffd70040000,0x7ffd70840000) size 0x800000; local=0x7ffd7083f7c8\n==2460674==AddressSanitizer Init done\nAddressSanitizer ignores mlock/mlockall/munlock/munlockall\n==2460732==AddressSanitizer: libc interceptors initialized\n|| `[0x10007fff8000, 0x7fffffffffff]` || HighMem    ||\n|| `[0x02008fff7000, 0x10007fff7fff]` || HighShadow ||\n|| `[0x00008fff7000, 0x02008fff6fff]` || ShadowGap  ||\n|| `[0x00007fff8000, 0x00008fff6fff]` || LowShadow  ||\n|| `[0x000000000000, 0x00007fff7fff]` || LowMem     ||\nMemToShadow(shadow): 0x00008fff7000 0x000091ff6dff 0x004091ff6e00 0x02008fff6fff\nredzone=16\nmax_redzone=2048\nquarantine_size_mb=256M\nthread_local_quarantine_size_kb=1024K\nmalloc_context_size=30\nSHADOW_SCALE: 3\nSHADOW_GRANULARITY: 8\nSHADOW_OFFSET: 0x7fff8000\n==2460732==Installed the sigaction for signal 11\n==2460732==Installed the sigaction for signal 7\n==2460732==Installed the sigaction for signal 8\n==2460732==T0: FakeStack created: 0x7fd43d241000 -- 0x7fd43dd4a000 stack_size_log: 20; mmapped 11300K, noreserve=0 \n==2460732==T0: stack [0x7ffe73d21000,0x7ffe74521000) size 0x800000; local=0x7ffe74520c28\n==2460732==AddressSanitizer Init done\n==2461383==AddressSanitizer: failed to intercept '__cxa_throw'\n==2461383==AddressSanitizer: libc interceptors initialized\n|| `[0x10007fff8000, 0x7fffffffffff]` || HighMem    ||\n|| `[0x02008fff7000, 0x10007fff7fff]` || HighShadow ||\n|| `[0x00008fff7000, 0x02008fff6fff]` || ShadowGap  ||\n|| `[0x00007fff8000, 0x00008fff6fff]` || LowShadow  ||\n|| `[0x000000000000, 0x00007fff7fff]` || LowMem     ||\nMemToShadow(shadow): 0x00008fff7000 0x000091ff6dff 0x004091ff6e00 0x02008fff6fff\nredzone=16\nmax_redzone=2048\nquarantine_size_mb=256M\nthread_local_quarantine_size_kb=1024K\nmalloc_context_size=30\nSHADOW_SCALE: 3\nSHADOW_GRANULARITY: 8\nSHADOW_OFFSET: 0x7fff8000\n==2461383==Installed the sigaction for signal 11\n==2461383==Installed the sigaction for signal 7\n==2461383==Installed the sigaction for signal 8\n==2461383==T0: FakeStack created: 0x7feb8e014000 -- 0x7feb8eb1d000 stack_size_log: 20; mmapped 11300K, noreserve=0 \n==2461383==T0: stack [0x7ffce3772000,0x7ffce3f72000) size 0x800000; local=0x7ffce3f71778\n==2461383==AddressSanitizer Init done\nAddressSanitizer ignores mlock/mlockall/munlock/munlockall\n==2461393==AddressSanitizer: libc interceptors initialized\n|| `[0x10007fff8000, 0x7fffffffffff]` || HighMem    ||\n|| `[0x02008fff7000, 0x10007fff7fff]` || HighShadow ||\n|| `[0x00008fff7000, 0x02008fff6fff]` || ShadowGap  ||\n|| `[0x00007fff8000, 0x00008fff6fff]` || LowShadow  ||\n|| `[0x000000000000, 0x00007fff7fff]` || LowMem     ||\nMemToShadow(shadow): 0x00008fff7000 0x000091ff6dff 0x004091ff6e00 0x02008fff6fff\nredzone=16\nmax_redzone=2048\nquarantine_size_mb=256M\nthread_local_quarantine_size_kb=1024K\nmalloc_context_size=30\nSHADOW_SCALE: 3\nSHADOW_GRANULARITY: 8\nSHADOW_OFFSET: 0x7fff8000\n==2461393==Installed the sigaction for signal 11\n==2461393==Installed the sigaction for signal 7\n==2461393==Installed the sigaction for signal 8\n==2461393==T0: FakeStack created: 0x7f884e0d9000 -- 0x7f884ebe2000 stack_size_log: 20; mmapped 11300K, noreserve=0 \n==2461393==T0: stack [0x7fff4b1c2000,0x7fff4b9c2000) size 0x800000; local=0x7fff4b9c1878\n==2461393==AddressSanitizer Init done\nabort: No module named toml!\nerror: Command '['/data/users/wez/fbsource/fbcode/buck-out/dev/gen/scm/hg#binary/hg', 'debugedenrunpostupdatehook', '-R', PosixPath('/var/tmp/eden_test.wahpn1vx/mounts/main')]' returned non-zero exit status 255.\n"
```

into this:

```
...
> AddressSanitizer ignores mlock/mlockall/munlock/munlockall
> ==2492882==AddressSanitizer: libc interceptors initialized
> === How to use this, how to get the raw stack trace, and more: fburl.com/ASAN ===
> || `[0x10007fff8000, 0x7fffffffffff]` || HighMem    ||
> || `[0x02008fff7000, 0x10007fff7fff]` || HighShadow ||
> || `[0x00008fff7000, 0x02008fff6fff]` || ShadowGap  ||
> || `[0x00007fff8000, 0x00008fff6fff]` || LowShadow  ||
> || `[0x000000000000, 0x00007fff7fff]` || LowMem     ||
> MemToShadow(shadow): 0x00008fff7000 0x000091ff6dff 0x004091ff6e00 0x02008fff6fff
> redzone=16
> max_redzone=2048
> quarantine_size_mb=256M
> thread_local_quarantine_size_kb=1024K
> malloc_context_size=30
> SHADOW_SCALE: 3
> SHADOW_GRANULARITY: 8
> SHADOW_OFFSET: 0x7fff8000
> ==2492882==Installed the sigaction for signal 11
> ==2492882==Installed the sigaction for signal 7
> ==2492882==Installed the sigaction for signal 8
> ==2492882==T0: FakeStack created: 0x7fb0a02d5000 -- 0x7fb0a0dde000 stack_size_log: 20; mmapped 11300K, noreserve=0
> ==2492882==T0: stack [0x7ffc2f49a000,0x7ffc2fc9a000) size 0x800000; local=0x7ffc2fc99588
> ==2492882==AddressSanitizer Init done
> abort: No module named toml!
> error: Command '['/data/users/wez/fbsource/fbcode/buck-out/dev/gen/scm/hg#binary/hg', 'debugedenrunpostupdatehook', '-R', PosixPath('/var/tmp/eden_test.5v9750_4/mounts/main')]' returned non-zero exit status 255.
```

Reviewed By: genevievehelsel

Differential Revision: D18038964

fbshipit-source-id: cb93229ca37e7e9d08fa3335830782b8f9f69f99
2019-10-21 10:39:53 -07:00
generatedunixname89002005307016
4c76d686a8 Update pyre version for eden
Summary: Automatic upgrade to remove `version` override and silence errors.

Reviewed By: grievejia

Differential Revision: D17956249

fbshipit-source-id: d5c8b5aa73151b3fea67aec35d70f332030da2c9
2019-10-16 16:56:29 -07:00
Xavier Deguillard
245d568520 fix rebase_test.py
Summary:
A recent change removed the revision number from the rebase output, fix the
EdenFS test to not have it too.

Reviewed By: genevievehelsel

Differential Revision: D17954310

fbshipit-source-id: 6c1db48086af4b7b138e6c3f4ef0bb362d2256f8
2019-10-16 10:38:28 -07:00
Joseph Friesen
3e0241fc87 add permission mask check to mknod unit test
Summary: add permission mask check to mknod unit test

Reviewed By: chadaustin

Differential Revision: D17880601

fbshipit-source-id: 484d05a4c4dc424504da77d0b37a4739c15f2579
2019-10-11 21:11:02 -07:00
Chad Austin
4b47257165 remove EdenConfig accessors
Summary:
Instead of having accessors for every config setting in EdenConfig,
just expose the ConfigSettings directly.

Reviewed By: fanzeyi

Differential Revision: D17847805

fbshipit-source-id: 8c6c1010c010113cf859677449797ea916f2a2a5
2019-10-11 17:55:19 -07:00
Chad Austin
8cac2bfe6a Remove dead includes in eden
Reviewed By: wez

Differential Revision: D17877514

fbshipit-source-id: e7f8ed8364bdb7a77f293cbdf4b48e8f15e64c30
2019-10-11 16:45:01 -07:00
Andres Suarez
fbdb46f5cb Tidy up license headers
Reviewed By: chadaustin

Differential Revision: D17872966

fbshipit-source-id: cd60a364a2146f0dadbeca693b1d4a5d7c97ff63
2019-10-11 05:28:23 -07:00
Joseph Friesen
df6c7804d1 enhance mknod to support regular files
Summary:
Some Unix applications (notably, nfsd) create regular files using vfs_create, which ends up invoking the `mknod` system call rather than `open`, which for historical reasons only supported socket creation with Eden. However, since Eden supports regular files, we can broaden the FUSE mknod handler to support regular files as well.

For context, see https://github.com/GoogleCloudPlatform/gcsfuse/issues/137#issuecomment-155273363

Reviewed By: chadaustin

Differential Revision: D17792424

fbshipit-source-id: 466fcbcb3bcb587e731bc8b2a3e0f1508ff1f4e4
2019-10-10 17:17:19 -07:00
Jun Wu
dcc1c59270 Update hg tests for new update --merge state
Summary: D17766371 added an `update --merge` state. Teach eden tests about it.

Reviewed By: wez

Differential Revision: D17837836

fbshipit-source-id: a95ed326bf435f7340d7910307c8c5c761812514
2019-10-09 18:22:19 -07:00
Ken Yong Quan Oung
b80e719c81 Fix type annotation for ExpectedFileSet
Summary:
## Backstory
Pyre was throwing errors in my diff (D17747558) regarding an extraneous fixme. Turns out PyreBot has been adding and removing these fixmes during version updates (see D17135557 and D16183608), so I suspect it's something to do with the Pyre version. Anyways, I figured it'd be easier to do the annotation than to remove the fixme and risk Pyre throwing the same error in a later diff.

## What I did
I added the Key type (Path) and Value type(ExpectedFileBase). mypy then started throwing an error regarding __iter__ returning the wrong type because it wanted an iterator over keys rather than values. Fixed that and added .values() to the for loop.

Reviewed By: genevievehelsel

Differential Revision: D17806135

fbshipit-source-id: c07feee33db78a9bff19ba9856a7047657b8c63e
2019-10-08 11:18:51 -07:00
Adam Simpkins
0b5a1295fc support running the hg status integration tests in CMake builds
Summary:
Update the CMakeLists.txt files to support building the hg integration tests.
At the moment this only includes one of the test files (`status_test.py`).
I have not verified if tests from the other modules pass yet or if they need
any additional tweaks to work in CMake-based builds.

Reviewed By: pkaush, fanzeyi

Differential Revision: D17678991

fbshipit-source-id: 4a5ee5a8d6039d9d2a635c7027897bbeed14f8c0
2019-10-04 08:56:38 -07:00
Adam Simpkins
8ce111ef53 support building the integration tests with CMake
Summary:
Add initial support for building and running some of the integration tests
with CMake.  For now this just runs the tests from basic_test.py, just to
confirm that most of the framework code works in CMake-based builds.

Many of the other tests should also work as well, but a few of them we may
want to disable for CMake-based builds.  e.g., a couple of the tests depend on
hypothesis, and we would need to include hypothesis as a dependency.  Some of
the tests that use systemd might also require a little more work to get
working.

Reviewed By: fanzeyi

Differential Revision: D17659026

fbshipit-source-id: 67420fda9e1021a0cddee2d385fd21e34fb2fd70
2019-10-04 08:56:38 -07:00
Genevieve Helsel
3137b65fb1 pyre-eden typing fix
Summary:
pyre-eden is mad at some diffs (D17531102, D17459971, D17252083, D17694987, D17633671, ...). I tried actually fixing this but couldn't come up with something immediately.

error here: https://our.intern.facebook.com/intern/sandcastle/log/?instance_id=36028797165385523&step_id=36028798422194913&step_index=14&name=Pyre+found+errors.

Reviewed By: wez

Differential Revision: D17703291

fbshipit-source-id: c53cde2226409ea3d7e381056a047da3da7084c6
2019-10-02 18:02:18 -07:00
Wez Furlong
fed51ee453 eden: fixup fake_edenfs tests when compiled in @mode/opt
Summary:
Force a reference to the edenfsctlPath flag, otherwise the
linker will discard it and a large number of tests will fail.

Reviewed By: simpkins

Differential Revision: D17683222

fbshipit-source-id: b7cb29e74af85b544f45a228770ad2613c8e6efc
2019-10-01 08:17:29 -07:00
Wez Furlong
d58a3c96d8 eden: remove legacy bind mount code
Summary:
This diff removes the logic that consumes the legacy bind
mount list and mounts them on startup.  That functionality has been
replaced with the eden redirect command.

Instead of performing the bind mounts in the server, the server will
now run `eden redirect fixup` to apply that configuration.

This diff also changes the behavior of performBindMounts: previously, if the
bind mount setup failed, we would tear down the entire repo mount.  Since we're
now spawning an external process, it is much more likely that something might
fail and result in a bad experience, so we no longer bail out in that case:
we'll continue and leave the bind mounts as-is.  The user can then use `eden
doctor` or `eden redirect fixup` to sort things out.

Reviewed By: simpkins

Differential Revision: D17236366

fbshipit-source-id: 8b004551a076216f0e5448942f00b5195ee18803
2019-09-30 18:57:14 -07:00
Adam Simpkins
19f2d16c33 change the scm/hg:hg target to use a sh_binary() rule
Summary:
Change the `//scm/hg:hg` target to use an `sh_binary()` rule that invokes the
`:hg_rust` binary with the proper environment so it can find its dependencies,
rather than copying the binary and all of its dependencies into a new
subdirectory.

In dev mode builds the `hg_rust` binary isn't guaranteed to work anywhere
other than its original location, due to the way that dev mode builds use
`$ORIGIN` in the binary's `RPATH` setting.  This happened to work up until now
as the hg_rust binary did not have any separate libraries, but I plan to add
one on the `chg` library.

Reviewed By: quark-zju

Differential Revision: D17109104

fbshipit-source-id: ae8bb1126969f012d1d2fb7d04e80867a310b9a8
2019-09-26 20:15:04 -07:00
Adam Simpkins
814792d584 add an --if-not-running flag to eden start
Summary:
Add a flag to cause `eden start` to exit successfully without doing anything
if EdenFS is already running.  This flag makes it slightly easier for
automation to ensure that EdenFS is running, without logging warnings if
EdenFS was already running.

I also cleaned up the error message slightly when `eden start` is used
without this flag and fails if EdenFS was already running.  Previously the
exception thrown was unhandled so it also printed a python backtrace.  Now the
code throws an exception that is caught by the higher level command line code,
so it is printed in a more user-friendly way.

Reviewed By: wez

Differential Revision: D17440486

fbshipit-source-id: d7661ef7be7159bf5542b20e99a0b5495690e5a2
2019-09-19 15:21:28 -07:00
Wez Furlong
51eaad1918 eden: chown now accepts user and group names (not just ids)
Summary: This makes it a bit more human friendly

Reviewed By: chadaustin

Differential Revision: D17249465

fbshipit-source-id: 40d5afc77ded34237e1860d5b91e9257a732e480
2019-09-17 07:29:40 -07:00
Wez Furlong
b2d7ab7fec eden: teach chown to use redirection data
Summary:
D17236366 will disable the getBindsMount thrift call and
remove the internal source of data about bind mounts.  We instead
have a more current set of data from the `redirect` command, so
tech `eden chown` to use that data.

Reviewed By: chadaustin

Differential Revision: D17249433

fbshipit-source-id: 853f24e729814c501768e9834765e1be283d6aac
2019-09-17 07:29:39 -07:00
Chad Austin
a4311562e4 build integration test helpers with open source gflags
Summary:
Integration test helpers relied on an implicit gflags include. Make
that explicit so they compile against open source gflags and glog.

Reviewed By: wez

Differential Revision: D17264335

fbshipit-source-id: e336423b71c0f15e29b0e4ad604328b7624080a8
2019-09-16 13:32:15 -07:00
Adam Simpkins
c6de7c47ee always ensure that the contents of the .eden/ directory are correct
Summary:
Make sure the contents of the special `.eden/` subdirectory are correct each
time we mount a checkout.  Before we would generally only set up the contents
of this directory if it didn't previously exist.

Now the code verifies that the contents of each symlink in this directory are
correct, and recreates the symlink if needed.

This allows EdenFS to automatically repair the contents of this directory even
if the checkout or its `clients` directory has been manually moved.

Reviewed By: wez

Differential Revision: D17279413

fbshipit-source-id: e24e7530f44fff94ebb6f67174aaf78c9b498d6b
2019-09-11 22:02:16 -07:00
generatedunixname89002005289445
9b9015c137 Update pyre version for eden
Summary: Automatic upgrade to remove `version` override and silence errors.

Reviewed By: grievejia

Differential Revision: D17255059

fbshipit-source-id: 4eb207bcefb699c1886d1f0c1511b6d26100ff0e
2019-09-09 07:41:21 -07:00
Adam Simpkins
92b770a40e fsck: extract orphaned symlink inodes as symlinks
Summary:
Update the fsck code to save any orphaned symlink inodes that it finds as
symlinks in the repair archive directory, rather than saving the contents as a
regular file.

Reviewed By: wez

Differential Revision: D17170346

fbshipit-source-id: 4cba8b27233b728114a80a327ab519b039297aea
2019-09-04 11:08:10 -07:00
Adam Simpkins
3f7e72dc3e automatically perform an fsck scan when needed
Summary:
Use the new `OverlayChecker` class to automatically scan for errors and
attempt to repair them if the overlay was not shutdown cleanly the previous
time it was used.

Reviewed By: wez

Differential Revision: D16596601

fbshipit-source-id: 9923565b101ba953e92909e502be6ef5895c5cbd
2019-09-04 11:08:10 -07:00
Wez Furlong
f09c488a03 eden: stop reporting user.sha1 in listxattr
Summary:
This was causing problems on macos where various tools
would enumerate and helpfully try to preserve attributes across
copies.  On macos this would result in appledouble metadata files
being created to track the metadata in the destination file,
which clutters up the repo and has surprising secondary effects
such as being picked up by glob operations in cmake build rules.

This diff simply stops enumerating the extended attribute.

Reviewed By: fanzeyi

Differential Revision: D17140414

fbshipit-source-id: 2924657dc75b900baf70595edfa72e5d0521a697
2019-09-03 08:04:15 -07:00
generatedunixname89002005289445
13e683608d Update pyre version for eden
Summary: Automatic upgrade to remove `version` override and silence errors.

Reviewed By: sinancepel

Differential Revision: D17135557

fbshipit-source-id: 07afef940271a277c75834892733901d070bfa5f
2019-08-30 13:37:34 -07:00
Chad Austin
e6d22284ae create treemanifest repositories in HgRepository
Summary:
The snapshot generation code and many integration tests create
repositories. By default, they were creating flatmanifest
repositories, which are on their way out. Instead, create tree-only
repos.

Reviewed By: strager

Differential Revision: D17066151

fbshipit-source-id: f99a9543440da6fd7cce0065c3cd7f91a59a02d5
2019-08-28 17:06:22 -07:00
Chad Austin
b7caa4fb5a remove flatmanifest integration tests
Summary:
Flatmanifest support is going away. Remove over 100 integration tests
for flatmanifest-only repos.

Reviewed By: fanzeyi

Differential Revision: D17064019

fbshipit-source-id: b578ca14a231f0ee1f2fee8b464038c7e2201392
2019-08-26 18:50:29 -07:00
generatedunixname89002005289445
01d06886cb Update pyre version for eden
Summary: Automatic upgrade to remove `version` override and silence errors.

Reviewed By: sinancepel

Differential Revision: D16863919

fbshipit-source-id: c76f41992b9a1a57080eed932724b65c1fd846f5
2019-08-16 14:44:25 -07:00
Adam Simpkins
2c7f65c021 fix handling of errors that occur early during mount initialization
Summary:
Update `EdenServer::mount()` to correctly handle errors that occur during the
mount `INITIALIZING` phase.  Previously the code did not add error callbacks
to the `Future` result to handle errors during initialization.  As a result we
would propagate the exception back to the thrift caller, but the `EdenMount`
object would remain in our mount point list, stuck forever in the
`INITIALIZING` state.

Reviewed By: strager

Differential Revision: D16590032

fbshipit-source-id: 9adbdf05441dad815096b195ece36f3d958c96a9
2019-07-31 20:09:46 -07:00
Chad Austin
fe64ec3874 use fb303 repo in open source build
Summary: Add a dependency from the eden open source build to the fb303 open source build and switch EdenServiceHandler to BaseService.

Reviewed By: simpkins

Differential Revision: D15528156

fbshipit-source-id: 2ca5c31dd9fcc9bac43fd399b27f33b6f2c5ebfc
2019-07-24 21:07:04 -07:00
Chad Austin
ae35e76c9c add a getDaemonInfo() thrift method
Summary:
Open source fb303 will not have getPid() or getCommandLine(), so
introduce a new method for Eden's tests.

Reviewed By: fanzeyi

Differential Revision: D16292993

fbshipit-source-id: 5cdc006ec0ee15f50a3e1cebe9b46a3ea275ff78
2019-07-17 13:47:02 -07:00
Jake Crouch
a253e8045b Fix flaky counter mount/unmount test
Summary: The CountersTest would previously fail if by chance the counters prefixed by "thrift" and "thrift_client" were accounted for between getting "counters" and "counters2", since these counters should not be modified when mounting/unmounting mounts we will just filter them out.

Reviewed By: chadaustin

Differential Revision: D16265511

fbshipit-source-id: 21af0dff345977692785136ca0333d23d5c77e0d
2019-07-17 12:16:18 -07:00
Jake Crouch
277da58973 Unregister journal stats callbacks
Summary: I found out that the journal stats callbacks that were getting registered were not getting unregistered, this diff fixes that.

Reviewed By: chadaustin

Differential Revision: D16187569

fbshipit-source-id: 8c84e1515e376ccd7036a22c06e2e6b98dc62342
2019-07-12 12:27:28 -07:00
generatedunixname89002005289445
1be6e4d957 Update pyre version for eden
Summary: Automatic upgrade to remove `version` override and silence errors.

Reviewed By: grievejia

Differential Revision: D16183608

fbshipit-source-id: 529a893a021c8101e6ad28b8d88d22d4d05aa732
2019-07-10 14:48:04 -07:00
Zeyi (Rice) Fan
312c383a9b enable logview by default
Summary: Turn on logview collecting by default. Also disable logview for Eden integration tests.

Reviewed By: chadaustin

Differential Revision: D15978960

fbshipit-source-id: 623c3be7a461e0bb9bc44924fccfdb006565fad6
2019-07-01 15:59:44 -07:00
Brian Strauch
3986ddb614 ObjectStore stats
Summary: Added the cli command `eden stats object-store` for querying the counts on what part of the object store was responsible for finding the blob or blob size (local store or backing store). This will tell us how well local and in-memory caching works for different workflows.

Reviewed By: chadaustin

Differential Revision: D15934535

fbshipit-source-id: 70345f11a51c3c6996dc001d4101744395a3d182
2019-07-01 12:49:57 -07:00
Wez Furlong
482f18c982 eden: add .eden-redirections configuration
Summary:
This diff adds a single repo-wide `.eden-redirections` file that is used to
record the redirection configuration for the repo.

The redirection configuration code knows to look at this file and fold it in to
the effective configuration; the legacy bind mounts are applied first, then the
repo redirection configuration and then the user specified redirections.

The intent is that a `post-update` hook will invoke `eden redirect fixup` to
apply the configuration from the repo, and to have the eden daemon also
trigger that after (re-)mounting the repo.

In the future we can extend this to allow different profiles to be enabled
or disabled, but for now this is the minimum viable product.

Reviewed By: strager

Differential Revision: D15867225

fbshipit-source-id: b0a95936dd28283de6c7439ca8e503caef4e7247
2019-06-25 18:42:38 -07:00
Wez Furlong
66eb606372 eden: add eden redirect subcommand
Summary:
This is part of the effort to make our bind-mount configuration more
visible and easier to change.

The idea is to generalize the concept of redirection and add a command to help
manage it.

The `eden redirect add` subcommand allows creating one of two different kinds
of redirection:

* `bind` - allocate some space using `mkscratch` and mount it into the repo
* `symlink` - allocate some space using `mkscratch` and create a symlink
  that points to it from the repo

On Linux we use bind mounts to implement `bind` but on macOS, which doesn't
have a bind mount concept, we create a sparse disk image file that can grow
to match the size of the disk on which it is created (in practice these are a
7-15MB in size to start and grow as the user stores data into them).

The `eden redirect del` subcommand allows removing a redirection, including
the legacy `bind-mounts` configuration from `.eden/client/config.toml`.

The `eden redirect list` subcommand lists the effective set of redirections,
both from the new redirections configuration and the legacy `bind-mounts`
configuration, along with their state.

The `eden redirect fixup` subcommand iterates over the effective set of
redirections and can remove and reinstate any that are in a broken state.

Reviewed By: strager

Differential Revision: D15707319

fbshipit-source-id: a5dd8c44c9f748482d7b48855b1305d44267885c
2019-06-25 18:42:38 -07:00
Zeyi (Rice) Fan
a38b05612d concurrently importing blobs from Mercurial and Mononoke
Summary: This diff takes care of importing blob from Mononoke and Mercurial at the same time, also improves the name situation in the statistics counters.

Reviewed By: strager

Differential Revision: D15768557

fbshipit-source-id: 10cf831b1ae6dc9e6b91f1e96508c4fa92583743
2019-06-24 13:45:02 -07:00