Commit Graph

57547 Commits

Author SHA1 Message Date
Durham Goode
1da0256921 discovery: use the latest commits for discovery instead of random ones
Summary:
When doing discovery, for repos with long master lines and infrequent
branches, picking a random set of sample commits could result in not picking the
master, and therefore having to do very long commit graph traversals to check
ancestors against the other samples.

To prevent this, let's pick the N most recent commits instead of a random
sample. This should generally get the master commit into our sample.

Reviewed By: quark-zju

Differential Revision: D21394302

fbshipit-source-id: f4b8110cd126b90553ec624e48cab0b590e124fb
2020-05-05 09:56:26 -07:00
Lukas Piatkowski
621678a798 mononoke/time_window_counter: use trait objects to represent time_window_counter
Summary: Making a trait out of TimeWindowCounter will help with providing different implementations of load limiting for OSS and FB.

Reviewed By: krallin

Differential Revision: D21329265

fbshipit-source-id: 7f317f8e9118493f3dcbadb0519eaff565cbd882
2020-05-05 08:02:50 -07:00
svcscm
3b8c8b4680 Updating submodules
Summary:
GitHub commits:

1972a4b5c2
1cd11098a9

Reviewed By: jurajh-fb

fbshipit-source-id: 5ffb2e9251741c8db314dd2038796fc5d9abb951
2020-05-05 08:02:49 -07:00
svcscm
69006edc25 Updating submodules
Summary:
GitHub commits:

886a2a4651
313dba04bb
b809094278
14efec15bd
ca0252fe54
d25d21b400
f59693dbbc
61f194f57b
659027363b
9ebed36edf
dfdbb41163

Reviewed By: jurajh-fb

fbshipit-source-id: c5902f7e09d4106d16fb72e51b37099c2da192f9
2020-05-05 06:57:49 -07:00
Thomas Orozco
0dd85d1c15 mononoke/cache_warmup: add a bit more error context
Summary:
This is helpful. Also, while in there, I removed an error that wasn't used at
all.

Reviewed By: StanislavGlebik

Differential Revision: D21399489

fbshipit-source-id: 0e5ef20b842afa9ffc0bb8530c48eb48339c558e
2020-05-05 05:44:53 -07:00
Thomas Orozco
9ac8e0505b mononoke: update various error enums to use #[source]
Summary:
We have a number of error enums that wrap an existing errors, but fail to
register the underlying error as a `#[source]`. This results in truncated
context chains when we print the error. This fixes that. It also removes a
bunch of manual `From` implementation that can be provided by thiserror's
`#[from]`.

This also required updating the `Display` implementation for those errors. I've
opted for not printing the underlying error, since the context chain will
include it. This does mean that if we print one of those errors without the
context chain (i.e. `{}` as opposed to `{:#}` or `{:?}`), then we'll lose out a
bit of context. That said, this should be OK, as we really shouldn't ever being
do this, because we'd be missing the rest of the chain anyways.

Reviewed By: StanislavGlebik

Differential Revision: D21399490

