Commit Graph

63603 Commits

Author SHA1 Message Date
Thomas Orozco
5871cd0a90 third-party/rust: patch Hyper 0.14 sending Content-Length on 101 Continue responses
Summary:
There is a bug in Hyper with 101 Continue responses: it sends a Content-Length.
This makes Proxygen unhappy with websocket upgrades. We used to have this
patched in hyper-02, but since Mononoke is about to update to Tokio 1.x, we
also need in the matching Hyper.

One thing that's a bit awkward is you might notice I changed the fork where the
patch comes from. This is because `cargo vendor` cannot deal with 2 overriding
sources coming from the same upstream. I posted about my adventures in this
here: https://fb.workplace.com/groups/rust.language/permalink/5278514098863829/

Reviewed By: HarveyHunt

Differential Revision: D26780899

fbshipit-source-id: e775b7151427898d63d8767acaa53f5f68229db6
2021-03-04 06:42:56 -08:00
Thomas Orozco
2a803fc10d third-party/rust: update futures
Summary:
Those newer versions of Futures have compatibility improvements with Tokio,
notably:

- https://github.com/rust-lang/futures-rs/pull/2333
- https://github.com/rust-lang/futures-rs/pull/2358

Reviewed By: farnz

Differential Revision: D26778794

fbshipit-source-id: 5a9dc002083e5edfa5c614d8d2242e586a93fcf6
2021-03-04 06:42:55 -08:00
Thomas Orozco
734ea4d855 mononoke/git: make git-pool use tokio_shim
Summary: This is used in Metagit and I'd like to decouple those 2 Tokio 1.x migrations.

Reviewed By: HarveyHunt

Differential Revision: D26813352

fbshipit-source-id: 7bc34e1cad00c83bf66edce559b07104d44a7357
2021-03-04 06:33:10 -08:00
svcscm
ce016a1749 Updating submodules
Summary:
GitHub commits:

980693e7e5

Reviewed By: wittgenst

fbshipit-source-id: cdfade5683c041a42c077870650c7d1431dcd04e
2021-03-04 02:19:49 -08:00
Alex Hornby
8d74e200e8 rust: async shed/sql Transaction apis
Summary: Now the queries macros are asynced, lets do the same with the Transaction api exposed from them.

Reviewed By: krallin

Differential Revision: D26730195

fbshipit-source-id: 278753a5d0401f602ce50519138164bb5e49d550
2021-03-04 01:52:42 -08:00
Alex Hornby
090cdc9389 mononoke: remove sql01::queries from sync_commit_mapping
Summary: Migrate to the std futures version of sql::queries!

Reviewed By: krallin

Differential Revision: D26700359

fbshipit-source-id: 39c75d7896a5975e53dd3af53860ce486683b4ed
2021-03-04 01:52:42 -08:00
Alex Hornby
5ef48e3b4b mononoke: remove sql01::queries from dbbookmarks
Summary: Migrate to the std futures version of sql::queries!

Reviewed By: krallin

Differential Revision: D26700357

fbshipit-source-id: ea9382028b2e5abfa1946e1c5de344e32ac60d04
2021-03-04 01:52:41 -08:00
Alex Hornby
98802f349d mononoke: remove sql01::queries from segmented_changelog
Summary: Migrate to the std futures version of sql::queries!

Reviewed By: krallin

Differential Revision: D26700360

fbshipit-source-id: 9ed2664d522bde8d0e923142357ca876a7de2613
2021-03-04 01:52:41 -08:00
Alex Hornby
a189cf9905 mononoke: remove sql01::queries from mutable counters
Summary: Migrate to the std futures version of sql::queries!

Reviewed By: krallin

Differential Revision: D26700358

fbshipit-source-id: 4a100705c43d77d67fb784afbb6b44b57904cba0
2021-03-04 01:52:41 -08:00
Alex Hornby
2ff9ad0fea rust: async sql queries macros
Summary:
Async the query macros.  This change also migrates most callsites, with a few more complicated ones handle as separate diffs, which temporarily use sql01::queries in this diff.

