Commit Graph

2490 Commits

Author SHA1 Message Date
Adam Simpkins
9bfb48c921 update license headers in .py files
Summary:
Update the copyright & license headers in Python files to reflect the
relicensing to GPLv2

Reviewed By: wez

Differential Revision: D15487088

fbshipit-source-id: 9f2138dff41048d2c35f15e09a04ae5a9c9c80dd
2019-06-19 17:02:46 -07:00
Adam Simpkins
aa5e6c7295 update license headers in C++ files
Summary:
Update the copyright & license headers in C++ files to reflect the
relicensing to GPLv2

Reviewed By: wez

Differential Revision: D15487078

fbshipit-source-id: 19f24c933a64ecad0d3a692d0f8d2a38b4194b1d
2019-06-19 17:02:45 -07:00
Adam Simpkins
47f41ab44f relicense to GPLv2
Summary:
Move away from the older BSD+PATENTS license to GPLv2.

Moving to GPLv2 will make it easier for us to integrate more closely with
code from Mercurial in the future, which is licensed as GPLv2+.

Reviewed By: wez, strager

Differential Revision: D15487085

fbshipit-source-id: efe84aa48acfcd7da3b57b5d3a78fb8d22ad6ad8
2019-06-19 17:02:45 -07:00
svcscm
d957b0f4e2 Updating submodules
Reviewed By: yns88

