Commit Graph

57138 Commits

Author SHA1 Message Date
svcscm
364e3ee9b7 Updating submodules
Summary:
GitHub commits:

0e29494c3e
357eab71fb

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 6ffc2fa64f076ad30975b0582c4fcfd998ab1641
2020-04-16 07:46:26 -07:00
Simon Farnsworth
483eac115b Use standard DB config for SQL blob
Summary: I'm going to want to be able to test against a single ephemeral shard, as well as production use against a real DB. Use the standard config to make that possible.

Reviewed By: ahornby

Differential Revision: D21048697

fbshipit-source-id: 644854e2c831a9410c782ca1fddc1c4b5f324d03
2020-04-16 06:05:18 -07:00
Kostia Balytskyi
220edc6740 admin: add a subcommand to manipulate mutable_counters
Summary:
This is generally something I wanted to have for a long time: instead of having to open a writable db shell, now we can just use the admin command. Also, this will be easier to document in the oncall wikis.

NB: this is lacking the `delete` functionality atm, but that one is almost never needed.

Reviewed By: krallin

Differential Revision: D21039606

fbshipit-source-id: 7b329e1782d1898f1a8a936bc711472fdc118a96
2020-04-16 03:19:44 -07:00
Thomas Orozco
b9bc56ada5 mononoke/hook_tailer: asyncify everything that's left
Summary: As it says in the title

Reviewed By: farnz

Differential Revision: D21042082

fbshipit-source-id: 0d5fb63ab380aa53a04352a8d8a474390127f68c
2020-04-16 02:15:24 -07:00
Thomas Orozco
e58a0868d5 mononoke/hook_tailer: remove continuous mode
Summary:
We don't use this anymore (instead we just do backtesting in bulk). Let's get
rid of it.

Reviewed By: farnz

Differential Revision: D21042083

fbshipit-source-id: af5aea3033a4d58ba61b8f22d7dc1249a112933e
2020-04-16 02:15:23 -07:00
Thomas Orozco
2ecf51e7af mononoke/hook_tailer: asyncify run_with_limit
Summary:
I'd like to clean up this code a little bit since I'm going to make a few
changes and would like to avoid mixing too many old and new futures.

Reviewed By: farnz

Differential Revision: D21042081

fbshipit-source-id: d6a807ce9c60d09d82c6b8c6866ea23b8ef45f21
2020-04-16 02:15:23 -07:00
Thomas Orozco
d37d58b51d mononoke/hook_tailer: remove dead code
Summary:
run_in_range isn't being used anywhere. Let's get rid of it. Also, let's not
make run_in_range0 a method on Tailer since it's more of a helper function.

Reviewed By: farnz

Differential Revision: D21042084

fbshipit-source-id: 2678a94ce4b0b6ae1c97e47eb02652bcbf238b0d
2020-04-16 02:15:23 -07:00
Thomas Orozco
10b815e1eb mononoke/hook_tailer: remove redundant roundtrip through hg cs id
Summary: What it says in the title.

Reviewed By: farnz

Differential Revision: D21042080

fbshipit-source-id: c5dbcc6179d01da2748d18ecae5b737c436e68a9
2020-04-16 02:15:22 -07:00
Thomas Orozco
c89216e5db mononoke/hook_tailer: remove ad-hoc logging setup
Summary:
The hook_tailer is broken in mode/dev right now because it blows up with a
debug assertion in clap complaining that `--debug` is being added twice. This
is because it sets up its own logging, which is really not needed.

Let's just take this all out: it's not necessary

Reviewed By: farnz

Differential Revision: D21040108

fbshipit-source-id: 75ec70717ffcd0778730a0960607c127a958fe52
2020-04-16 02:15:22 -07:00
Thomas Orozco
a327fcb460 mononoke/hook_tailer: use csid_resolve
Summary: It's nice to be able to use a Bonsai ID if that's what you have.

Reviewed By: farnz

Differential Revision: D21040109