With this change the query string is computed lazily (async fn/blocks being lazy) so we're not holding the extra memory of query string as well as query params for quite as long.  This is of most interest for queries doing writes where the query string can be large when large values passed (e.g. Mononoke sqlblob blobstore )

Reviewed By: krallin

Differential Revision: D26586715

fbshipit-source-id: e299932457682b0678734f44bb4bfb0b966edeec
2021-03-04 01:52:41 -08:00
svcscm
cfd978798c Updating submodules
Summary:
GitHub commits:

240b7fe850
cb25bc1128

Reviewed By: wittgenst

fbshipit-source-id: b9d8c5c7ceff708bd2b59d72e5ce1e470fc25131
2021-03-04 01:52:40 -08:00
svcscm
58ccacab51 Updating submodules
Summary:
GitHub commits:

63c11c4e50

Reviewed By: wittgenst

fbshipit-source-id: 2f20ea77802f75eea4d995b19a0f3de747f95130
2021-03-03 22:39:16 -08:00
Jun Wu
e70d89dd39 py3: fix absorb -i
Summary:
The previous fix D23357655 (d60e80796a) actually only fixes py2 absorb -i. On Python 3,
`b"-"[0]` is `45`, not `b"-"` like Python 2. Fix it again using `b"-"[0:1]`.

Reviewed By: singhsrb

Differential Revision: D26805315

fbshipit-source-id: 07ca850373a6bc49b561466ead478024631ce051
2021-03-03 20:50:31 -08:00
svcscm
2d28a8708a Updating submodules
Summary:
GitHub commits:

e2a49e7507
7dd554796a

Reviewed By: wittgenst

fbshipit-source-id: b82fd1eaaf5d7f90dc25ceba11d029f2e977e9c0
2021-03-03 20:44:16 -08:00
Xavier Deguillard
d9207cbe4e backingstore: do not initialize memcache for debug builds
Summary:
Memcache is dogslow to initialize, taking >30s on debug build. As a
consequence, this slows down every single test by that amount time, with the
guarantee that no blobs will be found in memcache, ie: a total waste of time.

On release builds, Memcache is significantly faster to initialize, so let's
only disable initializing Memcache for debug builds only.

Reviewed By: fanzeyi

Differential Revision: D26800265

fbshipit-source-id: 8b393c603414de68268fdadb385de177e214a328
2021-03-03 20:14:46 -08:00
Durham Goode
f22e274e94 py3: add py3 windows package to hgbuild
Summary:
Adds a new hg py3 windows package to hgbuild for publishing. Currently
the tests don't run. I'll do that next.

Reviewed By: quark-zju

Differential Revision: D26768336

fbshipit-source-id: bd4533abbbc1e1c861aa9995b7a3868a7f6a1a22
2021-03-03 19:52:54 -08:00
svcscm
bbd40309ec Updating submodules
Summary:
GitHub commits:

626e5cafa6
d9b650538e
e11e7bf1aa

Reviewed By: wittgenst

fbshipit-source-id: f84ffd80ac2762c043736a76acf641c43c1acbfe
2021-03-03 19:52:54 -08:00
svcscm
24445cf5ae Updating submodules
Summary:
GitHub commits:

5916a3a072
1259373958
a46be0cadb
62f48d83d3

Reviewed By: wittgenst

fbshipit-source-id: afb083438483e60712ddd2835766aa326b27d566
2021-03-03 18:42:52 -08:00
Jun Wu
4afd737525 hide: cleanup non-essential remote bookmarks automatically
Summary: Trigger the cleanup logic automatically if there are too many remote bookmarks.

Reviewed By: sfilipco

Differential Revision: D26802251

