Commit Graph

55711 Commits

Author SHA1 Message Date
Thomas Orozco
182b50f25e mononoke/apiserver: run Mononoke code on a tokio-compat runtime
Summary:
Right now, Mononoke code in apiserver executes on Actix's runtime. That's a 0.1
runtime, which means that we're calling into code that might just fail if e.g.
it uses Tokio 0.2 timers.

This is a pretty big footgun, so let's fix it. As it turns out, we already have
a Tokio compat runtime in process, which is (was — this is mostly in SCS now)
used for Thrift calls.

So, let's use that runtime to call into Mononoke code. This ensures we don't
get any nasty surprises of the panicky kind at runtime.

Reviewed By: markbt

Differential Revision: D19902538

fbshipit-source-id: d9d7307b8cf75c3e7e1ecf04c0e10076b3eaef3d
2020-02-18 01:55:01 -08:00
Thomas Orozco
16384599a8 mononoke (+ rust/shed/async_unit): update async_unit to expect async fn's
Summary:
This allows code that is being exercised under async_unit to call into code
that expects a Tokio 0.2 environment (e.g. 0.2 timers).

Unfortunately, this requires turning off LSAN for the async_unit tests, since
it looks like LSAN and Tokio 0.2 don't work very well together, resulting in
LSAN reporting leaked memory for some TLS structures that were initialized by
tokio-preview (regardless of whether the Runtime is being dropped):
https://fb.workplace.com/groups/rust.language/permalink/3249964938385432/

Considering async_unit is effectively only used in Mononoke, and Mononoke
already turns off LSAN in tests for precisely this reason ... it's probably
reasonable to do the same here.

The main body of changes here is also about updating the majority of our
changes to stop calling wait(), and use this new async unit everywhere. This is
effectively a pretty big batch conversion of all of our tests to use async fns
instead of the former approaches. I've also updated a substantial number of
utility functions to be async fns.

A few notable changes here:

- Some pushrebase tests were pretty flaky — the race they look for isn't
  deterministic. I added some actual waiting (using pushrebase hooks) to make
  it more deterministic.  This is kinda copy pasted from the globalrev hook
  (where I had introduced this first), but this will do for now.
- The multiplexblob tests don't work at all with new futures, because they call
  `poll()` all over the place. I've updated them to new futures, which required
  a bit of reworking.
- I took out a couple tests in async unit that were broken anyway.

Reviewed By: StanislavGlebik

Differential Revision: D19902539

fbshipit-source-id: 352b4a531ef5fa855114c1dd8bb4d70ed967dd55
2020-02-18 01:55:00 -08:00
svcscm
f7941272c1 Updating submodules
Summary:
GitHub commits:

a3ced832fe
94e8ca1520
c3aab62eb7
6be2125d41
e957fb3af9
c1ec43136d

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 6415198f9637cdd360f00f9b7d060a3ebad9171e
2020-02-18 01:55:00 -08:00
svcscm
df507d8454 Updating submodules
Summary:
GitHub commits:

af48de4e53

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: c88be02c27154703bc47cebe3145b1abd789aaa2
2020-02-17 18:05:43 -08:00
Durham Goode
d15cb231fb py3: get fastannotate closer to passing
Summary: There's still some issues, but it's a lot closer.

Reviewed By: quark-zju

Differential Revision: D19802023

fbshipit-source-id: da539094cbc0ba3542e4b5fd3d49f5f80455ec23
2020-02-17 14:52:40 -08:00
Durham Goode
09de146878 py3: fix archive
Reviewed By: quark-zju

Differential Revision: D19802024

fbshipit-source-id: 714f1a3af7f62c8215310fe95ac4de28f9b10f1d
2020-02-17 14:52:40 -08:00
Durham Goode
c9b1fee40f py3: fix eol
Reviewed By: markbt

Differential Revision: D19802025

fbshipit-source-id: f6e6c03ea2d64500b92bcf8b97c9ddedb83fd3c0
2020-02-17 14:52:40 -08:00
Durham Goode
c4f7d32501 py3: enable more tests
Summary: Not sure what fixed these, but let's enable them.

Reviewed By: quark-zju

Differential Revision: D19800696

fbshipit-source-id: 2536a121ae37d4b23ef09dcfee8d92ccbbef3af6
2020-02-17 14:52:39 -08:00
Durham Goode
cd8e154e36 py3: fix test-bookmarks.t
Reviewed By: quark-zju

Differential Revision: D19800698

fbshipit-source-id: a9267e3bafa6f8abb472c0002815fdd2bf2024ca
2020-02-17 14:52:39 -08:00
Durham Goode
779b0beb0b py3: fix test-fb-hgext-phabstatus.t
Reviewed By: quark-zju

