Summary:
Enable the `edenfsctl debug` subcommands on Windows.
The `overlay` subcommand is the only debug subcommand that requires modules
not available on Windows. The overlay code uses the `fcntl` module for
locking the overlay. However, EdenFS on Windows does not use the overlay
directory structure used on Linux and Mac, so this subcommand isn't relevant
on Windows.
This moves the `overlay` subcommand to its own module, and changes the code to
avoid importing it on Windows. This lets us enable the rest of the debug
subcommands on Windows.
Reviewed By: pkaush
Differential Revision: D16354620
fbshipit-source-id: ee7ea01fa3a21018850f5ba590eb143d7a9718cf
Summary:
Update `make-client.py` so that it does not require the python interpreter to
be explicitly specified on the command line. It now uses `sys.executable`
as the default python interpreter if one was not specified on the command
line.
Also add a `--output` flag to control the output file path.
Reviewed By: pkaush
Differential Revision: D16388625
fbshipit-source-id: 6587acb0ea8c083faf76f74c77c7c09ef0b62865
Summary:
The `curses` module is part of the standard Python library on Linux and Mac,
but not on Windows.
This updates the CLI's `ui` module to avoid trying to import the `curses`
module on all platforms. This adds a new `WindowsOutput` class for Windows.
For now this class is just a stub that uses the existing `PlainOutput` class
instead.
Reviewed By: pkaush
Differential Revision: D16354626
fbshipit-source-id: 262637030febd6893a94e19712a07cd3d5d39bbb
Summary:
Centered clock between title and hostname
Removed bar
Defaulted update speed to 1s, with command line option to change
Gave more/less space to certain columns
Decreased padding to 1 character
Reviewed By: chadaustin
Differential Revision: D16195428
fbshipit-source-id: 6dbd6710727bcd3e65e87fc5bd269a39507dca9b
Summary:
If `path_search()` returns that CMake is not available, raise an Exception and
fail the build. This makes the failure somewhat easier to to identify.
Without this the code would continue and would try to invoke `subprocess` with
a value of `None` in the command argument list. This error is slightly harder
to debug, since it isn't clear which command argument or environment variable
is not a string.
Reviewed By: chadaustin
Differential Revision: D16354623
fbshipit-source-id: be972b02cb13bc70db0f867da70e5bf4c6cec46d
Summary:
The scratch path is used as part of the hash computation for each project. We
need to make sure this path is always normalized to ensure that we compute the
hashes consistently.
Reviewed By: chadaustin
Differential Revision: D16354624
fbshipit-source-id: 39b5362620bdc247cd7e7f1333dac319b354dc6f
Summary:
getdeps currently ends up calling `path_search()` repeatedly searching for
various C/C++ compilers in $PATH. It ends up doing this multiple times for
each dependency as it computes the project hashes. This updates the
`path_search()` function to cache its results so that we don't keep performing
the same searches on the file system over and over again.
Reviewed By: chadaustin
Differential Revision: D16354625
fbshipit-source-id: 116293bd2f636632517d26436b2332e6c10624f1
Summary:
We install the python files under `eden/fs/service` in a package named
`eden/thrift` in the built python binaries that use these modules. This
moves the source files into an `eden/thrift` subdirectory so that the source
directory layout more closely matches the final binary layout.
This will make it easier to run several of Eden's Python-based tools directly
from the source tree, without having to do as much directory layout
transformation. This is particularly helpful on platforms like Windows, which
don't currently have an equivalent of "live PARs" which can be run from the
source tree without requiring a rebuild after each file edit.
Reviewed By: chadaustin
Differential Revision: D16354622
fbshipit-source-id: 4b58cc96451b1ee5441714aaf74f5e3b6ada9eaa
Summary:
We install `eden/py/dirstate.py` as `eden/dirstate.py` in built python
binaries that use this module. This moves the source file into an `eden/`
subdirectory so that the source directory layout more closely matches the
final binary layout.
This will make it easier to run several of Eden's Python-based tools directly
from the source tree, without having to do as much directory layout
transformation. This is particularly helpful on platforms like Windows, which
don't currently have an equivalent of "live PARs" which can be run from the
source tree without requiring a rebuild after each file edit.
Reviewed By: chadaustin
Differential Revision: D16354627
fbshipit-source-id: 578748e76b730db33cf3ea555df48aa94d15019f
Summary:
Let's minimize the amount of work we do before dropping privileges.
This shouldn't matter too much, since it is just a memory allocation and copy,
but I think we should keep the `dropPrivileges()` call as the very first thing
in `main()` to help prevent people from adding new functionaliy before it in
the future.
This also adds some block comments to help encourage people to only put code
after the "Root privileged dropped" comment moving forwards.
Reviewed By: chadaustin
Differential Revision: D16371783
fbshipit-source-id: 1ce5115bfa71565f0fe12ac9c9442bddb771ed48
Summary: In a previous diff we added the support to pass the command line to EdenServer but missed from the Windows main(). Until we unify the main function we need to add it at two places.
Reviewed By: simpkins
Differential Revision: D16370228
fbshipit-source-id: 47b9842fbca709e1d3c832db3d82765f2e5f8930
Summary:
I made the mistake of migrating the Thrift API for edenfs process
checks without a fallback for older edenfs running processes.
If getDaemonInfo() is not available, fall back on getPid().
Reviewed By: strager, pkaush
Differential Revision: D16365848
fbshipit-source-id: aee5c43c8c40db9a38fef7ca601f7639daa4adb8
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
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
Summary: When processes make FUSE calls, put them at the top of the list of processes. Also resolved an error where the curses library would refresh improperly and draw white lines across the screen.
Reviewed By: chadaustin
Differential Revision: D16194691
fbshipit-source-id: 9ed0515786d53181b7c3e9497c5d6ebc92f51682
Summary:
`eden top` used to refresh its data every 2 seconds, now process data accumulates and never leaves the screen (unless it is outdated and gets pushed off the screen by other processes).
For the old functionality, you can run `eden top -e` or `eden -top --ephemeral` which constantly refreshes the screen.
{F166770061}
Reviewed By: chadaustin
Differential Revision: D16157909
fbshipit-source-id: 5d739b4c92d1472337301f34dbf6b1f21e10b81b
Summary: eden.thrift includes fb303_core.thrift, so any cmake target that depends on eden.thrift should pull in fb303_core.thrift's include directories and libraries. Implement that machinery in CppThriftLibrary.cmake.
Reviewed By: wez
Differential Revision: D16062657
fbshipit-source-id: d5d962960e767a138a9b634a12aebccf72d6ef43
Summary: Add a manifest and CMakeLists.txt for building fb303 with cmake.
Reviewed By: wez
Differential Revision: D15480895
fbshipit-source-id: d47f6ef9b9383b79b31a6170c7d4c9e8337de4d8
Summary: Made the code more simple/readable by simplifying logic where it made sense.
Reviewed By: chadaustin
Differential Revision: D16187736
fbshipit-source-id: 64c1b6f81e2e8f6a732c13f6ee5cf81f5f6e0524
Summary:
Fix an error about source directories being included in the include
path in add_thrift_cpp2_library. I don't know why this was failing for
fb303 and not for other projects, but adding a generation expression
appears to fix the issue.
Reviewed By: strager
Differential Revision: D15725024
fbshipit-source-id: 6c02fed6c6703733cf9e0b130c0f90b70e3ea300
Summary: Changed all variables to snake case, and made variable/function names more uniform/simplistic
Reviewed By: strager
Differential Revision: D16185688
fbshipit-source-id: f4cddcf264c7a0e31317288deb2b517a32046c37
Summary: Broke down update-related code, and reordered a few functions.
Reviewed By: strager
Differential Revision: D16184993
fbshipit-source-id: 9696126aed7f37f2d50775cc7ba3515fc363ffc5
Summary: Started to break down rendering code.
Reviewed By: strager
Differential Revision: D16184562
fbshipit-source-id: 8a2e8c93e92d5f957a270d77fe4477ecfe8b58a8
Summary: The first attempt at breaking down the 100+ line refresh function
Reviewed By: strager
Differential Revision: D16184217
fbshipit-source-id: f380034a617faac7bb45437cb55378b11d9b9c8f
Summary: Made a top class to better handle state within `eden top`. Right now, the only field is `running`, but later we will want to track the processes and rows.
Reviewed By: strager
Differential Revision: D16188183
fbshipit-source-id: 38e27dc87353f65212fcb47544707a8e34ba4c68