fbshipit-source-id: 1ab40c7be98c507865ea17001dc9775b6edf4446
2021-03-03 18:30:08 -08:00
Jun Wu
01035df3a4 hide: make --cleanup remove non-essential remote bookmarks
Summary: This is handy to make the `sl` output cleaner.

Reviewed By: sfilipco

Differential Revision: D26802250

fbshipit-source-id: 1b74f3d9a42ab6b0780f07bec59b03a5cd0ea6a9
2021-03-03 18:30:08 -08:00
Jun Wu
e33255b67d remotenames: add a command to clean up remote bookmarks
Summary: Add API and command to remove non-essential remote bookmarks

Reviewed By: sfilipco

Differential Revision: D26802252

fbshipit-source-id: bf715905f146f31aac19dccb90022bea31392323
2021-03-03 18:30:07 -08:00
Jun Wu
4abfeb66e8 remotenames: raise if key bookmarks point to unknown commits
Summary:
Previously remotenames pointing to unknown commits are just ignored.
If key remotename like master is ignored, it can cause very slow operations
in pull, etc. Let's just raise an exception in this case.

Reviewed By: DurhamG

Differential Revision: D26800236

fbshipit-source-id: 13be4af5499da1b9098b4ff1a6ef41c54092824a
2021-03-03 18:20:05 -08:00
Jun Wu
7a759b6075 visibility: remove public heads
Summary:
Remove public heads when using Rust changelog backends. This should address
some issues seen in commit cloud sync.

This is done at the metalog commit time so we get the latest "remotenames" data for
accurate "public()" set calculation.

Reviewed By: singhsrb

Differential Revision: D26792731

fbshipit-source-id: 00b894fee9804740d664dad0ac47be564820da33
2021-03-03 18:06:08 -08:00
svcscm
c7cede16b1 Updating submodules
Summary:
GitHub commits:

64d8f3fdcd

Reviewed By: wittgenst

fbshipit-source-id: 390b87e232ac9012054d165effc290c6c81d7b6f
2021-03-03 18:06:07 -08:00
svcscm
0c65db2639 Updating submodules
Summary:
GitHub commits:

c0fd94f1eb
d8bd4d9ddd

Reviewed By: wittgenst

fbshipit-source-id: 510cce2995938023d9d6e2cd1ffc10a6e05c1e04
2021-03-03 17:20:34 -08:00
Jun Wu
8142c5e5f1 windows: set output encoding to UTF-8
Summary:
The output encoding is used to render the graph log edges. With D26612487 (62ba7447f6), we
switched to Rust IO. The Rust IO requires UTF-8 data. So let's set
outputencoding to UTF-8.

Reviewed By: sfilipco

Differential Revision: D26799551

fbshipit-source-id: aa3e6420067d7c75bef47448e12e48f4cef56a84
2021-03-03 16:45:16 -08:00
svcscm
f18783d43d Updating submodules
Summary:
GitHub commits:

1beb55a5f3
8a6dbbf582
a85231436d
c2792dd135
114fd03755
382c1cdcc6

Reviewed By: wittgenst

fbshipit-source-id: cf49166c149dcbaf3f75b64abd824b34bed0c9b2
2021-03-03 16:45:16 -08:00
svcscm
36e0669579 Updating submodules
Summary:
GitHub commits:

12660505e0
bc57378516
4126bdc0e1
12f097bf23

Reviewed By: wittgenst

fbshipit-source-id: e2062ed369a3b3ef961a627d67df640adf035efa
2021-03-03 15:10:08 -08:00
Durham Goode
6c4dd778bb peers: allow remote peer ui to inherit help and edenapi configs
Summary:
We have configs that affect peer connections, like help.tlsauthhelp,
that are considered "repo-specific" configs now that they come from
dynamicconfig. Unfortunately repo-specific configs are removed from the ui when
copying it for use in a new remotepeer.

Let's add a few config sections to the allow list for what can go in a remote
peer ui. I have a task for making even repo-less commands load the standard
config, so in the future we can have these new peer objects use the standard
repo-less config, which will remove much of the need for maintaining this
allow-list.