fbshipit-source-id: 1d0529ea308b208172af068621f1c1999e9d8933
2019-06-19 16:56:59 -07:00
Jake Crouch
6760da6baf Changing Journal API from merge to accumulateRange
Summary: Merge was a function on a JournalDelta that created a new JournalDelta and optionally left it connected to old JournalDeltas. AccumulateRange is a new function on the Journal itself (acting on the latest delta) that creates a JournalDeltaSum (which can't be connected to older Deltas)

Reviewed By: chadaustin

Differential Revision: D15881452

fbshipit-source-id: 573505c1171f78d46afc98f1db9b5b9ee2fff60f
2019-06-19 15:18:16 -07:00
Jake Crouch
26a6e91e05 Simplify Journal API for Callers
Summary: Making addDelta private and giving users a more user-friendly way of appending entries to the journal.

Reviewed By: chadaustin, strager

Differential Revision: D15868089

fbshipit-source-id: 00c8a3066f0e4483e3c792651ade5f6a7ea05eed
2019-06-19 15:18:16 -07:00
svcscm
73e2c2a997 Updating submodules
Reviewed By: yns88

fbshipit-source-id: 7c40d90a15a96db898985e57313495f06d3550b7
2019-06-19 14:44:21 -07:00
Jon Maltiel Swenson
938eb990a6 Remove defaulted move constructors/assignment operators that are implicitly deleted
Summary:
Some newer versions of `clang` (such as Apple's version 11) will warn/error out if a constructor or assignment operator
marked `default` is implicitly deleted (e.g., if the object contains a non-moveable/non-copyable member). This diff
removes all such defaulted constructors/assignment operators, which I ran into while building `edenfs` on my Macbook Pro.

Reviewed By: chadaustin, strager

Differential Revision: D15901794

fbshipit-source-id: 794ed8377693a6735bb567635dc919bc678751a4
2019-06-19 14:27:25 -07:00
svcscm
678000ac92 Updating submodules
Reviewed By: yns88

fbshipit-source-id: 68fd4a8500e5cb2887d152b5b5b7e3249f413dbd
2019-06-19 14:13:28 -07:00
Jon Maltiel Swenson
df6ac2b2a8 Enable rsocket stream handling in EdenServer
Summary: This diff allows watchman to connect to `EdenServer` over an rsocket stream.

Reviewed By: simpkins, strager

Differential Revision: D15900246

fbshipit-source-id: e4a99fcd7b9c75b6ad2c331c1bbf13d22f78cfd7
2019-06-19 13:51:47 -07:00
svcscm
4f481f4134 Updating submodules
Reviewed By: yns88

fbshipit-source-id: 20f6035ff9c1597037742476f8ed55fe8d008bd1
2019-06-18 12:32:51 -07:00
svcscm
002b88a68b Updating submodules
Reviewed By: yns88

fbshipit-source-id: 621dddc21093b4d1486339114187c79995ac1245
2019-06-18 12:32:51 -07:00
svcscm
07c2c62af5 Updating submodules
Reviewed By: yns88

fbshipit-source-id: 4efc63f365f7a00f6a0a65f37fd47caece29abc9
2019-06-17 13:22:13 -07:00
Kostia Balytskyi
36f4698c5a entrypoint: introduce buck-buildable hg.rust
Reviewed By: farnz

Differential Revision: D15844921

fbshipit-source-id: 16ef18915b82344a553fec92af9ec9fc445e3ccb
2019-06-17 11:32:16 -07:00
Chad Austin
8925b1dcb8 remove ThriftCppLibrary.cmake as getdeps provides it
Summary: ThriftCppLibrary.cmake is a duplicate of the getdeps/opensource copy of the file. To avoid issues with keeping them in sync, remove Eden's.

Reviewed By: simpkins

Differential Revision: D15750453

fbshipit-source-id: 7f95d01c4ed6ce3af86f0215ef16b88dc2c61027
2019-06-17 11:10:33 -07:00
svcscm
c19834d673 Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: 9df9a14efe61b553b46d3d30064aa143b095fe8a
2019-06-17 11:10:33 -07:00
svcscm
a6b0f7696f Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: 0c59ce8e70a1c528250b72888a8442477e5aab69
2019-06-16 17:47:06 -07:00
svcscm
d052a0b8a9 Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: efbde14f23366fc4ff3bc745d69d9223add2f232
2019-06-15 23:27:34 -07:00
svcscm
250ba47e87 Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: f5aa225c325b300270a110cb0b42df3f7dccf7f0
2019-06-14 22:57:02 -07:00
Adam Simpkins
513dfb17fd add a stub implementation of ServiceData::incrementCounter()
Summary: Add a stub for this so we can use it in some the Eden code.

Reviewed By: chadaustin

Differential Revision: D15831519

fbshipit-source-id: 8f16d8fcb7080d207c748281bd93b9243c104596
2019-06-14 18:14:43 -07:00
Adam Simpkins
482c2d8dfd change how we compute sizes of the RocksDB column families
Summary:
Update `RocksDbLocalStore::getApproximateSize()` to use `DB::GetIntProperty()`
rather than `DB::GetApproximateSizes()`.

The `GetIntProperty()` call reports properties about the overall column
family, as opposed to `GetApproximateSizes()` which supports querying size
information for specific key ranges.  We always want data about the full
table, so the `GetIntProperty()` call seems to make more sense for us.

Also change the code to include both the SST file size (which we were querying
before) and the memtable size (which was not included before).  The
`GetApproximateSizes()` call allow this to be queried too, but using
`GetIntProperty()` still seems better since we don't care about a specific key
range.

Reviewed By: wez

Differential Revision: D15798506

fbshipit-source-id: 86d087876d838c0ff4ae517ccac2e8b8bf31e304
2019-06-14 18:14:43 -07:00
Adam Simpkins
69dc2be426 add a debug log message reporting how long PeriodicTasks took
Summary:
Add a debug log message at the end of each PeriodicTask iteration, reporting
how long the task took.

Reviewed By: wez

Differential Revision: D15798504

fbshipit-source-id: 3f33877cb4a9ddb8d966877b005e6d4c60d7dbe0
2019-06-14 18:14:43 -07:00
Adam Simpkins
aa45fa2cb7 periodically reload the config files
Summary:
Add a periodic task to reload the configuration file from disk.  By default
this runs once every 5 minutes, but this interval can be controlled from the
config file.

At the moment reloading the config file does not do much other than update the
interval for how frequently the config file is reloaded.  However, I plan to
add additional periodic tasks shortly that are controlled by this config
setting.

This will also make it possible for other parts of the code to
access the config settings in the `ServerState` and use them as-is without
checking to see if they reloaded.  Currently all of the code that accesses
config values performs a check to see if the config needs to be reloaded.  If
we want to switch to Mercurial-style configs in the future that check will be
substantially more expensive.

This diff also includes a new thrift call to force the config file to be
reloaded immediately.  This can be used to restart automatic config reloading
if it is ever disabled in the config file.

Reviewed By: wez

Differential Revision: D15756357

fbshipit-source-id: 1999f4730903633ce838842932a6ae6a65eda4e6
2019-06-14 18:14:43 -07:00
svcscm
2691d67f18 Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: a105224b58466d3743c37910c4acf746c82713c8
2019-06-14 18:14:42 -07:00
svcscm
7714fb950a Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: d52e02e8154efa06d7762dc4bbe3b54322373a54
2019-06-14 11:36:18 -07:00
svcscm
e3d5235f7b Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: 3f7e2979bb6170e72ba28700ed473870168cae7d
2019-06-13 11:38:12 -07:00
Victor Zverovich
e4575f33be Migrate to optional_field_ref Thrift API
Summary:
Migrate the code from accessing optional Thrift fields directly to a safer
`optional_field_ref` API. See https://fburl.com/safe for more details.

The output of this codemod has been reviewed in D13259011.

To preserve semantics, each unchecked access is replaced with an explicit call
to `value_unchecked()`. If you are sure that accessing a field is safe (the
field is marked as set), you can later replace `value_unchecked()` with
`value()` or dereferencing (`operator *`):

```
  ThriftStruct s = ...
- auto foo = s.foo_ref().value_unchecked();
+ auto foo = *s.foo_ref(); // will throw if s.foo is unset
```

drop-conflicts

Reviewed By: stevegury

Differential Revision: D15786632

fbshipit-source-id: 7c3f089dfa79597b189da6996cb76dcdbd5ed612
2019-06-13 08:54:34 -07:00
svcscm
8d8007a0dc Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: 1ec7003bbfd4fc3e1825b25a116d2ab0197de44c
2019-06-13 08:54:33 -07:00
svcscm
10b237f403 Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: 52b52f7d2338c10c9319d3a22e7c793ee56e69e8
2019-06-12 18:51:01 -07:00
Brian Strauch
7a1724b5d5 Get blob size from local store
Summary: The first step towards decoupling size from the metadata object in the local store. This is necessary for the next step, which is to serialize size separately from the combined metadata object.

Reviewed By: chadaustin

Differential Revision: D15719637

fbshipit-source-id: 979555e3e362f2b698b3af3a0b6db1e350e07dcd
2019-06-12 17:48:49 -07:00
Brian Strauch
9090adaaa3 Added missing tests for getBlobSha1
Summary: Wrote tests for retrieving hashes from the object store and refactored existing tests. Includes positive and negative tests.

Reviewed By: strager, pkaush

Differential Revision: D15697488

fbshipit-source-id: 44aa8a36fbc1d1e56dcbbb6bcb665d3784cbb476
2019-06-12 17:48:49 -07:00
Brian Strauch
13796362f5 Renamed functions to refer to blobs
Summary: `getSize` and `getSha1` were misleading function names, since the functions refer to the size and hash of a given blob and not the object store itself. These functions have been renamed to `getBlobSize` and `getBlobSha1`.

Reviewed By: chadaustin

Differential Revision: D15696510

fbshipit-source-id: 4dd31659f60969fa90d8e2b39f43c46a2b7dff7c
2019-06-12 17:48:49 -07:00
Brian Strauch
e9d67b364c Created getSize() function to mirror getSha1()
Summary: I decoupled the getSize() function from the getMetadata() function, using a naive implementation for now. This was necessary because I want to add support for fetching only the size of a blob during a request like `ls -l`. Right now, the size and hash of a blob are coupled in a Metadata object, so if the size is requested, the whole file must be downloaded to calculate the hash, which is expensive for large files.

Reviewed By: chadaustin, strager

Differential Revision: D15678216

fbshipit-source-id: 8f68692768faaae0e65373ffe608d09ae49bbc42
2019-06-12 17:48:48 -07:00
svcscm
a1bd27c8e6 Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: aab5e67e0bbd1843f2ada43fa99594b712388326
2019-06-12 16:41:31 -07:00
Yedidya Feldblum
84137aebf1 Always define FOLLY_LIBRARY_SANITIZE_ADDRESS to either 0 or 1
Summary: [Folly] Always define `FOLLY_LIBRARY_SANITIZE_ADDRESS` to either 0 or 1.

Reviewed By: simpkins

Differential Revision: D10414836

fbshipit-source-id: d60ef8380c50971858ed282374f1b5973a27cdf4
2019-06-12 15:54:23 -07:00
svcscm
fb7deb7f01 Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: dd545b05962b008a9d24abdfdeb42701c3357be4
2019-06-12 15:05:22 -07:00
Adam Simpkins
90f48a3105 fix a few additional python lint issues
Summary: Fix a few more issues raised by our Python lint checks.

Reviewed By: wez

Differential Revision: D15776717

fbshipit-source-id: 621960579c4567c4fb9395ae14cd7a8666726c1c
2019-06-12 14:00:57 -07:00
Adam Simpkins
20f211acb8 remove unused python imports
Summary: Remove a number of unused imports detected by the linter.

Reviewed By: wez

Differential Revision: D15776268

fbshipit-source-id: 221f45d275664d037bbabcac9858b40266b4833e
2019-06-12 14:00:57 -07:00
Matt Glazar
5d8e8a5fcd Improve error message if systemd is not running
Summary:
If the systemd user manager is not running (e.g. it crashed or was manually stopped), 'eden stop' fails with an unhelpful error message:

> pystemd.dbusexc.DBusConnectionRefusedError: [err -111]: Could not open a bus to DBus

or

> pystemd.dbusexc.DBusBaseError: [err -2]: Could not open a bus to DBus

Provide a better experience: tell the user the most likely cause, and suggest a solution:

> error: The systemd user manager is not running. Run the following command to start it, then try again:
> sudo systemctl start user@strager.service

Reviewed By: wez

Differential Revision: D13791023

fbshipit-source-id: 5172df0a52d21c311b27b8a527cad934f9882154
2019-06-12 13:32:54 -07:00
Wez Furlong
6aa6599178 eden: fix oss eden cli build
Summary:
We recently added a new thrift file to the codegen, but
forgot that the cli build also needs to be taught how to build
the python code for it.

Reviewed By: strager

Differential Revision: D15788134

fbshipit-source-id: 48a14f0a91b79cc4dceaddd281598cac773b7e11
2019-06-12 13:32:54 -07:00
svcscm
41035ae4ff Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: 62db0c5d87c671f3214c024440159a01a1079d98
2019-06-12 13:32:53 -07:00
svcscm
447f55bef4 Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: 5cbf562652b9d7cf3877b5f819141f88c9b857d3
2019-06-12 12:06:54 -07:00
Matt Glazar
077fa9f149 Delete unused HgCommand code
Summary: HgCommand.h and related code isn't used anywhere. Delete it.

Reviewed By: simpkins

Differential Revision: D15773223

fbshipit-source-id: c4c116150bb74e29e4f220d3b0cbf988d4a1b1c5
2019-06-12 11:21:12 -07:00
svcscm
48280c16e1 Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: 29284bdb274936e9d9326fac7935615e0e3a3aa1
2019-06-12 11:21:12 -07:00
svcscm
eb54e6eafd Updating submodules
Reviewed By: cdelahousse

fbshipit-source-id: e646a914a43b4e574848fdfda6a5555b0c329d24
2019-06-12 02:55:38 -07:00
Yedidya Feldblum
910e6b7e66 Rename FOLLY_ASAN_ENABLED to FOLLY_LIBRARY_SANITIZE_ADDRESS
Summary: [Folly] Rename `FOLLY_ASAN_ENABLED` to `FOLLY_LIBRARY_SANITIZE_ADDRESS`.

Reviewed By: simpkins

Differential Revision: D10414837

fbshipit-source-id: b7ca2a36dd7f91ccab2f8051f78c75909f378d16
2019-06-12 02:12:24 -07:00
svcscm
f720b7b34d Updating submodules
Reviewed By: yns88

fbshipit-source-id: 706d943b0456c53b28948071dff58958669795f1
2019-06-12 02:12:24 -07:00
svcscm
29e2a58e0a Updating submodules
Reviewed By: yns88

fbshipit-source-id: 73fa004fad758c4f93d5e26ef4cf7566361f810e
2019-06-11 22:51:22 -07:00
Adam Simpkins
232c3b2e2b update the ConfigTest class to run without a repository
Summary:
Summary
Change `ConfigTest` to derive directly from `EdenTestCase` rather than using
the `eden_repo_test` decorator.  The configuration test code doesn't really
need a repository, and so we don't need to run it twice (for both Mercurial
and Git repositories).

Reviewed By: wez

Differential Revision: D15756359

fbshipit-source-id: 90d5011ae1ff7d2a251c9e7bb776045fbe2fdfe1
2019-06-11 18:27:21 -07:00
Adam Simpkins
53a6513e14 clean up arguments to the EdenFS class in the integration tests
Summary:
Clean up the `EdenFS` class construction.

Previously it accepted the `eden_dir`, `etc_eden_dir`, and `home_dir`
arguments as separate parameters.  If `etc_eden_dir` or `home_dir` were not
specified it would not pass these arguments to `edenfs`, allowing the default
values to be used.  This is undesirable for most tests.

Now it accepts a `base_dir` argument.  Explicit values for the `eden_dir`,
`etc_eden_dir`, and `home_dir` parameters can still be specified (this is used
for the snapshot tests), but if they aren't specified, default locations
inside the `base_dir` will be used instead.

This also cleans up some of the code to use `pathlib.Path` values instead of
plain `str` objects in more places.

Reviewed By: strager

Differential Revision: D15756358

fbshipit-source-id: 3e87ddc98d15fcb7f60c6c3116d4fcc8e49432ea
2019-06-11 18:27:21 -07:00