Commit Graph

58661 Commits

Author SHA1 Message Date
Arun Kulshreshtha
3fc3eb749b http_client: make client callback return a Result
Summary: Instead of returning a bool, make the client callback return a `Result`. A new error type called `Abort` has been added which the client can return to signal that the driver should abort all active transfers and return early. This results in more idiomatic code, and gives the callback the ability to specify the reason for the abort.

Reviewed By: quark-zju

Differential Revision: D22201912

fbshipit-source-id: 46d72e28f754132a4ef30defa40c4a5d09fe8e07
2020-06-29 18:43:49 -07:00
Arun Kulshreshtha
95a083a0fe http_client: move stats collection into driver
Summary: Move stats collection into `MultiDriver`. This makes sense from a design standpoint since the driver is the thing performing the requests. It will also reduce code duplication when streaming responses are added later in the stack.

Reviewed By: quark-zju

Differential Revision: D22201910

fbshipit-source-id: fd3174bb6f5a452901b405341b2c001dca1a9832
2020-06-29 18:43:49 -07:00
Arun Kulshreshtha
8560f22ec5 http_client: make HttpClient implement Send
Summary: Implement `Send` for `HttpClient`. I've split this out into its own diff since unsafe code warrants additional scrutiny. See the comment in the code for details on correctness.

Reviewed By: quark-zju

Differential Revision: D22157713

fbshipit-source-id: 1a92ebb51142a98d3996686197b77ad7500c19db
2020-06-29 18:43:49 -07:00
Arun Kulshreshtha
61783baed4 http_client: report transfer stats
Summary: Report transfer stats such as bytes downloaded, uploaded, elapsed time, and number of requests upon completion of a batch of requests. This code was adapted from the EdenAPI client.

Reviewed By: quark-zju

Differential Revision: D22157711

fbshipit-source-id: 57b814e7a923f85467a79ee48bddd48b2f2b253c
2020-06-29 18:43:49 -07:00
Arun Kulshreshtha
a99ba6aa42 http_client: add HttpClient
Summary:
Add an `HttpClient` struct that is intended as the primary API for this crate. This struct is a wrapper around libcurl's "multi" interface, which allows sending several requests concurrently. Notably, if HTTP/2 is used, this allows for potentially multiplexing
many requests to the same server over the same connection.

This code is essentially a generalized version of the `multi_request` function from the EdenAPI crate.

Reviewed By: quark-zju

Differential Revision: D22157710

fbshipit-source-id: cbd7f82555444c7d1e1932944257a6949c60f34e
2020-06-29 18:43:49 -07:00
Arun Kulshreshtha
44efb6ee0d http_client: add progress monitoring
Summary: Add the ability for the client to monitor the collective progress of a set of transfers. This will be used in the next diff to allow monitoring several concurrent requests. Most of this code was adapted from the EdenAPI client's progress module, with some modifications.

Reviewed By: quark-zju

Differential Revision: D22157709

fbshipit-source-id: d474cd46db29bebf64049629dce69d975e220e3a
2020-06-29 18:43:48 -07:00
svcscm
447f4a8eea Updating submodules
Summary:
GitHub commits:

c34b8c4616
26e0787f7c
8c2467b40c
58547e533b
ed15145b2b

Reviewed By: wittgenst

fbshipit-source-id: 6631984be29efad81f3234b595dc61211aa7c8f9
2020-06-29 18:43:48 -07:00
svcscm
fa8fa0174b Updating submodules
Summary:
GitHub commits:

c81f790346
8ef6f55cef
7e6a92c1d1
8fd23f5316

Reviewed By: wittgenst

fbshipit-source-id: bfd1ac112eabb5b4c3135d3a0abf837a6a27f6dd
2020-06-29 16:50:38 -07:00
Xavier Deguillard
426e1ee41d inodes: fix typo in EdenDispatcher
Summary: The method name is symlink, not rmdir.

Reviewed By: genevievehelsel

Differential Revision: D22291297

fbshipit-source-id: 5dc37b053e06c965fd47df79990fc40adc097f87
2020-06-29 16:17:21 -07:00
svcscm
53eff5d356 Updating submodules
Summary:
GitHub commits:

9fe65e2511
c0338e1d1c
9a5886bd8c

Reviewed By: wittgenst