Reviewed By: singhsrb

Differential Revision: D26784364

fbshipit-source-id: 30d9292e48b0f27ce7f4d4904ff6d5ff8dcaf069
2021-03-03 13:40:49 -08:00
svcscm
afd8cda82b Updating submodules
Summary:
GitHub commits:

e37262d4da
14ad881c2c
7319b74d5e

Reviewed By: wittgenst

fbshipit-source-id: 5dfd56a1e3ee375c90bc2de42bc65348ee3f4a52
2021-03-03 13:40:49 -08:00
svcscm
82b8c33803 Updating submodules
Summary:
GitHub commits:

940d589e20
e0a2e71139

Reviewed By: wittgenst

fbshipit-source-id: 8a50571fa4b446b816d778a6c2c92a0b2633a76e
2021-03-03 12:44:12 -08:00
Aida Getoeva
fc0d0732c5 mononoke/validate-owners: implement secure-owners check
Summary: For the OWNERS files in `secure` and `core` we need to check that all the groups and users mentioned in the OWNERS are in the secure owners group.

Reviewed By: StanislavGlebik

Differential Revision: D26761772

fbshipit-source-id: 02ad2bc45c82792e51702cd4d8d092557c76c015
2021-03-03 12:40:07 -08:00
svcscm
355232b627 Updating submodules
Summary:
GitHub commits:

562942c238
6cca267dff
7b1266d32e
11afccafc2

Reviewed By: wittgenst

fbshipit-source-id: e1bc7c66c61166613a9acc355bf2416e08f86979
2021-03-03 12:07:04 -08:00
Stanislau Hlebik
f1772e601f mononoke: use darkstorm repo id as a counter repo id if specified
Summary:
When we are using hg sync job to backup a darkstorm repository we need to read
latest commits from source mononoke repo, however use darkstorm repo id for
counters - otherwise there will be two sync job using the same counter (i.e.
mononoke -> hg and mononoke -> darkstorm) and that wouldn't end well.

This diff does that. I also changed our tests a bit to always set
--darkstorm-repo-id option, since we are going to use it in prod anyway.

Differential Revision: D26782326

fbshipit-source-id: 0f6188047fe3d01dfa7bf7b3eb407e4f2c9a5d09
2021-03-03 12:03:53 -08:00
svcscm
f63d64bc05 Updating submodules
Summary:
GitHub commits:

c1406faeb5
a14ce83cb5

Reviewed By: wittgenst

fbshipit-source-id: fd0f56c9224c4a3dd316f309d51bf9b58445bbb8
2021-03-03 10:16:14 -08:00
Jun Wu
1bde2cd85b doctor: use remotenames serialization APIs from bookmarks.py
Summary: Avoid duplication about the serialization logic.

Reviewed By: DurhamG

Differential Revision: D26707455

fbshipit-source-id: cf2f1926fe74b51bf052f6c2c041b26d6f31de97
2021-03-03 09:33:34 -08:00
Jun Wu
5a155dbb3d remotenames: extract remotenames serialization to a separate method
Summary:
Provide a method that does pure serialization from (name, node) pairs to the
remotenames blob.  This makes it reusable outside `vfs` or `repo` context.

Reviewed By: DurhamG

Differential Revision: D26707454

fbshipit-source-id: c45662922d337e31d17070e5f5828d47e23773b1
2021-03-03 09:33:34 -08:00
svcscm
ef98a1c6d5 Updating submodules
Summary:
GitHub commits:

ffd51f4033

Reviewed By: wittgenst

fbshipit-source-id: 0a25812520c4902d16fa88f13a26b95f8c9db001
2021-03-03 09:14:04 -08:00
Liubov Dmitrieva
02c0705012 previous filter didn't work to get rid of the public commits in commit cloud
Summary:
sometimes in visible heads the hashes of the remote bookmarks are not the latest, so the filtration like it was initially implemented didn't work