fbshipit-source-id: 4dfc447437053f9d7f4a1c9b3753d51fe5d02491
2020-04-16 02:15:22 -07:00
svcscm
0c995f8c01 Updating submodules
Summary:
GitHub commits:

888146f2cd

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: a5cfbd7cf4710fb861a6662b477cae22ae997276
2020-04-16 00:43:02 -07:00
Arun Kulshreshtha
8c68227742 edenapi_server: add startup debug logging
Summary: Add a few debug-level log lines during server startup so we can see which part of startup is slow.

Reviewed By: quark-zju

Differential Revision: D21054216

fbshipit-source-id: 5dfb7b58fffb360506f34e3f2bb9e8b51fcc5e6b
2020-04-15 23:17:22 -07:00
svcscm
7154f16b01 Updating submodules
Summary:
GitHub commits:

f2d53712ca

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: f8f37a838bf62773e88e6e6b599a96589ff965a4
2020-04-15 23:17:21 -07:00
svcscm
8c28b67a02 Updating submodules
Summary:
GitHub commits:

9abf6b364a
c26703bb49
dc197d1707
b7c2d2f9b2
e1f371c25e
e5885a29fa
32e9736cba
5c31e5ce4f

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: d29c57c074e85d1b30bdb74402f3a157a3dba5f6
2020-04-15 21:04:01 -07:00
Xavier Deguillard
4973c55030 exchange: always call prepushoutgoing hooks
Summary:
Previously, an extension adding the "changeset" pushop might forget to call the
prepushoutgoing hooks, preventing them from being called.

Reviewed By: DurhamG

Differential Revision: D21008487

fbshipit-source-id: a6bc506c7e1695854aca3d3b2cd118ef1c390c52
2020-04-15 20:22:18 -07:00
Jun Wu
f1c9a39922 doctor: check and hide less relevant branches
Summary:
Sometimes due to wrong configuration, branches that are not relevant to the
user become visible. Detect that and provide a way to hide them.

Reviewed By: xavierd

Differential Revision: D21055464

fbshipit-source-id: 19da498a137fdd08e363d6f689b6de31bc884dbd
2020-04-15 19:21:13 -07:00
Jun Wu
c0b5ad2294 doctor: fix too many remotenames
Summary:
Sometimes due to wrong configuration, cloud sync or legacy pull without
selectivepull will pollute the remote bookmark namespace with too many remote
bookmarks.  Detect that and provide a way to reset remotenames to selected
bookmarks.

Reviewed By: xavierd

Differential Revision: D21055466

fbshipit-source-id: f96c6ba79dd8646fa017947e48e80259ed77de67
2020-04-15 19:21:12 -07:00
Jun Wu
491279b140 doctor: fix incorrect visibility header
Summary:
This is rare. But if visibleheads has a broken header, attempt to fix instead
of skipping.

Reviewed By: xavierd

Differential Revision: D21055468

fbshipit-source-id: 8907c84b69eadb50afae1940862db01a926a38f5
2020-04-15 19:21:12 -07:00
Jun Wu
065ca1b066 doctor: add checks about lagged remote/master
Summary: Trigger a `hg pull` if the remote bookmark appears to be lagging.

Reviewed By: xavierd

Differential Revision: D21055465

fbshipit-source-id: e5ea33ca15f50b504368bec0f349a4abe895eee0
2020-04-15 19:21:12 -07:00
Jun Wu
7cf55dceda doctor: be less verbose
Summary: Remove "looks okay" messages. Only report issues and what changed.

Reviewed By: xavierd

Differential Revision: D21055467

fbshipit-source-id: ee7e732934b88bcdead8cb34ac4cd26b9c7aab42
2020-04-15 19:21:11 -07:00
Jun Wu
ebef9f0ab9 tests: remove test-check-config
Summary:
It was for preventing undocumented configs. Practically it does not achieve the
goal and we might prefer not documenting some of the advanced features to reduce
support burden of unusual configs. Therefore remove it.