fbshipit-source-id: a970a7ef0a9404e51ea3b59d783ceb7bf33f7328
2020-05-05 05:44:52 -07:00
Thomas Orozco
fd6b1d4ec6 common/rust/failure_ext: get rid of error chain
Summary:
This removes our own (Mononoke's) implementation of failure chains, and instead
replaces them with usage of Anyhow. This doesn't appear to be used anywhere
besides Mononoke.

The historical motivation for failure chains was to make context introspectable
back when we were using Failure. However, we're not using Failure anymore, and
Anyhow does that out of the box with its `context` method, which you can
downcast to the original error or any of the context instances:

https://docs.rs/anyhow/1.0.28/anyhow/trait.Context.html#effect-on-downcasting

Reviewed By: StanislavGlebik

Differential Revision: D21384015

fbshipit-source-id: 1dc08b4b38edf8f9a2c69a1e1572d385c7063dbe
2020-05-05 05:44:52 -07:00
Thomas Orozco
70007f049e mononoke/lfs_server: add a test for error formatting
Summary:
I'm going to send a diff to get rid of failure chains, and the LFS Server
actually uses that quite a bit. Let's make sure we don't affect the error
rendering there.

Reviewed By: StanislavGlebik

Differential Revision: D21383032

fbshipit-source-id: e0ec9c88760e7fd48d39fa1570efd1870a9ef532
2020-05-05 05:44:52 -07:00
svcscm
e130a8a8e3 Updating submodules
Summary:
GitHub commits:

79730fef2d
c5f5dc0071
2bf5443abd
7c383d4e61
d2b3dbf4f9
ce326f3523
a8053d8d0d
f2c6d7c349
f289daa8f3
43fdf5c767
fb0bffd5aa
8369f9d9b3

Reviewed By: jurajh-fb

fbshipit-source-id: 0885170ab34e4c0e096ba8f7b7078a05432faacb
2020-05-05 05:07:53 -07:00
Lukas Piatkowski
2da413da3e mononoke/opensource: temporarily remove mononoke manifest
Summary: The oss jobs are causing problems to the developers now, lets disable them temporarily.

Reviewed By: StanislavGlebik

Differential Revision: D21400898

fbshipit-source-id: f7a3567056633d9eef98a8d05a37cd029c9e506c
2020-05-05 04:20:42 -07:00
svcscm
659ecb4858 Updating submodules
Summary:
GitHub commits:

e2fba1fdf9

Reviewed By: jurajh-fb

fbshipit-source-id: 0cd1a9fad1773d95e69b53b6f2915f1bdb251bdc
2020-05-05 03:46:42 -07:00
Thomas Orozco
c63ac4a8eb mononoke: fix a broken test
Summary:
Looks like this broke yesterday. There was a Reindeer update yesterday IIRC, so
I'm guessing that's the cause. In any case, this is easy to fix forward.

Reviewed By: farnz

Differential Revision: D21399830

fbshipit-source-id: 5cf33411e089a8c675a8b3fdf7b6ae5ae267058d
2020-05-05 02:47:03 -07:00
svcscm
1d3f0f51b6 Updating submodules
Summary:
GitHub commits:

6fad3d5a80

Reviewed By: jurajh-fb

fbshipit-source-id: 630ed9b37a10e2a4f20f4b021d0c4c271fceb10a
2020-05-05 02:47:03 -07:00
svcscm
b9d6b776c0 Updating submodules
Summary:
GitHub commits:

2cabf118d2
cc70355a12
e53b3cc393
6f06ca6645
9cb9ae7ec8
d7f6c7d3eb
7d8f6d9e81
000f8ae8eb
a0bcb01daa
e7144be352
6ca7ea7e92

Reviewed By: jurajh-fb

fbshipit-source-id: 0e913373d6594492fbe249455754d36d70e3c9ab
2020-05-04 22:11:13 -07:00
Chad Austin
630ad5dbd6 default storage engine in config.toml
Summary:
If config.toml exists but does not contain a valid storage engine,
edenfs would fail to start. Now, it will set a default value and write
the updated config file.

Reviewed By: simpkins

Differential Revision: D19671453

fbshipit-source-id: 32f19dbed2be02bec2a96e1349dca6e7038b9301
2020-05-04 22:08:41 -07:00
Shannon Zhu
83dc7b9129 Custom pyre upgrade for eden
Summary:
Addressing issues simpkins brought up on D21207287 when we upgraded and introduced some pyre bugs.

Temporarily upgrading just this project, once we resolve some sandcastle capacity issues we'll release this via another global upgrade in fbcode.

Reviewed By: simpkins

Differential Revision: D21316793

fbshipit-source-id: f0c79f53d97f7182e7d8fe6e081c58ef53ce0c9a
2020-05-04 21:19:20 -07:00
svcscm
eb1e7f0597 Updating submodules
Summary:
GitHub commits:

2e48429390
faf91ce01f
89e187d839
257e071629
79952c99f2
5a61e7864d
eddb225388
93403f13b7
d21b67d26d
fedb9fe464
34b8b26990
26ffeccf3e
c0db94e58f

Reviewed By: jurajh-fb

fbshipit-source-id: 94972f903e6fe8e28f857572aceb001fb788eb80
2020-05-04 20:32:25 -07:00
Zeyi (Rice) Fan
da28f5a5b1 revisionstore: create directory with group share permission in correct places
Summary: When we create directory at certain places, we want these directories to be shared between different users on the same machine. This Diff uses the previously added `create_shared_dir` function to create these directories.

Reviewed By: xavierd

Differential Revision: D21322776

fbshipit-source-id: 5af01d0fc79c8d2bc5f946c105d74935ff92daf2
2020-05-04 19:21:33 -07:00
Jeremy Fitzhardinge
cde51faec8 third-party/rust: update cargo to 0.44 release
Summary:
All the changes we need are now in stable, so use the stable crates.io version.

I also had to do coordinated updates of git2 and rustsec to make sure they're
all using the same version of libgit2-sys. This had a couple of little API changes which affected our code:
- mononoke gitimport (krallin)
- linttool (zertosh) (BTW the old code had some very dubious lifetime stuff - a signature of the form `fn foo<'a>(&self) -> Thing<'a>` never makes any sense - output lifetimes should always be derived from the params)

Similarly, toml-rs needed to be updated because there's now a hard dependency on 0.5.6.

msdkland[rust_cargo]
msdkland[rust_reindeer]

Reviewed By: dtolnay

Differential Revision: D21311180

fbshipit-source-id: 82083c8f2bb8523e70cbe99dc0a630c4bc67a505
2020-05-04 18:59:57 -07:00
Jeremy Fitzhardinge
294b328e03 third-party/rust: update toml to 0.5.6
Summary: With updated local patch.

Reviewed By: zertosh, dtolnay

Differential Revision: D21360289

fbshipit-source-id: 92383b452f8ac6f8dc8a5af855ab3aad8bdb4ec7
2020-05-04 18:59:56 -07:00
Wez Furlong
b4f725330e eden: regenerate Cargo.lock on each cargo invocation
Summary:
When using our vendored set of crates, cmake doesn't
have any dependency information to use to invalidate the Cargo.lock
file when we update crate versions.  In addition, since we're
vendoring from a local directory, cargo itself doesn't seem to
want to re-assess the dependencies in that same situation, leading
to confusing error messages like this when we want to build rust
targets:

```
error: failed to select a version for the requirement `anyhow = "= 1.0.26"`
  candidate versions found which didn't match: 1.0.28
```

This commit addresses this issue by removing the `Cargo.lock` that
may be alongside the `Cargo.toml` prior to invoking `cargo`.
`cargo` is pretty quick at recomputing the deps so this has
neglible overhead.

Reviewed By: xavierd

Differential Revision: D21394363

fbshipit-source-id: 547db2e2395a47aed77d9597e659eb2d96e274dd
2020-05-04 18:37:36 -07:00
Wez Furlong
8dd0a11354 getdeps: fix an fbsource invalidation problem
Summary:
When the commit hash changed in fbsource, we would correctly decide
that we'd need to rebuild first-party projects but we would incorrectly skip
running the fetcher.update method.  This would mean that we'd not perform the
shipit run and that our shipit tree would diverge from the source tree.

This commit resolves this by performing the fetcher.update but ignoring
the source update status in this case.

Reviewed By: xavierd

Differential Revision: D21364131

fbshipit-source-id: b4001e549c7d3f27aa4a21b19893c9bb7c0f6d1f
2020-05-04 17:44:48 -07:00
Wez Furlong
decc0228b5 getdeps: improve build invalidation for dependencies
Summary:
We didn't do a great job of recognizing that we'd need to
build a project when one of its dependencies had changed: we relied
chiefly on the dependency hash for this and could fail to handle
changes in individual source files.

This commit helps to improve this situation by checking to see if
any installed files in the dependencies of a manifest are newer than
the most recent built time of a given manifest.  If so, we'll trigger
a build.  We try to be reasonably smart about deciding when to trigger
a cmake reconfigure if it looks like cmake files in the deps have
been changed.

Reviewed By: xavierd

Differential Revision: D21364132

fbshipit-source-id: 7534496e10d1f532aa9cf865900ace84a8785327
2020-05-04 17:44:47 -07:00
Wez Furlong
83d470aa9e getdeps: refine makefiles matcher for cmake reconfigure
Summary:
Only run cmake reconfigure for .cmake, .cmake.in and CMakeLists.txt
files changes.

Previously we would reconfigure for any change to a file with a path that
matched `cmake` which could result in false positives in cases where
you may be iterating on .py or .c files in shared cmake directories.

This also reclassifies non-cmake files under fbcode_builder/CMake as source
files so that we run cmake for those; previously they would cause a
reconfigure and build, now they just cause a build.

Reviewed By: xavierd

Differential Revision: D21364133

fbshipit-source-id: a1231f657d6c6056b269656c677d3449d8715cf6
2020-05-04 17:44:47 -07:00
Wez Furlong
482cf97da6 getdeps: code formatting
Summary:
Our linter really wants to include formatting changes unrelated
to my diff stack.

This is a formatting only change to avoid clouding my diffs; no functional
effect.

Reviewed By: xavierd

Differential Revision: D21364519

fbshipit-source-id: 7670dd4154e788f593f256aabdfdeef6d17aeec4
2020-05-04 17:44:46 -07:00
Adam Simpkins
e955b6dabc getdeps: avoid blowing away too much data when invalidating the CMake cache
Summary:
Previously getdeps would remove the entire top-level `CMakeFiles` directory
from the build output when it wanted to invalidate the CMake cache.  This
directory is used to keep all of the compiled object files for any libraries
or executables defined in the top-level CMakeLists.txt file.  Blowing away
this directory forces all of these sources to be re-compiled, even if this was
not necessary.  This is particularly problematic for folly, which compiles all
of its source files via rules in the top-level CMakeLists.txt target file.

I did have the code still blow away the CMake error and output logs in this
directory: in the past I have seen situations where CMake would not update
these files on new CMake runs if they already existed.

Reviewed By: wez

Differential Revision: D21360668

fbshipit-source-id: 6fcd1a8e371d756114fbab60d8636be8cd5f8978
2020-05-04 17:19:07 -07:00
Adam Simpkins
3b280eff95 getdeps: indicate that folly depends on lz4
Summary:
Update the manifest file for folly to indicate a dependency on lz4.
folly does not require lz4 be available, but it will use it if it is found at
configure time.

getdeps is unfortunately not strict about providing projects only with the
dependencies that they require at build time.  This causes it to sometimes
make lz4 available to folly (if you are also building another project that
requires lz4), and sometimes not.  This ends up causing changes in
folly-config.h depending on which projects you are building, forcing all of
the folly sources to be recompiled.

In the future we perhaps should update getdeps to consistently only pass in
include directories for dependencies actually listed in the manifest file.
However, specifying that folly depends on lz4 also works to mitigate this
particular issue for now, and it is also generally desirable to build folly
with lz4 support.

Reviewed By: wez

Differential Revision: D21359995

fbshipit-source-id: aaf61671b7750d6c47e3613c732d220b3311b5ba
2020-05-04 17:19:07 -07:00
svcscm
99b73b16b1 Updating submodules
Summary:
GitHub commits:

cb3d30c578
7c33a1c9c5
a00ddf1574
f41d462eed

Reviewed By: jurajh-fb

fbshipit-source-id: 11255fe3f50166a0c370f60d622b598c96b61976
2020-05-04 17:19:07 -07:00
svcscm
e1758e6868 Updating submodules
Summary:
GitHub commits:

d7d48e4762
ef6bc9338b
8912f0385a
680c416348
d83d7f3024
b7716f3b23

Reviewed By: jurajh-fb

fbshipit-source-id: 2f68cd7ab7c415b3d0bca21d71e0da7ca58dc708
2020-05-04 15:16:41 -07:00
Chad Austin
65d278cc55 move docs/ into eden/fs/
Summary: These docs are all EdenFS specific so move them into the fs/ directory.

Reviewed By: genevievehelsel

Differential Revision: D21329620

fbshipit-source-id: 4090ed4ca371d01ea98e06ad6ce8f434c0660962
2020-05-04 12:34:47 -07:00
Xavier Deguillard
84b25c7abb eden: fix Windows build
Summary:
The MSVC compiler complains that it doesn't have the full definition of
PrivHelper, causing the build to fail. Include the right header to fix this.

Reviewed By: genevievehelsel

Differential Revision: D21381946

fbshipit-source-id: 0d0389ee8db44a36786973404c38487a94e8c4df
2020-05-04 11:53:33 -07:00
Adam Simpkins
c0fb9cea2d enable all integration test sources in CMake builds
Summary:
Previously we only included `basic_test.py` and `hg/status_test.py` in the
integration tests during CMake-based builds.  This updates the code to now
include all of the test files, with just a few exclusions based on platform
type and what dependencies were available at build time.

Reviewed By: wez

Differential Revision: D21239912

fbshipit-source-id: b8826d249a6323ac3bcc555c9ceba54a4cbcfde9
2020-05-04 11:46:09 -07:00
Adam Simpkins
a755d9e979 blacklist some integration tests on non-RedHat Linux distributions
Summary:
10 of the integration tests fail on Ubuntu.  For now simply blacklist them
from running on non-RedHat-based distributions.

Reviewed By: wez

Differential Revision: D21332629

fbshipit-source-id: 3fadb74bb31e89092177afaa01ddc7f6bcd0f9de
2020-05-04 11:46:09 -07:00
Adam Simpkins
ea7460f2d3 apply the integration test case blacklist to some more tests
Summary:
Add a new IntegrationTestCase base class that checks the test blacklist during
`setUp()`, and update a few remaining test classes that did not derive from
`EdenTestCase` to derive from this.

Also drop the method name argument from the `skip_test_if_blacklisted()`
function, since we can get this from the existing test case argument.

Reviewed By: genevievehelsel

Differential Revision: D21340539

fbshipit-source-id: d4fc125f119d74ab923c2cc3c9070b86c582c87e
2020-05-04 11:46:09 -07:00
Adam Simpkins
f390948707 fix the UserInfoTest on Ubuntu
Summary:
Run `env` as `/usr/bin/env` instead of `/bin/env`
This command is typically installed in `/usr/bin`.  Recent RedHat releases
replaced `/bin/ with a symlink to `/usr/bin`, allowing this command to work
when invoked as `/bin/env`, but this isn't true on all distributions, such as
Ubuntu.

Reviewed By: chadaustin

Differential Revision: D21340540

fbshipit-source-id: d7588f8c90e9a86a0cb31fd3ab3a9067aa6e79ea
2020-05-04 11:46:08 -07:00
Chad Austin
63158b56f6 move third-party/ into eden/fs/
Summary: These third-party includes are edenfs-specific, so move them into eden/fs/

Reviewed By: simpkins

Differential Revision: D21314642

fbshipit-source-id: c52b0a00d5080934e1f07e4cd55373602f2f6b0a
2020-05-04 11:33:12 -07:00
Chad Austin
bb7005d60e move benchmarks/ into eden/fs/
Summary: These benchmarks are edenfs-specific, so move them into /eden/fs/

Reviewed By: genevievehelsel

Differential Revision: D21314464

fbshipit-source-id: 1dcf6adfbdea1394f222de4d462397ea531ced00
2020-05-04 11:33:12 -07:00
svcscm
faf7d23534 Updating submodules
Summary:
GitHub commits:

613e4a315f
1ed4765e85
8316ff391f
61c5215f84

Reviewed By: jurajh-fb

fbshipit-source-id: efc13fd712fd33fd1b451693ffbf50212edeb34d
2020-05-04 10:50:59 -07:00
Thomas Orozco
6df567f7ca mononoke/repo_client: log when hooks finished (and how many were rejected)
Summary:
This updates repo_client to log when hooks finished, and how many were rejecte,
if any. This required a bit of refactoring to avoid iterating twice over
whether hooks are rejected or not (and instead just filter-maps outcomes to a
rejection), but it's probably for the better since it removes a bit of
un-necessary cloning (notably of the hook name).

Reviewed By: farnz

Differential Revision: D21379690

fbshipit-source-id: 53c8368d3871620ec61db76dc35b47dd17276ac4
2020-05-04 09:54:59 -07:00
Genevieve Helsel
367db1d20a shorten recovery wait timeout and increase restarter restart timeout
Reviewed By: wez

Differential Revision: D21333897

fbshipit-source-id: ba2b9aa375bfa91693c8985ff4cb57e944b04eff
2020-05-04 09:22:24 -07:00
Thomas Orozco
cfde4afe90 mononoke/gitimport: support read-only mode
Summary:
This adds support for running Gitimport with `--readonly-storage`. The way we
do this is by masking the various storages we use (blobstore, changesets,
bonsai).

Reviewed By: markbt

Differential Revision: D21347939

fbshipit-source-id: 68084ba0d812dc200776c761afdfe41bab9a6d82
2020-05-04 07:18:02 -07:00
Thomas Orozco
28eee11931 mononoke/gitimport: improve concurrency
Summary:
The original gitimport wasn't really designed for concurrency, since it did
commits one by one. With this update, we can now derive Bonsais from multiple
commits in parallel, and use multiple threads to communicate with the Git
repository (which is actually somewhat expensive when that's all we do).

We also store Bonsais iteratively. There is a bit of extra work that could be
done also here by saving Bonsais asynchronously to the Blobstore, and inserting
a single batch in Changesets once we're finished.

Reviewed By: farnz

Differential Revision: D21347941

fbshipit-source-id: e0ea86bf4d164599df1370844d3f0301d1031801
2020-05-04 07:18:02 -07:00
Thomas Orozco
bc7e31cdd1 mononoke/gitimport: allow deriving a range of commits
Summary:
This adds support for deriving commits within a range in gitimport, which gets
us one step closer to resumable gitimport. The primary goal of this is to
evaluate whether using Gitimport for Configerator might be suitable.

Differential Revision: D21347942

fbshipit-source-id: aa3177466e389ceb675328999ccf836f29912698
2020-05-04 07:18:01 -07:00
Thomas Orozco
57ccda8e9c mononoke/gitimport: add derive hg functionality
Summary:
This adds some basic functionality for deriving hg manifests in gitimport. I'd
like to add this to do some correctness testing on importing Git manifests from
Configerator.

Differential Revision: D21347940

fbshipit-source-id: 6f819fa8a62b3088fb163138fc23910b8f2ff3ce
2020-05-04 07:18:01 -07:00
Thomas Orozco
310781b4f5 mononoke/unbundle: make pushrebase logs more consistent + more complete
Summary:
- Use the same case consistently
- Log even when pushrebase fails

Reviewed By: farnz

Differential Revision: D21378033

fbshipit-source-id: 062e986151086476db9100e3d9c71aa702661032
2020-05-04 07:13:48 -07:00
Stanislau Hlebik
3c6179ac99 mononoke: update comment in warm bookmark cache
Reviewed By: mitrandir77

Differential Revision: D21378890

fbshipit-source-id: ecb58d35a0ef5ab54c45173fdbfba561c8dfc6fe
2020-05-04 05:05:05 -07:00
Stanislau Hlebik
6914d544d9 mononoke: read list of derived data to derive from the config
Summary:
Currently we need to specify which derived data we need to derive, however they
are already specified in the configerator configs. Let's just read it from
there.

That means that we no longer need to update tw spec to add new derived data types - we'll just need to add them to configerator and restart the backfiller.

Reviewed By: krallin

Differential Revision: D21378640

fbshipit-source-id: f97c3f0b8bb6dbd23d5a50f479ecfccbebd33897
2020-05-04 04:52:26 -07:00
Lukas Piatkowski
5aea06ca2a mononoke/load_limiter: use trait objects to represent load_limiter
Summary: Making a trait out of LoadLimiter will help with providing different implementations of load limiting for OSS and FB.

Reviewed By: farnz

Differential Revision: D21302819

fbshipit-source-id: 1b982a367aa7126ca5d7772e4a2406dabbe9e13b
2020-05-04 04:36:03 -07:00
Kostia Balytskyi
01310a4b70 config: sync from configerator
Summary: A result of `configerator-thrift-updater scm/mononoke/repos/repos.thrift`

Reviewed By: farnz

Differential Revision: D21350982

fbshipit-source-id: b3344c99c6f53c727ea16ebc0f81f90527de103d
2020-05-04 04:13:45 -07:00
svcscm
ea6490063c Updating submodules
Summary:
GitHub commits:

adc6e75705

Reviewed By: yns88

fbshipit-source-id: beb89e5127c1ecdc7e08b780736eb1c397b8312c
2020-05-04 03:24:30 -07:00