Commit Graph

57284 Commits

Author SHA1 Message Date
Genevieve Helsel
7492cc406f add more explicit remediation steps for stale mounts after restart
Summary:
We got a user request to add this output after a restart. This (` run "cd / && cd -" to
update your shell's working directory.`) is the output from eden doctor when it detects stale mount points. I don't think it hurts to add, especially since new customers may not make the connection/have the context to deduce that "programs" in this message also apply to the user's shell.

Reviewed By: kmancini

Differential Revision: D20971070

fbshipit-source-id: 3448651cae90b2b5c8c4d2432b946521cdc5a292
2020-04-20 09:21:01 -07:00
Lukas Piatkowski
1b7e0dbfd6 Re-sync with internal repository 2020-04-20 16:35:04 +02:00
Thomas Orozco
825b0a1daa mononoke/hg_sync: fix off-by-one error in globalrev sync
Summary:
The ID in Hgsql is supposed to the next globalrev to assign, not the last one
that was assigned. We would have otherwise noticed during the rollout since
we'd have seen that the counter in Mercurial wasn't `globalrev(master) + 1`
(and we could have fixed it up manually before it had any impact), but let's
fix it now.

Reviewed By: StanislavGlebik

Differential Revision: D21089653

fbshipit-source-id: 0a37e1b7299a0606788bd87f788799db6e3d55f4
2020-04-20 07:16:44 -07:00
Stanislau Hlebik
7a03ef85bc mononoke: do not cache gets in MemWritesBlobstore
Summary:
At the moment MemWritesBlobstore stores both writes and reads. This is not
always desirable - in particular, in the next diff I'd like to add --dry-run
mode to backfill_derived_data which would keep everything that was derived in
memory. In that case storing all data that we read from blobstore might be too
much.
Given that we don't need this functionality let's just remove it

While there also add a method to get access to the underlying cache - again, it
will be used in the next diff.

Reviewed By: krallin

Differential Revision: D21088794

fbshipit-source-id: 91c8729d748d8ad8d9a70e6f8d5e15afe5021e8c
2020-04-20 06:57:41 -07:00
Stanislau Hlebik
6ca292ef57 mononoke: add derive_fsnode_in_batch
Summary:
This adds a special mode of deriving fsnodes that will be used in
backfill_derived_data. From my experiments it looks like it got 5-10 times
faster.

I tried to explain how it works in the comments - lmk if that's not enough.

Reviewed By: mitrandir77

Differential Revision: D21067817

fbshipit-source-id: ff72a079754a2c15f65852c28d80f723961b53c4
2020-04-20 06:57:40 -07:00
Stanislau Hlebik
d34a940ab5 mononoke: explicity enable derived data type
Summary: See comments for more details

Reviewed By: krallin

Differential Revision: D21088800

fbshipit-source-id: b4c187b5d4d476602e69d26d71d3fe1252fd78e6
2020-04-20 06:57:40 -07:00
Stanislau Hlebik
1e908ed410 mononoke: change stream::iter into a for loop
Summary: I think it's more readable this way

Reviewed By: krallin

Differential Revision: D21088598

fbshipit-source-id: 1608c250701ae6870094f0f61c0c2ce4e2c12ebf
2020-04-20 06:57:40 -07:00
Stanislau Hlebik
2d56b1d530 mononoke: move backfill derived data to a separate directory
Summary:
In the next few diffs I'm going to add more functionality to backfill derived
data. The file has grown quite big already, so I'd rather put this new
functionality in a separate file. This diff does the first step - it just moves
a file to a separte directory.

Reviewed By: farnz

Differential Revision: D21087813

fbshipit-source-id: 4a8e3eac4b8d478aa4ceca6bb55fa0d2973068ba
2020-04-20 06:57:39 -07:00
Stanislau Hlebik
74fe56b5d8 mononoke: fix timeout in integration tests
Reviewed By: krallin

Differential Revision: D21129373

fbshipit-source-id: 7c47e5b5a156babfc8ad9819af44f807a1a036d1
2020-04-20 05:28:52 -07:00
Xavier Deguillard
af1ab52527 merge: add a "rg" merge action
Summary:
When a file goes from being a symlink to a regular file, a regular update
action ("g") is used, and the Python code implicitely remove the symlink before
writing to it. In the Rust code, we don't and as a consequence write through
the symlink, not the intended behavior.

An alternative way of fixing this would be to perform an lstat(2) before
writing to a file, but the cost of doing that will be fairly high for a very
unlikely situation especially since the manifest diff can give us exactly this
information.

