Commit Graph

2672 Commits

Author SHA1 Message Date
Adam Simpkins
9e832076a7 enable debug subcommands on Windows
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
2019-07-22 19:05:26 -07:00
Adam Simpkins
6b86111798 simplify arguments to make-client.py
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
2019-07-22 19:05:26 -07:00
Adam Simpkins
4007597729 avoid importing curses on Windows
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
2019-07-22 18:46:37 -07:00
svcscm
e76c7677b6 Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: d169039045a0da5ef19a2c8b5a4da1ae57db346e
2019-07-22 18:46:37 -07:00
svcscm
6516b5259a Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: dfbefe2c9b6672a6c2f3874388675e62653fc4d4
2019-07-22 14:34:30 -07:00
Brian Strauch
4319ad2cd0 Aesthetic fixes
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
2019-07-22 13:37:38 -07:00
svcscm
d75b5175cb Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: ef9c5003aaedd625cdf92e67f386eea86c9a611a
2019-07-22 13:37:38 -07:00
svcscm
382be9f974 Updating submodules
Reviewed By: zpao

fbshipit-source-id: 4466d50a2bec52062f45a8c4c72a2267c7bcae28
2019-07-22 03:24:25 -07:00
svcscm
0e97fcd7f7 Updating submodules
Reviewed By: zpao

fbshipit-source-id: c5bf64b8b93b36905ddca2a8eea3cc152edcb769
2019-07-21 02:40:38 -07:00
svcscm
0581ebe50c Updating submodules
Reviewed By: yns88

fbshipit-source-id: 92d7ec4f6d748cb935e5c92678ed36aa69cf7457
2019-07-20 16:25:46 -07:00
svcscm
9491a77ccc Updating submodules
Reviewed By: yns88

fbshipit-source-id: 9983679d64eb8706329a211df791e6d79597fc40
2019-07-19 15:52:26 -07:00
Adam Simpkins
bccd9b63d7 update CMakeBuilder to raise an exception if we cannot find CMake
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
2019-07-19 15:30:35 -07:00
Adam Simpkins
007172af96 normalize the scratch path
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
2019-07-19 15:30:35 -07:00
Adam Simpkins
fc26a35247 cache results of path_search()
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
2019-07-19 15:30:35 -07:00
Adam Simpkins
62a914c93d rename the eden thrift wrapper library to match the python namespace
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
2019-07-19 15:30:35 -07:00
Adam Simpkins
b46c3f4a6d rename the eden/dirstate.py module to match the python namespace
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
2019-07-19 15:30:34 -07:00
svcscm
630775fd70 Updating submodules
Reviewed By: yns88

fbshipit-source-id: 43d94c721e020167895eb832fbe9a3e98ce37fbc
2019-07-19 12:47:20 -07:00
Adam Simpkins
e6b4bc73ea wait to copy the command line until after we drop privileges
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
2019-07-19 12:39:57 -07:00
svcscm
67c654d15d Updating submodules
Reviewed By: yns88

fbshipit-source-id: 15e4aff7f4630285f43bac74df3c50194cc18cd3
2019-07-19 12:39:57 -07:00
svcscm
148580174f Updating submodules
Reviewed By: yns88

fbshipit-source-id: c3229d1b78ea7ad61dc4a0cf4d55ccade2d702a9
2019-07-19 10:32:36 -07:00
Puneet Kaushik
5d236d1342 Pass commandline to EdenServer to fix build
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
2019-07-19 08:47:52 -07:00
svcscm
f1d84fb189 Updating submodules
Reviewed By: yns88

fbshipit-source-id: f37591e391b8daf879b8c75dec866120b6d58f0a
2019-07-19 02:51:43 -07:00
Chad Austin
59784a6d52 fix status checks when running with new CLI and older edenfs process
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
2019-07-18 20:48:44 -07:00
svcscm
a4dabcc640 Updating submodules
Reviewed By: yns88

fbshipit-source-id: 87bb7a817dea65783436d6d6dfbbd492724d20a7
2019-07-18 20:48:44 -07:00
svcscm
707a12847c Updating submodules
Reviewed By: yns88

fbshipit-source-id: 262c788981a395fa0ee4dd9757ebe7ce5bdb47df
2019-07-18 13:09:08 -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
svcscm
e337dcaf27 Updating submodules
Reviewed By: yns88

fbshipit-source-id: 29289796cc72a4c11300513af68fc6cdb08230cb
2019-07-17 13:47:02 -07:00
svcscm
6bf1a34c3b Updating submodules
Reviewed By: yns88

