Commit Graph

2693 Commits

Author SHA1 Message Date
Jake Crouch
c6253c48e0 Set up keeping track of "global" Journal Stats in EdenStats
Summary: Set up the infrastructure to add in Timeseries to the journal so that we can add in stats for the journal that relate to the whole process. For example, allow us to add in a truncatedRead TimeSeries easily as done in D16017968

Reviewed By: chadaustin

Differential Revision: D16461081

fbshipit-source-id: 964ff32e62aed0369da434793491b857c136b074
2019-07-25 23:36:43 -07:00
Jake Crouch
a290a6c525 Fix eden stats duration mismatch issue
Summary: Not checking whether journal duration was None caused old Edens to have an error when running "eden stats", this should fix it such that it does not print out duration info if Eden does not have it.

Reviewed By: strager

Differential Revision: D16502597

fbshipit-source-id: 1e28732208a3ad660b021b9e19c2694302a569f4
2019-07-25 22:43:08 -07:00
svcscm
564f7a2a30 Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: 4b80623993c7a01ceee7c74b166752fb97884c4d
2019-07-25 18:20:10 -07:00
svcscm
748d21b4ce Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: 9e69786863ee63cd2d43c6c93f546a1665626a09
2019-07-25 18:20:10 -07:00
svcscm
a23273fdac Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: 50739ef295969c67f5c49bac91d803736ec47cab
2019-07-25 12:26:01 -07:00
Chad Austin
b1f76c3137 break dependency on fboss common/ stubs
Summary: Eden no longer depends on fboss/common/ 🌈

Reviewed By: simpkins

Differential Revision: D16062879

fbshipit-source-id: e6cf6eed408ca6e688ff2b9b532b15aa96902ac1
2019-07-24 21:44:04 -07:00
Chad Austin
7ff2a8237b remove EDEN_HAVE_STATS flag
Summary: Now that Eden depends on open source fb303, EDEN_HAVE_STATS is unnecessary. Remove it.

Reviewed By: simpkins, strager

Differential Revision: D15526905

fbshipit-source-id: 2354f1b92545a089de0e91e7c33515fa0b74b067
2019-07-24 21:24:36 -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
7d34ab2a21 don't implicitly include the repo root in the include path
Summary:
From andrewjcg:

> Basically, rocksdb headers exist at both e.g. rocksdb/src/include/rocksdb/flush_block_policy.h and rocksdb//flush_block_policy.h.  The latter are never meant to be used, but Apple platforms by default add the repo root to the include dir before anything else.  This means depending on file-relative inclusion from within rocksdb, we end up getting different versions of the header, which busts through #pragma once causing multiple definition errors.

This is split out from D15125826.

Reviewed By: andrewjcg

Differential Revision: D16353321