We can revisit once we want to improve the documentation of the product.

Reviewed By: xavierd

Differential Revision: D21055469

fbshipit-source-id: 2c26791d2284071b1ac26d1190ec5c4876546f77
2020-04-15 19:21:11 -07:00
Jun Wu
2883e9e20d pushrebase: correctly detect the "rebased / obsolete" case
Summary:
`obsolete()` alone shouldn't prevent push. Check if a successor in the
destination branch instead.

Reviewed By: DurhamG

Differential Revision: D20911924

fbshipit-source-id: 0f983f3440a5bcff13e1a98b28aac2df80b419e0
2020-04-15 19:02:36 -07:00
svcscm
7478d41ffe Updating submodules
Summary:
GitHub commits:

3b4602633c
5d585be400
9362555b2e
d2a4722e05
a4472fe07f
e45673dece
4b050c8de3
c86ec6e661
a0260b07ab
dc0fff83ff

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: c7e234f429f50c146135dd82f0c29e1d726e3d45
2020-04-15 18:57:47 -07:00
Jun Wu
ed78133581 phrevset: use GraphQL result if possible
Summary:
Change the fork search to always respect GraphQL if possible. This will result
in more deterministic result, and can avoid full changelog scan if the diff
points to public commits.

Reviewed By: DurhamG

Differential Revision: D21045430

fbshipit-source-id: 2e2b13f5aad3670b9018e5c4ce769b330d14531e
2020-04-15 18:37:18 -07:00
Jun Wu
11a733e700 phrevset: split changelog scan into draft + full scans
Summary:
The local draft scan turns out to be needed by cfgr `jf land` for reasons like
callsign not set (s199694). The whole changelog scan is already slow and will
be slower with segmented changelog so let's log it and see if we can remove it.

Reviewed By: DurhamG

Differential Revision: D21045429

fbshipit-source-id: 999c8479662b3476a09ec852de98cbecebd7f31a
2020-04-15 18:37:18 -07:00
Jun Wu
4ea261914c pager: replace fout and ferr of all ui objects
Summary:
The `ui` object is a bit messy - there are repo specific ui, and non-repo ui,
and ui can be copied around.

This diff changes `fout` and `ferr` to an indirect type that can be mutated
globally so the streampager can affect the `fout` and `ferr` of all related `ui`
objects instead of just one single `ui`.

Reviewed By: DurhamG

Differential Revision: D20903568

fbshipit-source-id: b2f139b91a39c20c22261e03ce50f3cc59074291
2020-04-15 18:23:12 -07:00
Jun Wu
c2ffda7622 pager: configure streampager using hg configs
Summary:
This allows the streampager to be configured via hgrc files.

Default are picked so the behavior is closer to the current default pager
(`less -FRX`).

Reviewed By: DurhamG

Differential Revision: D20902034

fbshipit-source-id: 994ab963ceace02eeb1d18cfa5768e411ca3610b
2020-04-15 18:23:11 -07:00
Adam Simpkins
94c52753d1 relax checking of C++ type formatting in an integration tests
Summary:
One of the thrift tests was checking an error string that was produced from
`folly::exceptionStr()`, which includes the exception type name.  However, in
some build environments this name does not always get demangled (the folly
demangling code may not have been included in the build, or there may be some
other issue).  For instance, in some environments using the CMake-based build
I was seeing the exception type reported as `St12domain_error` instead of
`std::domain_error`.

Reviewed By: genevievehelsel

Differential Revision: D21004345

fbshipit-source-id: 8e6a4ee4d93b1aabbe9c9816c43db803e6e12798
2020-04-15 17:58:12 -07:00
Arun Kulshreshtha
291aee8c21 edenapi_server: remove extraneous #![deny(warnings)]
Summary: `#![deny(warnings)]` does nothing outside of the crate root file, so this was a no-op.

Reviewed By: singhsrb

Differential Revision: D21054214