fbshipit-source-id: 86476bc189d14f7ccda30efbfb8c185a489165f0
2020-06-29 15:57:17 -07:00
Jun Wu
01e3ea0f8f tests: enable narrow-heads for test-[bc]*
Summary: Most of them need extra server-side bookmarks for deciding phases.

Reviewed By: DurhamG

Differential Revision: D22117739

fbshipit-source-id: 711bf96063913fd6148125a5628f0b0f4efbf489
2020-06-29 13:53:04 -07:00
svcscm
f322f58d89 Updating submodules
Summary:
GitHub commits:

0891265827
71ce4580a0
14b97cd718
f151ea0bed
1b85d57cf5
5943ba4420
23e616852a
6c4f96a77c
04d6018618
ee85f13db1
a88d2b40fe
a8c2a602ae

Reviewed By: wittgenst

fbshipit-source-id: f9066744432d9dc80a128999278c434288e4ba73
2020-06-29 13:07:28 -07:00
Jun Wu
4b45a2a185 test-pushrebase: use modern configs
Summary:
Enable narrow-heads.

Changed log revset from `:` to `all()` to make the test compatible.

Reviewed By: krallin

Differential Revision: D22200495

fbshipit-source-id: 148a82e77c953b9e7dbed055ef464c318e56cafa
2020-06-29 13:00:07 -07:00
Jun Wu
4c1634b9fd test-commitcloud: use modern configs
Summary:
Enable narrow-heads, and mutation. Disable obsmarker related features.

Change phase manipulation to `debugmakepublic` which works with narrow-heads.

Reviewed By: krallin

Differential Revision: D22200511

fbshipit-source-id: 8dec050f137e6cc055015fe084eb4cc67faa1216
2020-06-29 13:00:07 -07:00
Jun Wu
42b145a65d test-walker-scrub-blobstore: use modern configs
Summary:
Enable narrow-heads.

The test output seems a bit unstable - sometimes I got 28 there. So I globbed
it out.

Reviewed By: krallin

Differential Revision: D22200497

fbshipit-source-id: f005381a341d88c0bcbb09150e7d1878df7a38f3
2020-06-29 13:00:07 -07:00
Jun Wu
9eb40deffe test-pushrebase-emit-obsmarkers: use modern configs
Summary:
Enable narrow-heads.

Change the revset `:` to `all()`. With narrow-heads, `:` selects all commits
including those that are not referred by visible heads. The `all()` revset
only selects commits reachable from visible heads.

Reviewed By: krallin

Differential Revision: D22200498

fbshipit-source-id: beb863d42069ae898e419a4a75b3a707c72ae1f9
2020-06-29 13:00:07 -07:00
Jun Wu
e0c9b2b87b test-sqlblob: use modern configs
Summary:
Enable remotenames, selectivepull, and narrow-heads. Use the new stream clone
code path.

Selectivepull makes a difference. `hg pull -r HASH` also pulls the selected
bookmarks so an extra `pull` was unnecessary. Change the clone command to use
`-U` to trigger the new clone code path.

Reviewed By: krallin

Differential Revision: D22200499

fbshipit-source-id: 764202098c7e8afdbb5e2ee83679da7570c08c90
2020-06-29 13:00:07 -07:00
Jun Wu
adcf846f2f test-reduction: use modern configs
Summary:
Enable remotenames and narrow-heads.

Local bookmarks are replaced by remote bookmarks, causing the test change.

Reviewed By: krallin

Differential Revision: D22200500

fbshipit-source-id: aeee528d1766e0642c12e78a6c1a50cadc8a579a
2020-06-29 13:00:07 -07:00
Jun Wu
d1da1d70c1 test-push-redirector-sync-job: use modern configs
Summary:
Enable remotenames and narrow-heads.

The commits become 'draft' because there are no remote bookmarks.

Reviewed By: krallin

Differential Revision: D22200514

fbshipit-source-id: 04d0befa7c22756e936a28ffdcdf1305057cf062
2020-06-29 13:00:07 -07:00
Jun Wu
2875942761 test-infinitepush: use modern configs
Summary:
Enable remotenames and narrow-heads.

The test was migrated cleanly. The only change is that local bookmarks are
replaced by remote bookmarks.

Reviewed By: krallin

Differential Revision: D22200510