if visible heads are polluted, it makes commit cloud operations slow but at least this correct check won't allow public heads to enter workspaces

moreover, after roll out it will fix already existing workspaces with public heads automatically by removing them from workspaces

also, this will allow our magic script to fix remote bookmarks in workspaces to work properly (debugfixcommitcloud), unfortunately now it can break a workspace if we remove bookmarks but not heads

cc quark-zju - could we fix the initial issue how the public heads can enter visible heads in some cases in pull logic? I have a repro if you are interested in.

Reviewed By: singhsrb

Differential Revision: D26778632

fbshipit-source-id: 05dbd4cd415911283ea66ae17772b8d3e458bbd7
2021-03-03 08:56:25 -08:00
svcscm
35f044481e Updating submodules
Summary:
GitHub commits:

2c06b32a70
0315b66020
2ff69026bf
b4829c9f5b
4838648ba7
ea14a78016
c7d18be522
bd6da581ef
dfa3453aee
eaf628a88b
4b3e51f433

Reviewed By: wittgenst

fbshipit-source-id: 11352ceea60386a809dfe62feb8e9dfec26fe428
2021-03-03 08:56:25 -08:00
svcscm
c4a7005400 Updating submodules
Summary:
GitHub commits:

a746db3584
8ff51fef58
d1d3d13ac2
30ba5616c8
7422516dce
8bb5d9f008
aa46cfb791
72d1e258cd
589ad3946e
c4afffca66
8977cc842e
f64122486e
b2e2085eaf
8f933b5915
8f14383583
0b42e07216
b49fc475a8
5ed1e8c3b2
507a0ebbd9
7f07f44428

Reviewed By: wittgenst

fbshipit-source-id: 5c9c9c449759132f4f859392eed80449ae05ad5f
2021-03-03 08:17:30 -08:00
Stanislau Hlebik
85fc62cb0d mononoke: fix ordering in "mononoke_admin bookmarks log"
Summary: Previously they were returned in random order. This diff fixes it.

Reviewed By: krallin

Differential Revision: D26778558

fbshipit-source-id: bb8eef4f6dadb6b09227d7140c2a462a471550b3
2021-03-03 08:08:36 -08:00
Jan Mazur
d5e9c99e09 change hipster action in check_if_trusted
Summary:
It doesn't make a whole lot of sense to user the "tupperware" permission here.
Lets make a distinction in who is allowed to provision mononoke vs. who is allowed to forward identities to it.
I have created a separate action with the same identities allows as in the "tupperware" permission.

https://www.internalfb.com/intern/hipster/acls/view/?type=TIER&consumer=mononoke

Reviewed By: StanislavGlebik

Differential Revision: D26777489

fbshipit-source-id: d3999dc4da7a57ac721572610f65eba664e595e9
2021-03-03 06:35:11 -08:00
Thomas Orozco
ef7045e818 common/rust: use fbinit-tokio
Summary:
This diffs add a layer of indirection between fbinit and tokio, thus allowing
us to use fbinit with tokio 0.2 or tokio 1.x.

The way this works is that you specify the Tokio you want by adding it as an
extra dependency alongside `fbinit` in your `TARGETS` (before this, you had to
always include `tokio-02`).

If you use `fbinit-tokio`, then `#[fbinit::main]` and `#[fbinit::test]` get you
a Tokio 1.x runtime, whereas if you use `fbinit-tokio-02`, you get a Tokio 0.2
runtime.

This diff is big, because it needs to change all the TARGETS that reference
this in the same diff that introduces the mechanism. I also didn't produce it
by hand.

Instead, I scripted the transformation using this script: P242773846

I then ran it using:

```
{ hg grep -l "fbinit::test"; hg grep -l "fbinit::main"  } | \
  sort | \
  uniq | \
  xargs ~/codemod/codemod.py \
&&  yes | arc lint \
&& common/rust/cargo_from_buck/bin/autocargo
```