fbshipit-source-id: 095e3b7fb4f56b0be42d18fe4009336b65c8eb5e
2019-07-24 17:44:33 -07:00
Jake Crouch
fbcf4e2d57 Compact Repeated Actions
Summary:
To save on memory the journal will now compact the same action repeated multiple times into the same action. This means that modifying the same file 100 times in a row results in 1 Journal delta instead of 100. [The results will cause Watchman to act the same since all queries are down from the current time, changes should only be visible by the number of deltas in the journal, how much memory the deltas are using, "eden debug journal" which will show that sequenceID's were skipped, and the fromSequence/fromTime returned by accumulateRange might be different]

**Memory Improvements:**

For buck commands, 1 run was conducted for each with a buck clean done before each build and then eden being restarted (so the clean did not affect the outcome) [results are formatted as 'with compaction' / 'without compaction']
“buck build mode/opt eden”
Entries: 154145 / 206108 [25.2% reduction]
Memory: 46.2 MB / 61.4 MB [24.7% reduction]

“buck build mode/opt warm_storage/common/...”
Entries: 318820 / 405016 [21.3% reduction]
Memory: 95.8 MB / 121.5 MB [21.2% reduction]

For Nuclide the result was calculated by getting the number of entries in the journal vs the last sequence ID in the journal ('entries we actually have' / 'entries we would have without compaction')
Using Nuclide’s Smart Log and Checking Out various commits / arc pulling:
Entries: 6091 / 23671 [74.3% reduction]

Reviewed By: chadaustin

Differential Revision: D16096960

fbshipit-source-id: f542ae32c889ebc9da442285d808ce75247f7e65
2019-07-24 17:31:15 -07:00
Matt Glazar
cd61479fc5 Fix tests with Python 2.7
Summary:
Some people want to use getdeps with Python 2.7. This looks easy to do, so take a step toward Python 2.7 support by fixing getdeps' tests when run with Python 2.7.

For Python 3, this diff should not change behavior.

This diff should address https://github.com/facebook/bistro/issues/35.

Reviewed By: snarkmaster

Differential Revision: D16435667

fbshipit-source-id: f5c262b12995b609263341c4de26dac7f9b12b70
2019-07-24 11:44:11 -07:00
Christian Clauss
2de1e4d151 Remove sudo: required from .travis.yml (#37)
Summary:
This is just https://github.com/facebook/bistro/pull/37/, backported to `fbcode_builder`.

snarkmaster
Pull Request resolved: https://github.com/facebook/bistro/pull/37

Test Plan: Push and watch Travis

Reviewed By: simpkins

Differential Revision: D16453080

Pulled By: snarkmaster

fbshipit-source-id: a15eaead931f046c41e50f8e3b412ef68b172d65
2019-07-24 08:55:03 -07:00
svcscm
eba47136d5 Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: c6dcd75b23efbe35dd0e080fb7ea77baafe9de05
2019-07-24 08:55:02 -07:00
svcscm
6820fa446b Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: 816000048efe881be0dc58b3742e8e81d8c98806
2019-07-23 23:39:01 -07:00
Adam Simpkins
ab9a840d9e minor cleanup to FindLZ4.cmake
Summary:
Don't print a status message about finding LZ4 twice: one is already printed
by `find_package_handle_standard_args()`.

Also change a few function calls to lower-case to be more consistent with the
rest of our CMake files.

Reviewed By: chadaustin

Differential Revision: D16435455

fbshipit-source-id: bc2c66399823162f93e62d1d0dbdba422fe63b24
2019-07-23 18:38:29 -07:00
svcscm
8eef0d53df Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: 00b60e64b93d57f869a408487752efcbc1e4439a
2019-07-23 18:38:29 -07:00
svcscm
856da3a6ee Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: 57792763cbfe7de23706a379396e3eb6e3f95a3a
2019-07-23 17:24:54 -07:00
Adam Simpkins
9456d701bb fix handling of common arguments
Summary:
getdeps allowed common arguments to be specified either before or after
the subcommand name.  However, the arguments were only actually honored
if they were specified on the command line after the subcommand name.
Specifying any of these arguments before the subcommand would simply be
ignored, and the default value would be used.  This happened since the
subcommand argument's default value overwrote the value specified by the
user from the main command parser.

This fixes the behavior by using `argparse.SUPPRESS` so that argparse
won't set the value at all if it was not specified.  This allows the
value from the main parser to be used correctly if the argument was not
seen by the subcommand parser.

Reviewed By: chadaustin

Differential Revision: D16435358

fbshipit-source-id: f3893ef7a27fb018247f249f313d6438472e0140
2019-07-23 16:54:54 -07:00
Jake Crouch
2172bbbf8c Adding memory limit to Journal
Summary:
This diff updates Eden's journal to be bounded in terms of memory usage which should help lessen the likelihood of Eden OOMing and taking up a large amount of our users' resources.

The memory limit is set to be 1 GB per journal [so a user with 3 mounts could expect the journals to possibly use up to 3 GB of memory].

The landing of this diff will need to wait until a version of Watchman that can handle truncation is deployed on all machines using Eden. This means we need to wait for a version of Watchman with D16219267 to fully land to machines.

Reviewed By: strager

Differential Revision: D15954994

fbshipit-source-id: 9a6425527f10a1ce051feb8fc7d092a84712f338
2019-07-23 12:15:38 -07:00
svcscm
c3c7cc6374 Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: ee7ab319d8ed8a5e941165cc68e80f8ccd9455ba
2019-07-23 12:15:37 -07:00
svcscm
8e9265c79f Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: 27bcd94dd03eea887ada85211b3a999b08c5501b
2019-07-22 19:12:33 -07:00
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