fbshipit-source-id: f5b8cd2ed125e9fc4e5daac897851d91fef5693f
2020-06-29 13:00:07 -07:00
Jun Wu
6ecf255fcf test-infinitepush-mutation: use modern configs
Summary:
Enable remotenames and narrow-heads.

Local bookmarks are replaced by remote bookmarks.

Reviewed By: krallin

Differential Revision: D22200503

fbshipit-source-id: 41ac4f4f606011dcaf6d0d9867b01fb77b9a79d8
2020-06-29 13:00:07 -07:00
Jun Wu
95cf4a2a39 test-infinitepush-hydrated: use modern configs
Summary:
Enable remotenames and narrow-heads.

Phase exchange is gone because of narrow-heads.
The remtoenames extension was written suboptimally so it issued a second
bookmarks request (which, hopefully can be removed by having selective
pull everywhere and migrate pull to use the new API).

Reviewed By: krallin

Differential Revision: D22200506

fbshipit-source-id: c522bb9fc1396d813e0f1f380c4290445bab3db3
2020-06-29 13:00:07 -07:00
Jun Wu
ffde9f50e9 test-infinitepush-commits-disabled: use modern configs
Summary:
Enable remotenames and narrow-heads. The `master_bookmark` is no longer a local
bookmark in the client repo.

Reviewed By: krallin

Differential Revision: D22200513

fbshipit-source-id: bc3c1715ce21f45a35bc67148eb00e44944bea6e
2020-06-29 13:00:06 -07:00
Jun Wu
8ecb79a921 test-gettreepack-sparse-update: use modern configs
Summary: Enable remotenames and narrow-heads.

Reviewed By: krallin

Differential Revision: D22201083

fbshipit-source-id: 585dff69db9dd725c8fa1090d47c85b150f979da
2020-06-29 13:00:06 -07:00
Jun Wu
439c029007 test-gettreepack-designated-nodes: use modern configs
Summary:
Enable remotenames and narrow-heads. The server gets one more request from
remotenames.

Reviewed By: krallin

Differential Revision: D22200502

fbshipit-source-id: 26bc28b19438c7be4a19eae6be728c83b113f822
2020-06-29 13:00:06 -07:00
Jun Wu
93318c255b test-bookmark-hg-kind: use modern configs
Summary:
Enable remotenames and narrow-heads. The client gets remote bookmarks instead
of local bookmarks during clone and phases are decided by remote bookmarks.

Reviewed By: krallin

Differential Revision: D22200515

fbshipit-source-id: 12a9e892855b3a8f62f01758565de5f224c4942b
2020-06-29 13:00:06 -07:00
Jun Wu
8bde7d1316 tests: show remotenames in tglogpnr
Summary:
Change the template to show remote bookmarks, which will be more relevant once
we migrate to modern configs. Namely, phases will be decided by remote bookmarks.

The named branches logic was mostly removed from the code base. Therefore
drop the `{branches}` template.

Reviewed By: StanislavGlebik

Differential Revision: D22200512

fbshipit-source-id: 8eca3a71ff88b8614023f4920a448156fcd712d5
2020-06-29 13:00:06 -07:00
Jun Wu
dbd29b7d06 tests: turn on narrow-heads for some tests
Summary: With narrow-heads, the phase exchange step is skipped.

Reviewed By: krallin

Differential Revision: D22200504

fbshipit-source-id: 6ab366e7e68eb3b82f52acaa8f488747435e0ecf
2020-06-29 13:00:06 -07:00
Jun Wu
889beacdf1 tests: enable narrow-heads for Mononoke tests
Summary:
Most tests pass without changes. Some incompatible tests are added to the
special list.

Reviewed By: krallin

Differential Revision: D22200505

fbshipit-source-id: 091464bbc7c9c532fed9ef91f2c955d6e4f2df0b
2020-06-29 13:00:06 -07:00
Stanislau Hlebik
04ce32014d mononoke: log pushed commits to scribe
Summary: This is the final diff of the stack - it starts logging pushed commits to scribe

Reviewed By: farnz

Differential Revision: D22212755

fbshipit-source-id: ec09728408468acaeb1c214d43f930faac30899b
2020-06-29 12:15:22 -07:00
Stanislau Hlebik
6fd54d6b22 mononoke: don't fail if logging to scribe failed
Summary:
Failing push if we failed to log to scribe doesn't make a lot of sense. By that
time the ship has sailed - commit has already been pushed and by failing the
request we can't undo that. It will just create an annoyance by whoever is
pushing.

