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: Adds a description for `eden trace hg` which outlines the meaning of the different emojis used
Reviewed By: kmancini
Differential Revision: D35473126
fbshipit-source-id: 32c67aa728cf2065255cfbb0227eb52f74d672df
Summary: I did submit another fix to upstream, then I backported it on top of 0.1.11.
Differential Revision: D35494891
fbshipit-source-id: 4ba29ba35e556926b30e9c47569381d506d1b8a7
Summary: 0.3.10 adds a new EnvFilter builder that I would like to use. :)
Reviewed By: wqfish
Differential Revision: D35473723
fbshipit-source-id: df31dad09c8f8fc9c27a43c85b5d6ac8f97d69a3
Summary:
We have seen that sometimes the a client sends us nfsv4 requests with the
nfsv3 version on it.
We fail to parse those.
It's likely the kernel that is sending us that event, but technically any client
could connect to us, so we don't know that for sure.
Let's make sure we log if we see more than one client connected to us. so that
we can confirm if this is the kernel or not.
We should probably also not let non kernel clients connect to us. But I have not
figured out how to do that. tbd
Reviewed By: fanzeyi
Differential Revision: D35448531
fbshipit-source-id: e0810c8961c18b305b80bb874ae4f6aee9583d07
Summary:
ASIC homedirs are stored on NFS. Eden/hg's new caching solution by default places contents in the home directory which can lead to concurrency issues when reading/writing to this shared NFS cache dir, especially for CI (which all runs as the same user).
To mitigate, we can set XDG_CACHE_HOME to point to a non-NFS directory where cached contents should be written. However, Eden only propagates these allowlisted environment variables throughout the lifetime of the EdenFS daemon. Let's ensure we can also pass XDG_CACHE_HOME through to the daemon process as well.
Reviewed By: chadaustin, mrkmndz
Differential Revision: D35402429
fbshipit-source-id: 0ce5b71838bcf384ea20427cf01b2fe9a107f69c
Summary:
EdenFS does support answering a status query between 2 commits, by using it, we
can avoid forking to Mercurial which is a very expensive operation. We can also
benefit from EdenFS computing these concurrently instead of running these
status sequentially.
The code is almost identical to the one present in scm/Mercurial.cpp with some
copy/pasted bits. The main difference being the lack of LRU caches. I've
decided against these LRU caches as I've noticed Watchman consumming a large
amount of memory due to the status call potentially containing a very large
amount of strings. Since the cost of asking EdenFS for status should be
significantly less than Mercurial (no Python startup time, no Python code,
etc), not having caches is likely OK.
Lastly, we still fallback to the `hg status` path when alwaysIncludeDirectories
is set to avoid complexifying the code.
Reviewed By: chadaustin
Differential Revision: D35445851
fbshipit-source-id: ae939b71e8f6c60e5724cde5fc42753fddae2570
Summary: We were limiting the minidump uploads to 977KB. This allows the whole minidump file to be uploaded instead.
Reviewed By: fanzeyi
Differential Revision: D35449385
fbshipit-source-id: f4d8966fee5eda312639adbc476bf9f72c1aec43
Summary: By default, we collect every minidump from the last week. This can be a lot. Let's limit the collection amount to 3.
Reviewed By: fanzeyi
Differential Revision: D35449132
fbshipit-source-id: 158f22b6d4083958b26f34bdfc56ba3099aa0be6
Summary: reuse the string from earlier in the function
Reviewed By: kmancini
Differential Revision: D35334023
fbshipit-source-id: 61fc2989d5ca56eaa9c703a1725106ebb60f295f
Summary: Add the ability to enable/disable notifications from the E-Menu
Reviewed By: chadaustin
Differential Revision: D35269912
fbshipit-source-id: d51e224ea4fbf7c4c700573f7f672641a3961883
Summary: the logic used before was wrong. Fix it so that we handle all cases correctly (before we ignored the config option to turn off notifications but handled notification frequency correctly)
Reviewed By: chadaustin
Differential Revision: D35270735
fbshipit-source-id: d0be2e202fb37062e2ed73c909b9bf0e8251b343
Summary: adds a general purpose notification method (send a notification with any title/body combo)
Reviewed By: chadaustin
Differential Revision: D34453071
fbshipit-source-id: 886fcca310c82ca50340570ecebf7182e9a72f7d
Summary:
An old development GUID was used. This caused some users to be unable to start Eden with the E-Menu enabled because the GUID was associated with another executable file path. See here: https://docs.microsoft.com/en-us/windows/win32/api/shellapi/ns-shellapi-notifyicondataa
"The binary file that contains the icon was moved. The path of the binary file is included in the registration of the icon's GUID and cannot be changed. Settings associated with the icon are preserved through an upgrade only if the file path and GUID are unchanged. If the path must be changed, the application should remove any GUID information that was added when the existing icon was registered. Once that information is removed, you can move the binary file to a new location and reregister it with a new GUID. Any settings associated with the original GUID registration will be lost.
This also occurs in the case of a side-by-side installation. When dealing with a side-by-side installation, new versions of the application should update the GUID of the binary file."
Reviewed By: chadaustin
Differential Revision: D35302987
fbshipit-source-id: 8c898a93047ae30b97853ca31400dd1c927a39f4
Summary:
Shell_NotifyIcon(NIM_ADD) fails if there's a stale icon in the notification tray. This caused Eden to crash upon startup.
Instead of blindly adding each time, We should first call Shell_NotifyIcon(NIM_DELETE) to ensure any stale icons are removed.
We should also avoid crashing EdenFS if NIM_ADD fails.
Reviewed By: chadaustin
Differential Revision: D35302853
fbshipit-source-id: cf3f3062f96eada83fcde54616b2407e13779b0c
Summary: The Cmake build didn't properly link the E-Menu resource file. That caused EdenFS to crash on startup if users had the E-Menu enabled.
Reviewed By: chadaustin
Differential Revision: D35288550
fbshipit-source-id: 27f2f29a53ab2717fd9fd874a2cd89b81ccbb9b7
Summary: This was set to default to true in `EdenConfig.h` but was not set here
Reviewed By: chadaustin
Differential Revision: D35440139
fbshipit-source-id: cf3102bea40ae639c767dd6488924fd843556d48
Summary:
One of the issue some users have seen on Windows on a regular basis is when the
content of files on disk differs from what EdenFS thinks the content should be.
This leads to `hg status` not reporting the correct output and sometimes random
build failures. At first, let's try to detect these occurences. This diff focus
on only computing the sha1 of files that have been fully read already as
reading other files would force EdenFS to populate them on disk.
Reviewed By: kmancini
Differential Revision: D34776469
fbshipit-source-id: d04d31f7f7bfba85cbfbf68ce55f5490bbaec45f
Summary:
On Windows, we've had cases where EdenFS disagrees with the state of the
filesystem. EdenFS may believe that some files are materialized, while they
aren't present on disk. This checker should ensure that we detect these cases.
In a future diff, automatic remediation will be added.
Reviewed By: kmancini
Differential Revision: D34775506
fbshipit-source-id: 3eaa1761fd8acd0fbbfd9f965b35c712c28f2f97
Summary: changes `ImportPriorityKind` and members in `ObjectFetchContext` to `uint8_t`, these should be minimized for use in `HgImportTraceEvent`
Reviewed By: xavierd
Differential Revision: D35269554
fbshipit-source-id: f36752b41e653338704316a8a75e2bbc72317e4a
Summary:
Pulling in this patch until the **[patch](f4f439ca0c)** ~~is approved, lands, and~~ makes it into crates.io
NOTE: I feel a little awkward patching ***everyone*** here — I suspect I'm the only that cares.
**[I attempted to add a "tar-symlink" package pinned to 4.38](https://www.internalfb.com/intern/paste/P491303978/?view=diff)**, with the patch applying to that,
but and then updating only `dotsync2` accordingly, but that results in the same cascading changes
seen here; I suspect due to the patch applying to package "tar" (since "tar-symlink" isn't a thing).
Reviewed By: zertosh
Differential Revision: D35350696
fbshipit-source-id: a5653f3aed0eb5bc5424906d24a53ec2c2b79211
Summary:
Stack context:
To get a build setup for edencommon I picked an eden library to move over
to edencommon.
I picked process name cache. I would like to have this library in watchman
so that I can log spawning process command lines as well as client command
lines.
This diff:
finally actually moves over process name cache
Reviewed By: chadaustin
Differential Revision: D34218020
fbshipit-source-id: 1e51ec6524d1e67a1dfd4d03a8189f882f5d3ff1
Summary:
Stack context:
To get a build setup for edencommon I picked an eden library to move over
to edencommon.
I picked process name cache. I would like to have this library in watchman
so that I can log spawning process command lines as well as client command
lines.
This diff:
process name cache has some benchmark tests so I am moving benchharness over.
Reviewed By: chadaustin
Differential Revision: D34218024
fbshipit-source-id: 260730adb7e5d4a3131e72fa2f03cc4c5066c075
Summary:
Stack context:
To get a build setup for edencommon I picked an eden library to move over
to edencommon.
I picked process name cache. I would like to have this library in watchman
so that I can log spawning process command lines as well as client command
lines.
This diff:
process name cache depends on StringConv.h so I am moving that over.
Reviewed By: chadaustin
Differential Revision: D34218023
fbshipit-source-id: d928768a6b5f737a1c546c6f3c73acc5535fc44c
Summary:
Stack context:
To get a build setup for edencommon I picked an eden library to move over
to edencommon.
I picked process name cache. I would like to have this library in watchman
so that I can log spawning process command lines as well as client command
lines.
This Diff:
process name cache depends on WinError.h so I am moving that over.
Reviewed By: chadaustin
Differential Revision: D34218026
fbshipit-source-id: 064f5bfc50c4ba120c887b01ff1f0a3e0543d498
Summary:
To get a build setup for edencommon I picked an eden library to move over
to edencommon.
I picked process name cache. I would like to have this library in watchman
so that I can log spawning process command lines as well as client command
lines.
Diff:
process name cache depends on Handle.h so I am moving that over.
Reviewed By: chadaustin
Differential Revision: D34218022
fbshipit-source-id: 05c42eb0fa8be78fd001249c0c09ed7fa515ea44
Summary:
Stack context:
To get a build setup for edencommon I picked an eden library to move over
to edencommon.
I picked process name cache. I would like to have this library in watchman
so that I can log spawning process command lines as well as client command
lines.
Diff:
process name cache depends on Synchronized so I am moving that over in this diff.
Reviewed By: chadaustin
Differential Revision: D34218021
fbshipit-source-id: 528e7b4b12476b33a294a342e6e4ee13c92c7361
Summary:
I've just hit this, and it looks like this is just an omission. In
PrjDeleteFile above, we check for both of these status, let's do the same here.
Reviewed By: chadaustin
Differential Revision: D35320619
fbshipit-source-id: 34d24035dfee09de809d13371d15b8ba93be4bb5
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:
We have a few error reports of
```
Reviewed By: xavierd
Differential Revision: D35264311
fbshipit-source-id: 4a601a8b8da7aa89eede94060105ebffaf777e83
Summary:
Symlink creation on Windows is non-atomic, that is the symlink is first created
as a directory, and then a reparse tag is added to it. For EdenFS, this means
that when the notification thread queries the filesystem, it may either see
that the symlink is a directory, or a symlink, depending on whether EdenFS wins
the race.
If EdenFS finds out that this is a directory, it will try to recursively add
every file and directory under it to the inode hierarchy, which can be
extremely slow. Some users have noticed new clones taking many minutes to
answer a simple `hg status` query due to that query waiting on all pending
notifications to be completed and EdenFS is still processing the symlink.
To solve this in an ad-hoc way, we can force a symlink to be created atomically
by first creating it outside of the repository, and then moving it in the
repository. The rename operation is atomic, and thus EdenFS always detect it as
a symlink!
Reviewed By: jtbraun
Differential Revision: D35263809
fbshipit-source-id: e6794976551838bfaba994e83f610d6c776422a2
Summary:
I'm going to use this crate to prepare and parse git config on git servers.
I had to add functionality to the crate: https://github.com/Byron/gitoxide/pull/372
I backported it to the version that currently is the latest one on crates.io.
Reviewed By: dtolnay
Differential Revision: D35283393
fbshipit-source-id: 89094a5077e982a2988e0de4e5b379304a080297
Summary:
This adds an "About Eden" section to the E-Menu which lists the current running EdenFS version and uptime.
We approximate the uptime by passing chrono::now to the Windows Notifier when we create it (it should be very-very-very close since we create the Notifier when we start the Daemon. Therefore, the uptime of the two should be equal).
Reviewed By: chadaustin
Differential Revision: D34968215
fbshipit-source-id: 726d1229b880e2ae10c2950ac4a50f36badfe9db
Summary: This diff allows users to enable a debug menu inside the eden menu.
Reviewed By: chadaustin
Differential Revision: D34585649
fbshipit-source-id: 01d24000ddb0141757fef45c2b7fc8ac7b438fe3
Summary: Windows builds complain about mainEventBase being unused because of the #ifndef. Add a [[maybe_unused]] to silence the compiler.
Reviewed By: kmancini
Differential Revision: D35240507
fbshipit-source-id: c06d945530d6a881878c9952bf0900ec50966e62
Summary:
In the NFS protocol, the client does not completely resolve permissions based
on the access bits in the mode field of stat.
Clients make a special call into NFS, ACCESS, to check if a certain user has
permissions to perform some operation on a file or directory.
Access was perviously unimplemented for NFS and returned open permissions.
This fully implements the access procedure.
Reviewed By: xavierd
Differential Revision: D34632815
fbshipit-source-id: eda39e02c12c189cd1fc3a32dbe864f00d2c3458
Summary:
Similarly to macOS where we collect a `sample` of EdenFS, it is also a good
idea to do the same for Windows. To do this, a debugger is attached to EdenFS
and the stacktraces of all the threads are collected.
Reviewed By: genevievehelsel
Differential Revision: D34400523
fbshipit-source-id: cb3f930fbba465c4ae00166e6e1816461a6072a4
Summary:
If an NFS client sends us an improperly formatted request, EdenFS crashes.
This is dangerous because any process on the machine could send us an NFS
request and this could crash eden.
Eden should be resilient to badly formatted requests/requests it fails to
parse.
This will make debugging failed requests harder as errors will be less
obvious to the user, but it will also allow users to keep using their mount
after a failed request.
Reviewed By: xavierd
Differential Revision: D34981438
fbshipit-source-id: 107de2324b1dc145bd426398614ee76b72c5c446
Summary:
This XDCHECK isn't really bogus, but ProjectedFS is sometimes closing
directories that were never opened.
Reviewed By: genevievehelsel
Differential Revision: D35030993
fbshipit-source-id: fe764a89b06c32deaa1412b4d5fa4ee63fd94866
Summary:
Thanks to ImmediateFuture not deferring anything in the fast path,
recursivelyAddAllChildrens may recursively add all the childrens without
sleeping or returning control to the executor. The downside is that directories
can be held open for a long time, and on Windows, this would prevent subsequent
operations on the directories themself.
Unity in particular is found of creating directories, adding files, renaming
the directory, etc in a very fast fashion. And in some cases, EdenFS would hold
the directory opened for too long, raising an error in Unity which would affect
users. To reduce this, we can simply collect all the directory entry names
first and then recursively handle them after the directory is closed.
Reviewed By: chadaustin
Differential Revision: D35018455
fbshipit-source-id: 8f074ff794c64d2a65607fc0829ec444b80ddb9a
Summary:
This opens the directory and reads all the names from it, excluding "." and
"..". On Windows, this function is written in such a way that it allows
concurrent deletion/renaming of the directory while this is running.
Reviewed By: chadaustin
Differential Revision: D35067144
fbshipit-source-id: 20fb8f9ac8a49970cb360eb3307e86d846760e98
Summary:
The PathFuncs.h header is included pretty much everywhere in EdenFS, and thus
its compile speed affects the entirety of EdenFS. Unfortunately, the
boost::filesystem dependency is pretty large and is thus slowing down the
compilation.
Since the few methods that rely on Boost are only used in one place, let's
instead inline the use of Boost in these places.
Reviewed By: chadaustin, fanzeyi
Differential Revision: D35058316
fbshipit-source-id: b80a39f1575acc0fa4b9e64eb5375b95b4b421da