fbshipit-source-id: c375b60568bdec15234e9530146f6f06a209ba01
2019-07-17 12:39:59 -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
Brian Strauch
64ee269b92 eden top sort by time
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
2019-07-17 11:36:41 -07:00
Brian Strauch
a6f952a900 eden top persistence
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
2019-07-17 11:36:40 -07:00
Chad Austin
a3acb9bb15 transitively carry thrift dependencies forward
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
2019-07-17 11:29:24 -07:00
svcscm
dacaa17181 Updating submodules
Reviewed By: yns88

fbshipit-source-id: ac191ab48709e8fe9a7f2ddbe6379895b7cb134a
2019-07-17 11:29:23 -07:00
svcscm
02610e0140 Updating submodules
Reviewed By: yns88

fbshipit-source-id: 449a439249313d383db0db1b7f27667ac8db401a
2019-07-17 01:56:44 -07:00
Chad Austin
d2ab436589 add fbcode_builder manifest
Summary: Add a manifest and CMakeLists.txt for building fb303 with cmake.

Reviewed By: wez

Differential Revision: D15480895

fbshipit-source-id: d47f6ef9b9383b79b31a6170c7d4c9e8337de4d8
2019-07-17 01:11:15 -07:00
Brian Strauch
700adec248 Readability refactor
Summary: Made the code more simple/readable by simplifying logic where it made sense.

Reviewed By: chadaustin

Differential Revision: D16187736

fbshipit-source-id: 64c1b6f81e2e8f6a732c13f6ee5cf81f5f6e0524
2019-07-16 18:36:07 -07:00
svcscm
9f66c56ace Updating submodules
Reviewed By: yns88

fbshipit-source-id: cbb4012047891eb18adbb69aa15db27e628433c9
2019-07-16 18:36:07 -07:00
svcscm
9b339f91de Updating submodules
Reviewed By: yns88

fbshipit-source-id: 30926ecb8fabee3f020ae183bb568a11145bcada
2019-07-16 13:42:34 -07:00
Chad Austin
4a3e7b5648 fbcode_builder: use build interface generator expression for thrift include directories
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
2019-07-16 12:25:35 -07:00
svcscm
efb502f0fd Updating submodules
Reviewed By: yns88

fbshipit-source-id: 75277ba2e7c0d7e654214cd59ee8cd6ab3e85b59
2019-07-16 12:25:35 -07:00
svcscm
78c7e23913 Updating submodules
Reviewed By: yns88

fbshipit-source-id: 769f1044e06aa7324bbee9865e526b2c7ed21c13
2019-07-15 16:13:15 -07:00
Brian Strauch
fcbc6cf349 Variable name refactor
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
2019-07-15 14:30:26 -07:00
Brian Strauch
c8e22582f0 Function breakdown part 3
Summary: Broke down update-related code, and reordered a few functions.

Reviewed By: strager

Differential Revision: D16184993

fbshipit-source-id: 9696126aed7f37f2d50775cc7ba3515fc363ffc5
2019-07-15 14:30:26 -07:00
Brian Strauch
9bf2925a59 Function breakdown part 2
Summary: Started to break down rendering code.

Reviewed By: strager

Differential Revision: D16184562

fbshipit-source-id: 8a2e8c93e92d5f957a270d77fe4477ecfe8b58a8
2019-07-15 14:30:26 -07:00
Brian Strauch
faa7057aeb Function breakdown part 1
Summary: The first attempt at breaking down the 100+ line refresh function

Reviewed By: strager

Differential Revision: D16184217

fbshipit-source-id: f380034a617faac7bb45437cb55378b11d9b9c8f
2019-07-15 14:30:26 -07:00
Brian Strauch
e16179b89b Top class
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
2019-07-15 14:30:25 -07:00
svcscm
f42b900ec5 Updating submodules
Reviewed By: yns88

fbshipit-source-id: 713f57464f3766dc490e51e7f13e4fca19f66c35
2019-07-15 14:30:25 -07:00
svcscm
5fd6e399f3 Updating submodules
Reviewed By: zpao

fbshipit-source-id: 8191441885644bc989cc8604b3a28e16f0a46b8d
2019-07-15 10:04:13 -07:00
Andres Suarez
00c63ba114 Rename PRIVATEKEY1 to PRIVATEKEY
Differential Revision: D16244339

fbshipit-source-id: 7eb965a3ce62aca8d76aebdb6e722b63154da9fd
2019-07-15 09:47:50 -07:00
svcscm
8ce720e77a Updating submodules
Reviewed By: zpao

fbshipit-source-id: b9a0ecc044e4a4c4ba15bc3847033bf995536b76
2019-07-13 15:24:29 -07:00