Finally, I grabbed the files returned by `hg grep`, then fed them to:

```
arc lint-rust --paths-from ~/files2 --apply-patches --take RUSTFIXDEPS
```

(I had to modify the file list a bit: notably I removed stuff from scripts/ because
some of that causes Buck to crash when running lint-rust, and I also had to add
fbcode/ as a prefix everywhere).

Reviewed By: mitrandir77

Differential Revision: D26754757

fbshipit-source-id: 326b1c4efc9a57ea89db9b1d390677bcd2ab985e
2021-03-03 04:09:15 -08:00
Thomas Orozco
a17cd28156 common/rust: introduce fbinit-tokio
Summary:
This introduces a couple "trampoline" crates to use alongside fbinit in order
to let callers choose which version of Tokio they want by selecting one or the
other and adding it to their `TARGETS` alongside `fbinit` (right now, they
need to include `tokio` there).

The entrypoints here will be called by the expansion of the `#[fbinit::main]`
and `#[fbinit::test]` macros for `async fn`-s.

Right now, this isn't wired up: that happens in the next diff. In this diff,
I'm just adding the two entrypoints.

Reviewed By: mitrandir77

Differential Revision: D26754751

fbshipit-source-id: 1966dadf8bbe427ce4a1e90559a81790d8e56e7a
2021-03-03 04:09:15 -08:00
Ilia Medianikov
58b9ac23ef mononoke: Don't create separate ConfigStore's in tests
Summary:
Atm in tests a separate ConfigStore with file source is created for some configs and then a reference to it is dropped immediately ([see get_config_handle function in mod.rs](https://fburl.com/diffusion/fpkj7ekv)). This is uncomfortable as we may need a reference to e.g. force update configs in tests.

Instead of creating separate stores we can reuse static configerator which already uses local files (in tests).

Reviewed By: krallin

Differential Revision: D26725515

fbshipit-source-id: 24269cd93b7d35216c025807c3f3eb527688b72b
2021-03-03 03:52:41 -08:00
Mark Juggurnauth-Thomas
472e1f8ce2 mononoke_api: list public bookmarks from the warm bookmarks cache
Summary:
For public bookmarks, we can avoid querying the database and instead serve
`list_bookmarks` from the warm bookmarks cache.  The listed bookmarks might
be slightly old, but only because derived data is still in progress, and so
listing the older bookmark value is a better choice.

The tests now need a way to make sure that the warm bookmark cache is
up-to-date, so add a `sync` method that waits for a complete cycle of the warm
bookmark cache update thread.

Reviewed By: StanislavGlebik

Differential Revision: D26693444

fbshipit-source-id: 7145964bdb8c22d98ab6a2bb8c5091c19addd03e
2021-03-03 02:43:49 -08:00
Xavier Deguillard
ec1307cacb eden: only fetch data during a prefetch
Summary: EdenFS doesn't need the history, therefore let's not spend time prefetching it.

Reviewed By: fanzeyi

Differential Revision: D26767634

fbshipit-source-id: 7113f4ce79fdef5455a2bb238ab9d51b7339d8b6
2021-03-02 19:37:38 -08:00
Jun Wu
eb56d0ce7c remotenames: extract remotenames parsing to a separate method
Summary:
Parsing the remotenames (blob) into a list of name -> node pairs.
This makes it reusable outside `vfs` or `repo` context.

Reviewed By: DurhamG

Differential Revision: D26707457

fbshipit-source-id: e6c8bd9ff14d0fea9209c25b89fe733675da747e
2021-03-02 18:16:13 -08:00
Jun Wu
2297596687 absorb: use new memctx APIs
Summary:
Use the new memctx.mirror and memctx.__setitem__ APIs. This simplifies the
code.

Reviewed By: DurhamG

Differential Revision: D26726474

fbshipit-source-id: 044616137b883ca250e6d84c0ecfcc70458ec07a
2021-03-02 18:12:35 -08:00