Instead let's log it to scuba

Reviewed By: farnz

Differential Revision: D22256687

fbshipit-source-id: 2428bbf1db4cef6fa80777ad65184fab1804fa9c
2020-06-29 12:15:22 -07:00
Stanislau Hlebik
8a137ae922 mononoke: add Scribe
Summary:
At the moment we can't test logging to scribe easily - we don't have a way to
mock it. Scribe are supposed to help with that.

They will let us to configure all scribe logs to go to a directory on a
filesystem similar to the way we configure scuba. The Scribe itself will
be stored in CoreContext

Reviewed By: farnz

Differential Revision: D22237730

fbshipit-source-id: 144340bcfb1babc3577026191428df48e30a0bb6
2020-06-29 12:15:22 -07:00
svcscm
c582ad8a2d Updating submodules
Summary:
GitHub commits:

db318f71b9
fd910e7001
97ef1fbae7
e678005ffa
b5aabad30d
9b5ce9a061
52b29a349d
4cd49315c9
50140ebcf1
2be71cb616
9d39251bc7
76fcbf0b72
541b600f06
83e41c0238

Reviewed By: wittgenst

fbshipit-source-id: 4302781dbeae0046c4a78941cf8b37ecb00aa401
2020-06-29 11:39:47 -07:00
Jun Wu
4902a3300c tests: enable narrow-heads by default
Summary: Many tests are incompatible. But many are passing.

Reviewed By: kulshrax

Differential Revision: D22052475

fbshipit-source-id: 1f30ac2b0fe034175d5ae818ec2be098dbd5283d
2020-06-29 11:29:04 -07:00
Jun Wu
d8835e90a2 test-globalrevs: disable zstore commit data
Summary: This improves test compatibility.

Reviewed By: kulshrax

Differential Revision: D22174995

fbshipit-source-id: 27b4690567699004163b199b5ccbaf4f8850cd80
2020-06-29 11:29:04 -07:00
Jun Wu
0d20e20244 exchange: skip phase exchange if narrow-heads is on
Summary:
With narrow-heads, phases are not tracked by remotenames. There is no need to
do a separate phase exchange.

Reviewed By: kulshrax

Differential Revision: D22130170

fbshipit-source-id: 6ee8cda338253aea5df09e779ecaf3d29910f622
2020-06-29 11:29:04 -07:00
Jun Wu
6554961897 tests: replace 'phase --public' with 'debugmakepublic'
Summary: This makes narrow-heads migration smoother.

Reviewed By: ikostia

Differential Revision: D22052478

fbshipit-source-id: 83047ad6da4de2034c917bfd5be47a2f32d5cc3d
2020-06-29 11:29:04 -07:00
Jun Wu
b12980f84c commands: add debugmakepublic
Summary:
Many tests want to change commit phase to public. We don't want to leak this
feature to end-users. Therefore make a debug command.

Reviewed By: kulshrax

Differential Revision: D22052481

fbshipit-source-id: 4ce6a61120da0d74374465e97ac0ec0ff9638088
2020-06-29 11:29:04 -07:00
Jun Wu
4bfc5ea5d4 test-fb-hgext-undo: remove the test
Summary:
The test depends on too much details of the obsstore and is hard to
migrate to mutation. The undo command in production actually uses
a different code path (with narrow-heads, it rewrites metalog directly),
which is somewhat covered by test-undo-narrow-heads. Ideally we extend
the undo test with more cases under modern configs. For now let's just
remove the test with legacy configs to unblock migration progress.

Reviewed By: kulshrax

Differential Revision: D22174961

fbshipit-source-id: 57baf5e6f59938069b44a5db8c5ae1662f094f84
2020-06-29 11:29:04 -07:00
Jun Wu
50ed524e78 test-rebase-obsolete: remove the test
Summary:
It has too many dependencies on legacy components that it's too hard to
migrate.  `test-rebase-mutation` is the test that is more relevant.

Reviewed By: kulshrax

Differential Revision: D22174996