fbshipit-source-id: dc1931c0a186eb42aae7700dd006550616f29a70
2020-04-15 17:52:05 -07:00
Adam Simpkins
49a9b52cdc getdeps: make several improvements to the eden manifest
Summary:
- Indicate that the EDEN_VERSION_OVERRIDE environment variable affects the
  build.
- Exclude eden/config.py from the shipit  path map, as this file is
  auto-generated in open source builds.
- Include pexpect as a dependency, as this is needed for some of the
  integration tests.

Reviewed By: genevievehelsel

Differential Revision: D21000163

fbshipit-source-id: 8eec378f66487229c995f637c4787eae530c7845
2020-04-15 17:27:06 -07:00
Jun Wu
08d893fbf0 clidispatch: change pager to use stdio
Summary: This makes it work with chg, since `/dev/tty` is not available for chg.

Reviewed By: DurhamG

Differential Revision: D20936967

fbshipit-source-id: f3ded1aa5552f321ff7043a039f4e35a88160a51
2020-04-15 17:12:47 -07:00
Xavier Deguillard
5184a72b56 merge: only enable rustworkers when remotefilelog is enabled too
Summary:
The Rust worker code will only work with remotefilelog, and when the Rust
ContentStore is enabled, make sure to not enable it if these 2 conditions
aren't met.

Reviewed By: quark-zju

Differential Revision: D21033428

fbshipit-source-id: c34c1b39ddb81be399463712216fa2cd68771f41
2020-04-15 16:16:30 -07:00
Adam Simpkins
d18ce1082e split edenfsctl start into foreground vs service logic
Summary:
This refactors the `edenfsctl start` command so that we more clearly split the
functionality into two pieces:
* Starting EdenFS as a service
* Running EdenFS in the foreground

In most normal situations in production the `start`, `restart`, and `stop`
commands are used to manage running EdenFS as a service.  In the future I
believe our service management logic will start to diverge a bit more on Linux
vs Mac vs Windows, and this should help isolate the service-management code a
bit more cleanly.

The foreground behavior is mainly only used by developers during testing and
during the integration tests.  Several options like `--gdb` and `--strace` are
only allowed in foreground mode, and this refactoring makes that clearer.  In
the future we may also want to further restrict this, to allow only
specifying additional custom arguments and a custom binary path when running
in foreground mode.  However, for now I have not updated that as I believe
some of our integration tests may be exercising this behavior today.

This change also cleans up some of the platform-specific code, and lets them
share more of the logic to construct arguments for edenfs.  With this change
`edenfsctl start --foreground` now works on Windows.

Reviewed By: pkaush

Differential Revision: D20833244

fbshipit-source-id: 0f09d59702d8b64ca8f4fedccbc30da1c858afb4
2020-04-15 15:46:25 -07:00
Adam Simpkins
ce48896dad get edenfsctl stop working on Windows
Summary:
Update the `edenfsctl` and `edenfs` code so that `edenfsctl stop` works on
Windows.

Reviewed By: pkaush

Differential Revision: D20854616

fbshipit-source-id: 9a51cdc1f1d1838c5089b945df1fb624a3eaedb7
2020-04-15 15:46:25 -07:00
Adam Simpkins
104ae880db fix issues when checking EdenFS status on windows
Summary:
- Catch the Windows-specific exceptions types thrown when attempting to open
  the socket if EdenFS is not running, and convert this to an EdenNotRunning
  exception.
- Update EdenFS to write its pid to a separate file, in addition to the normal
  lock file, and have `edenfsctl` read this file instead of the lock file on
  Windows.  Other processes cannot read the lock file while EdenFS is running
  and holding the lock, so it is nice to have the pid written in an alternate
  location.

Reviewed By: pkaush

Differential Revision: D20854615