This whole merge code feels extremely fragile, so I'm definitively not sure if
I got all the places that needs updating :(.

Reviewed By: DurhamG

Differential Revision: D21082733

fbshipit-source-id: 4f36a67363915c9b67d5a0b290a226075a9f1d31
2020-04-19 22:48:19 -07:00
svcscm
ec6bd59f88 Updating submodules
Summary:
GitHub commits:

23496d2d53
19fcc32e27

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: ebb56f048f23336c39d4b1046c781a2206f95988
2020-04-19 22:48:19 -07:00
svcscm
b80cad2730 Updating submodules
Summary:
GitHub commits:

9e69c39c2f

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 222389e953191e62fab555dc0f4a8353fa828ab3
2020-04-19 12:24:45 -07:00
svcscm
e41cba0dd0 Updating submodules
Summary:
GitHub commits:

fb0e252e1f
7c40dec732
8db6fc263f

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 1b0131a711a486e8f00d83562ff42d4ded5eba2f
2020-04-18 12:28:17 -07:00
svcscm
a8518830f3 Updating submodules
Summary:
GitHub commits:

2cf08ee6ad

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 0a9b18a05f44d84e8f9a1eb552dbefd84b08a33f
2020-04-18 12:28:17 -07:00
svcscm
7c0cdd0076 Updating submodules
Summary:
GitHub commits:

7095c7d0fe
4a3a0d6379
f093ae8673
243852ec15
5c3e0b543a

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: d1de638144b89189a4557dfa4bc23d628b3155a5
2020-04-17 16:37:21 -07:00
Stanislau Hlebik
3193f4fab3 mononoke: fail with non-zero exit code in serve_forever if failure happened
Summary:
Previously our jobs would have exit with error code 0 even if there was an
actual error. The reason for this was because error was just ignored (or rather
just printed to stderr).
This is not a huge problem but it makes tw output confusing - it shows that
the task was "Completed" while in reality it "Failed"

Reviewed By: ahornby

Differential Revision: D20693297

fbshipit-source-id: 4f615e2ef11f2edbb9bdbcf49cb1635929fdae89
2020-04-17 14:57:56 -07:00
svcscm
16dca9a013 Updating submodules
Summary:
GitHub commits:

08438ba241
b432d9e11f
63d82e57b9
cc7ba2dbbd
dc2958f1d2
ac90359ba4
f86e22cb98

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 6ccb7149fa8dc59f8b0af139c5e49e17cb7eae8d
2020-04-17 13:27:40 -07:00
Simon Farnsworth
fec914e397 Make unsharded SQLBlob able to use myrouter
Summary: For some reason, direct connections don't work from devvm4263.prn3.facebook.com, complaining about an IP address mismatch. Rather than debug that, just use MyRouter.

Reviewed By: StanislavGlebik

Differential Revision: D21089203

fbshipit-source-id: 88489a6a3b83de885c7c6e9405b325b56b807e12
2020-04-17 08:38:59 -07:00
Simon Farnsworth
f5d2983bc7 Recreate blobstore for each benchmark
Summary:
I was getting weird results from SQLBlob, which I traced to connections being closed a certain amount of time after the first query.

Fix this by recreating the blob store (thus using new connections) each time.

Reviewed By: StanislavGlebik

Differential Revision: D21089041

fbshipit-source-id: e94f8993d64dbd81d9f122f92d64aa92dad8514f
2020-04-17 08:38:59 -07:00
Thomas Orozco
518167f581 mononoke: allow for HgsqlGlobalrevs name not matching the HgsqlName
Reviewed By: ahornby

Differential Revision: D21088256

fbshipit-source-id: 6ed2969d41ade83d1a603e319450be7decd3f151
2020-04-17 06:24:10 -07:00
Thomas Orozco
c12037e4af mononoke/hook_tailer: make concurrency configurable
Summary: That is helpful when e.g. benchmarking on the most humongous commits.

Reviewed By: farnz

Differential Revision: D21064716

fbshipit-source-id: 62973d8e4f0352a2d963bb2e8a87bdced6dedc85
2020-04-17 04:52:28 -07:00
Thomas Orozco
805a150bb6 mononoke/hook_tailer: support passing a list of changesets to tail
Summary:
This makes it easier to test performance on a specific set of commits. As part
of that, I've also updated our file reading to be async since why not.

Reviewed By: farnz

Differential Revision: D21064609

fbshipit-source-id: d446ab5fb5597b9113dbebecf97f7d9b2d651684
2020-04-17 04:52:28 -07:00
Thomas Orozco
d6d5129fa3 mononoke: add smoke tests for the hook tailer
Summary:
Let's try and make sure this doesn't bitrot again by adding a smoke test. Note
that there are no hooks configured here, so this exercises everything but the
actual hook running, but for now this is probably fine.

Note that this required updating the hook tailer to use the repository config
for the hook manager, since you can't start AclChecker in a test otherwise.

Reviewed By: StanislavGlebik

Differential Revision: D21063378

fbshipit-source-id: c7336bc883dca2722b189449a208e9381196300e
2020-04-17 04:52:27 -07:00
Thomas Orozco
cc45bb8d56 mononoke/hook_tailer: use csid_resolve for exclusions
Summary: There's no reason to force using Hg Changeset IDs here.

Reviewed By: StanislavGlebik

Differential Revision: D21063377

fbshipit-source-id: e4c3943449c33340159afbef819dd3dbf786bf5c
2020-04-17 04:52:27 -07:00
Thomas Orozco
1e28a37e0c mononoke/hook_tailer: remove a bit more dead code
Summary: What it says in the title

Reviewed By: farnz

Differential Revision: D21043171

fbshipit-source-id: 151a49cc0847b1b4f577df631c3cc6bb5ebfa77e
2020-04-17 04:52:26 -07:00
Thomas Orozco
0d07c819a9 mononoke/hook_tailer: allow for logging stats to a csv
Summary:
I'd like to make sure that performance of our hooks is now linear with regard
to the changeset size after D21039811.

Reviewed By: farnz

Differential Revision: D21043172

fbshipit-source-id: a36edc5cfdb26fc63160dfdbc47be157b7506523
2020-04-17 04:52:26 -07:00
Thomas Orozco
53cb9829c6 mononoke/hook_tailer: stream outcomes
Summary:
Rather than buffer everything, let's stream outcomes as we go. Also, let's
track the number of changesets we accepted or rejected, as opposed to the hook
instance count (my goal is to output all that in a CSV if we want more detail).

Reviewed By: StanislavGlebik

Differential Revision: D21043173

fbshipit-source-id: 1b20339a52ac95a0a771b9ef469d19dd14ffc2c3
2020-04-17 04:52:26 -07:00
svcscm
771d00f6f2 Updating submodules
Summary:
GitHub commits:

091c004733
9773853773

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 4dd2d69aa9f517c9345b8004c14d8db1c56ffcd6
2020-04-17 04:02:40 -07:00
svcscm
3b951b7e23 Updating submodules
Summary:
GitHub commits:

8a5981ec8e

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 96cae954ff31fcb13248d3b78ef4bad11f1a7cdd
2020-04-17 04:02:40 -07:00
svcscm
82c9973cb3 Updating submodules
Summary:
GitHub commits:

69049d1a47
131dac78ff
a57ee74a02
62fb9e598f
9e6f3efcd2
0ba99f6b0a
74d5c977b7
9e74b34375

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 55b738c3d98b47584e8c51ec64c1cdac463f73fa
2020-04-16 20:04:24 -07:00
Durham Goode
7edc29d07c filesystem: move rust walker to it's own file
Summary:
We'll be adding more data to the filesystem layer, so let's move this
out of lib.rs.

Also made a slight tweak to expose File metadata in the walk results, which will be used by the future pending changes logic to avoid re-stating the file.

Reviewed By: xavierd

Differential Revision: D20546903

fbshipit-source-id: 70456055b0da601990e6d6ff535678d2df6c50ba
2020-04-16 16:51:21 -07:00
Egor Tkachenko
ba141a2d70 mononoke: opsfiles: Port chef_chef_test.sh hook
Summary: Porting chef_chef_test.sh hook into mononoke rust hooks

Reviewed By: HarveyHunt

Differential Revision: D21040287

fbshipit-source-id: 663d79f6d1e467be57fd82c7e06660971c8bd90d
2020-04-16 16:46:02 -07:00
Arun Kulshreshtha
13c6ccdab6 edenapi_server: use constants for long argument names
Summary: Use constants for flag names instead of duplicating them as hardcoded strings.

Reviewed By: xavierd

Differential Revision: D21072045

fbshipit-source-id: 4617d169d034e05dcf11eb138ad0b6eaf915edec
2020-04-16 16:13:03 -07:00
svcscm
55e152274b Updating submodules
Summary:
GitHub commits:

117f63b21b
9e19d775b8

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 5ac21cf9aef99d2460ccb6ae1dbc983673d8e6c6
2020-04-16 15:18:11 -07:00
Andrii Grynenko
b7ad8d6bb5 Remove unnecessary calls to add RSRoutingHandler
Summary: RSRoutingHandler is now added by default

Reviewed By: bithree

Differential Revision: D21058633

fbshipit-source-id: 7d7607a5c5c7c3a5ed70259496c5f036c6fa8e4c
2020-04-16 14:26:09 -07:00
svcscm
401c286de2 Updating submodules
Summary:
GitHub commits:

9a081c46cb
3e66804d9c
6717ada899
93844d05fa

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 70fd7b9e6dc1ab116252a17538cac04851b5f3c0
2020-04-16 14:15:53 -07:00
Xavier Deguillard
10e9a56434 treemanifest: do a repack instead of purging treemanifest
Summary:
Purging treemanifest packfiles always made little sense to me, as the reason we
have tons of them, is because we fetched tons of them. Remove all of them would
just lead to the same situation again. Let's just do a repack instead.

Reviewed By: markbt

Differential Revision: D21065723

fbshipit-source-id: a7cdee1de1d7897481f75c13d8aceeb8c1a68550
2020-04-16 13:06:50 -07:00
svcscm
b1d382892f Updating submodules
Summary:
GitHub commits:

597152497e
52a8633f0e
9a751a74b8
5801af4646
e74840c489

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 6e751ccbd4d23b1f3c866481cab792504196591e
2020-04-16 12:28:51 -07:00
Durham Goode
856262080e py3: enable a number of hgsql related tests
Summary:
Now that we've upgraded mysql-connector-python, we can enable these
tests.

Reviewed By: quark-zju

Differential Revision: D21009185

fbshipit-source-id: e9ae62cadcc8d0a291381ab2cfb5c7bc04606d9e
2020-04-16 12:24:41 -07:00
Arun Kulshreshtha
fc741586d2 Add integration test for EdenAPI server
Summary: Add a simple integration test for the EdenAPI server which just starts up a server and hits its health_check endpoint. This will be expanded in later diffs to perform actual testing.

Reviewed By: krallin

Differential Revision: D21054212

fbshipit-source-id: a3be8ddabb3960d709a1e83599bc6a90ebe49b25
2020-04-16 10:03:13 -07:00
Arun Kulshreshtha
8adac0ec89 edenapi_server: use TLS session data middleware
Summary:
Add TLS session data middleware to the EdenAPI server to allow inspecting HTTPS traffic to the server for debugging purposes.

An additional side effect of setting this up is that we use `bind_server_with_socket_data` to bind to the listening socket, wherein we construct a `TlsSocketData`, which constructs a `TlsCertificateIdentities` containing the client certificates, which are later added to the server's State by Gotham. Having the client certificate information in the State is necessary in order for the ClientIdentityMiddleware to work, and will allow enforcement of ACLs based on the provided client identities.

Reviewed By: krallin

Differential Revision: D21054213

fbshipit-source-id: 7002c73b7458f21e3c4a51a3029d27d1dea7a927
2020-04-16 10:03:12 -07:00
Thomas Orozco
4b8e0b670d mononoke/blobstore_healer: wait for MyRouter
Summary:
We used to implicitly do this when creating the sync queue (though it wasn't
needed there - if we don't wait we crash later when checking for replication
lag), but we no longer do after the SqlConstruct refactor.

This fixes that so now we can start the healer again.

Reviewed By: farnz

Differential Revision: D21063118

fbshipit-source-id: 24f236d10b411bc9a5694b42c19bf2afa352a54c
2020-04-16 09:46:14 -07:00
Thomas Orozco
1ebbe25ed8 mononoke/blobstore_healer: add more Context to errors
Summary:
Being told `Input/output error: Connection refused (os error 111)` isn't very
helpful when things are broken. However, being told:

```
Execution error: While waiting for replication

Caused by:
    0: While fetching repliction lag for altoona
    1: Input/output error: Connection refused (os error 111)
```

Is nicer.

Reviewed By: farnz

Differential Revision: D21063120

fbshipit-source-id: 1408b9eca025b120790a95d336895d2f50be3d5d
2020-04-16 09:46:14 -07:00
Thomas Orozco
27bb95826c mononoke/sql_construct: provide more context when failing to create connections
Summary: What it says in the title.

Reviewed By: ahornby

Differential Revision: D21063122

fbshipit-source-id: fc7c4075af31548180b64ff21472bc32e5625960
2020-04-16 09:46:14 -07:00
Thomas Orozco
87622937f5 mononoke/blobstore_healer: remove more old futures from main
Summary:
This turns out quite nice because we had some futures there that were always
`Ok`, and now we can use `Output` instead of `Item` and `Error`.

Reviewed By: ahornby

Differential Revision: D21063119

fbshipit-source-id: ab5dc67589f79c898d742a276a9872f82ee7e3f9
2020-04-16 09:46:13 -07:00
Thomas Orozco
fe971aef07 mononoke/blobstore_healer: asyncify maybe_schedule_healer_for_storage
Summary:
I'd like to do a bit of work on this, so might as well convert it to async /
await first.

Reviewed By: ahornby

Differential Revision: D21063121

fbshipit-source-id: e388d59cecf5ba68d9bdf551868cea79765606f7
2020-04-16 09:46:13 -07:00
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