Differential Revision: D19800700

fbshipit-source-id: b9b052b5ad1bfa1c714b880cf79c9a21cfebadc2
2020-02-17 14:52:39 -08:00
Durham Goode
6b84a5da81 py3: fix stablerev tests
Reviewed By: quark-zju

Differential Revision: D19800695

fbshipit-source-id: a08efe3c43b1fa01be15ec43a6e32f68dd8eec71
2020-02-17 14:52:38 -08:00
Durham Goode
a6353c55f5 py3: fix sparse
Reviewed By: quark-zju

Differential Revision: D19800699

fbshipit-source-id: 7cf86d0ab9a0efc96966ac3747f56b229251fb0d
2020-02-17 14:52:38 -08:00
Durham Goode
00d72e96bf py3: fix gitlookup
Reviewed By: xavierd

Differential Revision: D19800701

fbshipit-source-id: ecc918a0ef7358a29789f0ab6ca50337bec9edf1
2020-02-17 14:52:38 -08:00
Durham Goode
f05a9d79bb py3: fix test-flagprocessors.t
Reviewed By: xavierd

Differential Revision: D19800697

fbshipit-source-id: a785a4a04ce627257993d83197fec270a8688b7d
2020-02-17 14:52:37 -08:00
Durham Goode
fdbaaeeff9 py3: fix treedirstate unicode handling
Summary:
There was a spot where we returned bytes for a filepath. Fix this to
make dirstate tests pass more.

Reviewed By: quark-zju

Differential Revision: D19786274

fbshipit-source-id: 7465cae8bb2e3be7758abc6279ed3f5f59581732
2020-02-17 14:52:37 -08:00
Durham Goode
4f8c30b04e py3: enable 92 py3 tests
Summary: These now pass

Reviewed By: singhsrb

Differential Revision: D19785175

fbshipit-source-id: bf92757e3fe0753e1b61ffddfd30a37fb40a642f
2020-02-17 14:52:37 -08:00
Durham Goode
c2f42204cc py3: fix some mutation tests
Reviewed By: quark-zju

Differential Revision: D19772615

fbshipit-source-id: 93bcefb6d911941a9e46107f124730279398ceff
2020-02-17 14:52:36 -08:00
Durham Goode
5f46843003 py3: get several infinitepush tests passing
Reviewed By: quark-zju

Differential Revision: D19772622

fbshipit-source-id: c0b64e3a22c085656dbff5526765020b64cc73f5
2020-02-17 14:52:36 -08:00
Durham Goode
5827145ef2 py3: fix some infinitepush py3 issues
Reviewed By: quark-zju

Differential Revision: D19772618

fbshipit-source-id: c5e520a3cec6496e24cc5b3825ef7287ab82f304
2020-02-17 14:52:36 -08:00
Durham Goode
56f4d5ae18 py3: enable a few tests that got fixed along the way
Summary: Not sure where these got fixed.

Reviewed By: quark-zju

Differential Revision: D19772617

fbshipit-source-id: 7bebd15ad080e1fc224d8c1e78f645877551ac92
2020-02-17 14:52:35 -08:00
Durham Goode
2c18b7521a py3: make test-fb-hgext-remotefilelog-clone-tree.t pass
Reviewed By: quark-zju

Differential Revision: D19772620

fbshipit-source-id: 26d1ae840e1e19c7dabbdf7a71e2d4b0d265e141
2020-02-17 14:52:35 -08:00
Durham Goode
255b677f91 py3: fix test-fb-hgext-remotefilelog-lfs.t
Reviewed By: quark-zju

Differential Revision: D19772621

fbshipit-source-id: 25fda0f356129b27413b25cfb70e9d08bbc56263
2020-02-17 14:52:35 -08:00
Durham Goode
a8b4789109 py3: fix misc encoding errors that showed up in tests
Summary:
These are a random batch of stack traces that show up in remotefilelog
tests.

Reviewed By: quark-zju

Differential Revision: D19772619

fbshipit-source-id: a8b9ce188cb7a5a2c9ccaeb62f6744f1c4083e38
2020-02-17 14:52:34 -08:00
Durham Goode
2b0c3ec119 py3: fix test-fb-hgext-remotefilelog-histpack.py
Reviewed By: quark-zju

Differential Revision: D19772616

fbshipit-source-id: 443527d37aa87c1802323aa6edf863beb497a327
2020-02-17 14:52:34 -08:00
Durham Goode
a5ba21d4d4 py3: codemode assertEquals to assertEqual
Summary:
assertEquals is deprecated and shows warnings in the tests in python 3