fbshipit-source-id: 40889bc2f80021839ce0ffe13098404e8aa97fbb
2020-06-29 11:29:04 -07:00
Jun Wu
2da2bfd958 test-commitcloud-sync-oscillation: remove the test
Summary:
The test is about syncing with obsmarkers. We no longer use obsmarkers so the
test is no longer relevant.

Reviewed By: kulshrax

Differential Revision: D22174999

fbshipit-source-id: 7615852b734319bc838b238f4c9b54252ba5c355
2020-06-29 11:29:04 -07:00
Jun Wu
9bb4871a10 test-phases: remove the test
Summary:
The test is mostly about manipulating phases and phase exchange in bundle2.
Both of them are gone with narrow-heads, which makes phases immutable.
Practically, phases affect whether commits are immutable and that are covered
by individual tests (ex. amend tests check amend fails on public commits).

Reviewed By: kulshrax

Differential Revision: D22174955

fbshipit-source-id: cabc0de552f0ede54a23a6e6eec47b14c2a863b9
2020-06-29 11:29:03 -07:00
Jun Wu
46da14cc76 hiddenerror: remove extension
Summary:
With narrow-heads (enabled in production and most tests) hiddenerror will
never happen. Remove the extension.

Reviewed By: kulshrax

Differential Revision: D22174987

fbshipit-source-id: e3e3823d3da89dfd51b60f65f8e138ea723cc00f
2020-06-29 11:29:03 -07:00
Jun Wu
11e6a05277 test-bundle2-pushback: remove the test
Summary: The pushback behavior is already tested extensively in pushrebase tests.

Reviewed By: kulshrax

Differential Revision: D22130172

fbshipit-source-id: 7b3a5ab2792969b1dce57ae09406aef063450568
2020-06-29 11:29:03 -07:00
Jun Wu
741016fb77 test-flagprocessor: remove the test
Summary:
We don't use the flag processor framework for things other than LFS in the
non-Rust code. It is coupled with revlog, which is going away. Our LFS usage is
covered by other tests.

Reviewed By: kulshrax

Differential Revision: D22130168

fbshipit-source-id: 78a04df49961e2faca0def71daeec6a40e45c4b5
2020-06-29 11:29:03 -07:00
Jun Wu
c3124548eb tests: remove tests about legacy phase exchange
Summary:
We have narrow-heads on in production. Phases are decided by remote bookmarks
instead of exchanged separately. Remove the test since it's no longer relevant.

Reviewed By: sfilipco

Differential Revision: D22052477

fbshipit-source-id: c60382448d5e4d3d2d1225762b6c133873016881
2020-06-29 11:29:03 -07:00
Jun Wu
5bb0223a54 localrepo: fix headrevs ordering
Summary:
The return order of `index2.headsancestors` and `index.headrevs` are different.
Fix it. This affects the default commit to update to after `hg clone` in some
tests.

Reviewed By: sfilipco

Differential Revision: D22200496

fbshipit-source-id: 273201461c814241ce8dafa6f7ca00f72ea83eab
2020-06-29 11:29:03 -07:00
Jun Wu
e97f281c3e repo: hide narrow-heads migration message on repo creation
Summary:
If the repo is newly created, do not show the migration message.
This makes migration smoother.

Reviewed By: sfilipco

Differential Revision: D22052480

fbshipit-source-id: 4857bcb3e38094501eaa63a52f09d49853cf761b
2020-06-29 11:04:23 -07:00
Shrikrishna Khare
8357af8af9 Fix OpenNSA 6.5.19 hash as Brcm modified the tarball
Summary:
Koray reported issue with OpenNSA while using build VM and observed that we
don't hit the issue on devserver thanks to downloading the lfs cached file.

The root cause:

Broadcom added License notice and uploaded new 6.5.19 with same name.
This changed the hash though - causing fbcode builder to complain.
Fix it by adjusting the hash.

See the first line in the recursive diff of before vs. after: P134467317

(the broken symlinks is an unrelated existing issue, which we have reported to
Broadcom).

Reviewed By: bkoray

Differential Revision: D22280971

fbshipit-source-id: 781079df426f83901509225156cf77a3966d3301
2020-06-29 10:22:36 -07:00
svcscm
c719c5fbb0 Updating submodules
Summary:
GitHub commits:

14bbc94642

Reviewed By: wittgenst

fbshipit-source-id: b788526ea0e94a045850c0088a00e979f08925b6
2020-06-29 10:15:05 -07:00