fbshipit-source-id: 1c8e8f402eb17dd012d03e11fbb662f493d9362d
2020-04-15 15:46:24 -07:00
Adam Simpkins
b1a35b8252 move systemd-related start code to its own module
Summary:
Move the `start_systemd_service()` function from `daemon.py` to a separate
module.  This allows `daemon.py` to be imported on Windows without causing any
of the systemd logic to be imported.

I kept this separate from the existing `systemd.py` module for now just to
help keep the dependencies a little bit cleaner.  The `systemd.py` module
currently does not depend on any other logic from other edenfsctl modules.

Reviewed By: pkaush

Differential Revision: D20854612

fbshipit-source-id: dbdbf0fec90682e3b7d16a7532aefdd3f186bf80
2020-04-15 15:46:24 -07:00
Genevieve Helsel
66076644f7 list redirections in eden rage
Summary: I believe it would be nice to include the output of `eden redirect list` in `eden rage` since I've run into a few times this week where that was something that was asked for.

Reviewed By: chadaustin

Differential Revision: D20955632

fbshipit-source-id: 0d28688b3764a1bec8a9e92b72c166dddd18f591
2020-04-15 14:25:11 -07:00
Gabriel Russo
03d4e52ab3 Bump tokio to 0.2.13
Summary:
This is needed because the tonic crate (see the diff stack) relies on tokio ^0.2.13

We can't go to a newer version because a bug that affects mononoke was introduced on 0.2.14 (discussion started on T65261126). The issue was reported upstream https://github.com/tokio-rs/tokio/issues/2390

This diff simply changed the version number on `fbsource/third-party/rust/Cargo.toml` and ran `fbsource/third-party/rust/reindeer/vendor`.

Also ran `buck run //common/rust/cargo_from_buck:cargo_from_buck` to fix the tokio version on generated cargo files

Reviewed By: krallin

Differential Revision: D21043344

fbshipit-source-id: e61797317a581aa87a8a54e9e2ae22655f22fb97
2020-04-15 12:18:00 -07:00
Durham Goode
6078dad33e py3: fix more hggit tests
Summary: These tests now pass with python 3.

Reviewed By: xavierd

Differential Revision: D21011004

fbshipit-source-id: 65ac8f864f6eaf24fa7d3c8b25a013b5e9f28ffe
2020-04-15 11:35:39 -07:00
Mark Thomas
235c9a5cd9 getbundle: compute full set of new draft commits
Summary:
In getbundle, we compute the set of new draft commit ids.  This is used to
include tree and file data in the bundle when draft commits are fully hydrated,
and will also be used to compute the set of mutation information we will
return.

Currently this calculation only computes the non-common draft heads.  It
excludes all of the ancestors, which should be included.  This is because it
re-uses the prepare_phases code, which doesn't quite do what we want.

Instead, separate out these calculations into two functions:

  * `find_new_draft_commits_and_public_roots` finds the draft heads
    and their ancestors that are not in the common set, as well as the
    public roots the draft commits are based on.
  * `find_phase_heads` finds and generates phase head information for
    the public heads, draft heads, and the nearest public ancestors of the
    draft heads.

Reviewed By: StanislavGlebik

Differential Revision: D20871337

fbshipit-source-id: 2f5804253b8b4f16b649d737f158fce2a5102002
2020-04-15 11:00:33 -07:00
Xavier Deguillard
643e69e045 remotefilelog: do not write delta in bundle2
Summary:
Computing delta force the client to have the previous version locally, which it
may not have, forcing a full fetch of the blob, to then compute a delta. Since
delta are a way to save on bandwidth usage, fetching a blob to compute it
negate its benefits.

Reviewed By: DurhamG

Differential Revision: D20999424

fbshipit-source-id: ae958bb71e6a16cfc77f9ccebd82eec00ffda0db
2020-04-15 10:26:39 -07:00
Katie Mancini
16b5e289ae track live FUSE requests
Summary:
This sets up the counters that will allow us to expose metrics for
live FUSE requests in Eden top.