ignore-conflict-markers

Reviewed By: quark-zju, sfilipco

Differential Revision: D19907385

fbshipit-source-id: 7d261489856a4eeb6719eae581ed986d0415d99e
2020-02-17 14:52:34 -08:00
Durham Goode
41cc67d011 py3: fix remotefilelog repack tests
Reviewed By: quark-zju

Differential Revision: D19751790

fbshipit-source-id: a898a8c37929a73ee2654d2907e9ea5bb2e3fd8a
2020-02-17 14:52:33 -08:00
Durham Goode
3a5728b32f py3: fix archive
Summary:
archive uses a formatter to produce it's metadat file. We need to use a
string io stream instead of bytes.

Reviewed By: quark-zju

Differential Revision: D19748163

fbshipit-source-id: fbd8c32066cfc4a234d9b51691717c7fce4c7c9a
2020-02-17 14:52:33 -08:00
Durham Goode
48aec8ca41 py3: misc fixes to remotefilelog and treemanifest
Reviewed By: quark-zju

Differential Revision: D19747715

fbshipit-source-id: da6716ff46342d777d45bec8e560ab41d544645f
2020-02-17 14:52:33 -08:00
Durham Goode
150aa7be3d py3: fix bundle2 bookmark default values
Summary: They need to be bytes to match the nodes.

Reviewed By: xavierd

Differential Revision: D19746027

fbshipit-source-id: 41e9cc390f4aa97d8c8b378144e64100811665c2
2020-02-17 14:52:32 -08:00
Durham Goode
6d40f2c380 py3: fix occasional ssh hang
Summary:
sshpeer._calltwowaystream used iter(fp, ""), where "" was the sentinel
indicating the fp was empty. Since fp was an iterator of bytes, the sentinel was
never hit and this code kept sending 0\n to each other until the pipes filled
and it hung.

Reviewed By: xavierd

Differential Revision: D19746028

fbshipit-source-id: 0daada0ae2356b5c99cc2c39c121cd88af8f750a
2020-02-17 14:52:32 -08:00
Durham Goode
a3ec80f7f5 py3: various fixes to move bundle2 tests foward
Reviewed By: quark-zju

Differential Revision: D19717253

fbshipit-source-id: 3f07a3c6ff09c1f7081d2dd15659505b4a07a91a
2020-02-17 14:52:32 -08:00
Durham Goode
67ade10253 py3: fix minor bookmark and sparse encoding issues
Reviewed By: quark-zju

Differential Revision: D19717254

fbshipit-source-id: 1ee7fab0bec1bb5b42c2707e7bc07aa8300f4be7
2020-02-17 14:52:31 -08:00
Durham Goode
4d4274ce53 py3: make conduithttp.py python 3 compatible
Reviewed By: quark-zju

Differential Revision: D19717252

fbshipit-source-id: 075aaed642898a3649d40f9cdc9752539b0970aa
2020-02-17 14:52:31 -08:00
Durham Goode
66fd50346c py3: add pycompat buffer alias
Summary: buffer in Python 2 became memoryview in Python 3.

Reviewed By: quark-zju

Differential Revision: D19717251

fbshipit-source-id: f678abfed7e2ec94053329b13015bff3c31eb319
2020-02-17 14:52:30 -08:00
Durham Goode
e4b5247311 py3: fix test-cat.t
Summary:
Fixes test-cat.t by changing some formatter encoding choices. The
formatter is bit awkward here.  hg cat needs to support outputting raw binary,
but also json and templated output.

For now I've set it up so json and templated output can't output non-utf8 data.

Reviewed By: quark-zju

Differential Revision: D19786542

fbshipit-source-id: 84060928103b396b23e3173b715aed996074fa3e
2020-02-17 14:52:30 -08:00
Durham Goode
734ce7959f py3: fix various lfs encoding issues
Reviewed By: quark-zju

Differential Revision: D19717255

fbshipit-source-id: d435a65e566b3a74399632e52c7cd99d0bba7f0a
2020-02-17 14:52:30 -08:00
Durham Goode
9d09b429f0 py3: migrate treedirstate to use utf8 for state and files
Summary:
treedirstate was using bytes for state and for file paths. This does
the appropriate conversions. Note, I don't use strings for all state in rust,
because it's a pain in the butt in some places. We're going to delete
treedirstate eventually anyone, so just I'm getting the test to pass for now.

Reviewed By: quark-zju

Differential Revision: D19715102