This will allow us to track the number of live FUSE requests and the duration
of the longest FUSE request. If the duration of the longest FUSE request has
become very long, the number of FUSE requests is stuck at some value or
increasingly growing these can indicate there is a problem with the Fuse Channel
or something effecting this.

This provides more insight beyond the metrics for imports since many of the
FUSE requests will not cause imports, so this monitors more functionality.
Further because all user interaction with the filesystem goes through FUSE,
these metrics will give a good overall indication weather Eden is performing
normally.

Reviewed By: chadaustin

Differential Revision: D20846826

fbshipit-source-id: 34d834d193833a3c91d95fbb87361ddd863f64ca
2020-04-15 10:17:58 -07:00
Stanislau Hlebik
d3ec8dd0f3 mononoke: add batch_derived() method
Summary:
A new method on BonsaiDerived trait that derives data for a batch of commits.
Default implementation just derives them in parallel, so it's not particularly
useful. However it might be overriden if a particular derived data has a more
efficinet way of deriving a batch of commits

Reviewed By: farnz

Differential Revision: D21039983

fbshipit-source-id: 3c6a7eaa682f5eaf6b8a768ca61d6f8a8f1258a7
2020-04-15 08:59:10 -07:00
svcscm
06eaf3c226 Updating submodules
Summary:
GitHub commits:

140809ea3f

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 5e57d25493ff36be181b2443add20791ca390866
2020-04-15 08:49:57 -07:00
Stanislau Hlebik
584728bd56 mononoke: warmup content metadata for fsnodes
Summary: It makes it backfill a great deal faster

Reviewed By: krallin

Differential Revision: D21040292

fbshipit-source-id: f6d06cbc76e710b4812f15e85eba73b24cdbbd3e
2020-04-15 08:21:28 -07:00
Thomas Orozco
fec12c95f1 mononoke/hooks: compute the changeset id once, be O(N) as opposed to O(N^2)
Summary:
Unfortunately, `BonsaiChangeset::get_changeset_id()` is a fairly expensive
operation, since it'll clone, serialize, and hash the changeset. In hooks in
particular, since we run this once per hook execution (and therefore once per
file), that can be come a problem.

Indeed, on a commit with 1K file changes, hooks run for ~30 seconds
(P129058164). According to perf, the overwhelming majority of that time is
spent in computing hashes of bonsai changesets. For a commit with 10K changes,
it spends time there as well, it took 3.5 hours.

This diff updates hooks to compute the changeset id just once, which brings our
time down to O(N) (where N = file changes).

Reviewed By: StanislavGlebik

Differential Revision: D21039811

fbshipit-source-id: 73f9939ffc7d095e717bdb5efc46dbf4ad312c65
2020-04-15 06:29:50 -07:00
Thomas Orozco
2d56af23be mononoke/hook_tailer: log completion time
Summary: This is generally helpful to log — see later in this stack.

Reviewed By: HarveyHunt

Differential Revision: D21039810

fbshipit-source-id: 4087db70b3f56f47270c10eb31a37f33c61778df
2020-04-15 06:29:49 -07:00
Kostia Balytskyi
cf10fe8689 admin: make sure bookmark operations create syncable log entries
Summary:
This is important for various syncs.

Note: there's an obvious race condition, TOCTTOU is non-zero for existing bookmark locations. I don't think this is a problem, as we can always re-run the admin.

Reviewed By: StanislavGlebik

Differential Revision: D21017448

fbshipit-source-id: 1e89df0bb33276a5a314301fb6f2c5049247d0cf
2020-04-15 04:17:42 -07:00
svcscm
0656983c66 Updating submodules
Summary:
GitHub commits:

aeb704b05d

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: c5a51e452851911ed5104c8896593096f7924475
2020-04-15 04:17:41 -07:00
svcscm
b6d2cb678b Updating submodules
Summary:
GitHub commits:

3755089477

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: a9a69354a0329bf45986bad3a8d7b0e4f4dd0f32
2020-04-14 21:54:10 -07:00