fbshipit-source-id: 4f9eac372bee7884d36aa19e3a3ed253392fa7dd
2020-02-17 14:52:29 -08:00
Durham Goode
f530333e06 edenfs: update eden thrift types
Summary:
When I run make local it's creating changes in our checked in thrift
types. I guess I need to check these in?

Reviewed By: quark-zju

Differential Revision: D19848706

fbshipit-source-id: 8a2e9a2617734eda41eade1f2645689362b1d75d
2020-02-17 14:52:29 -08:00
Thomas Orozco
777b7aff07 mononoke: fix a number of broken tests
Summary:
Those tests broke after D19830033 landed, which removed the functionality that
generates the logs they were capturing. This fixes that.

Reviewed By: farnz

Differential Revision: D19941478

fbshipit-source-id: 2b422b1d2252e92bb75ae688962fdd66ed33910c
2020-02-17 11:04:15 -08:00
Mark Thomas
892ac0079e rage: add debugmutation for recent draft commits
Summary:
Add `debugmutation` output for recent draft commits to `hg rage`.  This will
allow us to easily see the recent history of the draft commits in a user's
repo.

Reviewed By: DurhamG

Differential Revision: D19903999

fbshipit-source-id: f6ebd729812c63d3760f9dab031414df6b24ab28
2020-02-17 06:41:04 -08:00
Mark Thomas
3690e8ab44 debugmutation: add time range limiting
Summary:
Make it possible to limit the time range of mutation info being displayed by hg
debugmutation.

Reviewed By: DurhamG

Differential Revision: D19904000

fbshipit-source-id: 365f54fdd861661961bba1a0ea96fce772623a23
2020-02-17 06:41:03 -08:00
Mark Thomas
5122958c70 commitcloud: fix program name template in commit cloud warning
Summary: The correct template for the program name is `prog@`.

Reviewed By: HarveyHunt

Differential Revision: D19904938

fbshipit-source-id: 19a3ac18f85e2b090f53d0423fce3c6982cf32fd
2020-02-17 02:37:26 -08:00
Liubov Dmitrieva
719f949026 mononoke: add scuba logging for prefix lookup in SCS Server
Reviewed By: krallin

Differential Revision: D19879329

fbshipit-source-id: 3edac196b7a9e0c09f5ae98f13f539f10dfde660
2020-02-17 02:34:01 -08:00
Liubov Dmitrieva
5f4da0d6e0 mononoke: improve return error for invalid hashes in scs service
Summary: The error should be request error, not internal error

Reviewed By: krallin

Differential Revision: D19856120

fbshipit-source-id: fc66ac4eaeb27941de3b4ba769fe123b28685d14
2020-02-17 02:34:01 -08:00
svcscm
b1edc59496 Updating submodules
Summary:
GitHub commits:

73334bef5b
442d479192
b5fafec522
b120393795

Reviewed By: zpao

fbshipit-source-id: 5fc6014cfd386126ffdd0f64eb814beb9e1326f4
2020-02-17 02:34:00 -08:00
svcscm
074a6c0078 Updating submodules
Summary:
GitHub commits:

cae89fc302

Reviewed By: zpao

fbshipit-source-id: bac51f8a4203c98ea3028d5a6d0ced4f5b3f0205
2020-02-16 17:11:53 -08:00
Stanislau Hlebik
ee7c0a8d26 backfill_derived_data mononoke: fail if derived data disabled
Summary:
Now let's fail if we try to derive data that's not enabled in the config.
Note that this diff also adds `derive_unsafe()` method which should be used in backfiller.

Reviewed By: krallin

Differential Revision: D19807956

fbshipit-source-id: c39af8555164314cafa9691197629ab9ddb956f1
2020-02-16 04:56:34 -08:00
svcscm
bd0c0b89fb Updating submodules
Summary:
GitHub commits:

0265b51c8f
41dc2eac34
24f7f27a9b
ff6716ff6e

Reviewed By: zpao

fbshipit-source-id: cb788bb72884e8fcaa3204b6bc928827b1ce973f
2020-02-15 23:24:51 -08:00
svcscm
cc91925d76 Updating submodules
Summary:
GitHub commits:

2c73323d9e

Reviewed By: zpao

fbshipit-source-id: d02005f2bd82167bd8532dc634b9584ead8ae5e5
2020-02-15 16:23:00 -08:00
svcscm
c0f28d155c Updating submodules
Summary:
GitHub commits:

998297b05f
c15e3e9c88
62595d6a6f
0b5752df5e
ea8f4915aa
dcfbc79398
09c75f97d2
f43c043ee9
0fb0bf4762

Reviewed By: zpao

fbshipit-source-id: 2499f037cecf74197bce835914cd3aa301cec43a
2020-02-14 15:35:20 -08:00