Commit Graph

62462 Commits

Author SHA1 Message Date
svcscm
8f970c44c7 Updating submodules
Summary:
GitHub commits:

a734cee8a8

Reviewed By: bigfootjon

fbshipit-source-id: c979b8d2e2b1e46c9eb9b2ec21bd64920226ca2c
2021-01-11 17:58:02 -08:00
svcscm
ab6b18864d Updating submodules
Summary:
GitHub commits:

200d7144cc
8552fc7fe3
a74807f5b5
1297d592f6
b9cb2c226d
77b4bfe511
4e69c0513f
f493c97b33
7a9bd1c2f8

Reviewed By: bigfootjon

fbshipit-source-id: 1f6960f07cc38e955e9b6ba1faa4ea9f60b5dab7
2021-01-11 16:19:22 -08:00
Daniel Xu
f83fb64f3e Do full regen
Summary:
D25850262 (772680f2f7) updated a dep but only did a partial regen. This broke
other diffs.

This diff does a full regen to sync up again.

Differential Revision: D25872444

fbshipit-source-id: b5749b3d634ffe355a5a3cf6e94066ca5158001f
2021-01-11 16:14:36 -08:00
Daniel Xu
4a21a5a1cf Regen autocargo files
Summary: See previous diff

Differential Revision: D25858200

fbshipit-source-id: 3745b5c7dac6ee514b05ce130b62b35302916bee
2021-01-11 16:14:36 -08:00
Jun Wu
027709fa36 pull: use the new repo.pull API if possible
Summary:
The `pull` commmand has a lot of tech debt (with issues like inefficiency, race
conditions, named branches, etc). The new `repo.pull` API isn't designed to
support all legacy usecases.

This diff switches a subset of `pull` command that the new API can support to
the new API. It should solve race condition or `visibility.add` inefficiency
issues (ex. 20s on addgroup, 187s on visibility.add - P154836357).

Logic related to remotenames was ported from the remotenames extension.
The selectivepull tests seem strong enough to check their behaviors.

The new pull API is used by commit cloud for many months. So I turned the
new code path on by default. It can be turned off by changing
`commands.new-pull`.

There are a few test changes. The new behavior seems more correct overall:
- test-commitcloud-switch-workspace.t
  - "M/F" swap is caused by rev number: both are correct
  - "S: public remote/stable" is more correct than "S: draft"
- test-commitcloud-sync-rb-deletion.t
  - "draft1: draft remote/scratch/draft1" is more correct because
    "remote/scratch/draft1" is listed in the "book --list-subs"
    command above.
- test-commitcloud-sync-rb-enabling.t
  - "public1: draft" not showing up is more correct.
- test-fb-hgext-remotefilelog-lfs-prefetch.t
  - Difference seems to be caused by rev order.

Reviewed By: markbt

Differential Revision: D25562089

fbshipit-source-id: ac22b2f0492ab53517d580d706dfbc823fd0e0cc
2021-01-11 13:28:15 -08:00
Jun Wu
844cba11bf pull: make pulled commits visible even if they exist
Summary:
Make the `pull` API update visible heads even if all commits exist locally.
This is a more expected behavior, and will make the "pull" command using the
pull API simpler.

Reviewed By: markbt

Differential Revision: D25562091

fbshipit-source-id: 8a43cfe4afd31d3cb9ad5369a6081de120043168
2021-01-11 13:07:52 -08:00
Jun Wu
ef2d44f1e3 pull: try to avoid adding public heads via repo.pull
Summary:
Filters out some obviously public heads at the end of repo.pull so they don't
get passed to `visibility.add`. Note: this just removes some obviously "public"
commits without considering the graph. A stronger guarantee would be removing
public heads at metalog commit time.

Reviewed By: markbt

Differential Revision: D25562092

fbshipit-source-id: cc6a19252fcfe305e3a14895b61ab0d6b84a007e
2021-01-11 13:07:52 -08:00
Shai Szulanski
dba656e44d Rename Try::throwIfFailed -> throwUnlessValue
Summary: Update name to match usage of Try as tri-state, since this method also throws if the Try is empty

Reviewed By: yfeldblum

Differential Revision: D25737810

fbshipit-source-id: a4166153362f07353d212216fbaf7105867eef2a
2021-01-11 13:05:17 -08:00
svcscm
380b679a8c Updating submodules
Summary:
GitHub commits:

d8b2b7f4fb
74afdc3a22
0a9f78d2c8

Reviewed By: bigfootjon

fbshipit-source-id: 79df570f4465612d3609cfb321e04a0a80310659
2021-01-11 12:56:09 -08:00
Xavier Deguillard
4cdbffe823 integration: allow OSS integration test to build on Windows
Summary:
On Windows, since Mercurial doesn't yet build with Buck, we need to test
against the system Mercurial, thus remove the dependencies to //eden/scm:hg for
the tests. Also remove various dependencies that don't build yet on Windows.

This allows for the tests to run, but fail while trying to execute edenfsctl.par.

Reviewed By: kmancini

Differential Revision: D25807727

fbshipit-source-id: c2533eedc361cc6db9fdf2190476c3d52833139d
2021-01-11 12:06:14 -08:00
Alex Hornby
a311deeefc mononoke: add PublicChangesetBulkFetch::fetch_ids
Summary: Add a method to get just the ids. This is a new best case for the fetching, so updated the benchmark as well.

Reviewed By: StanislavGlebik

Differential Revision: D25804027

fbshipit-source-id: ccc4573c8a4ebc07db854a0ffa737f572087019e
2021-01-11 10:55:39 -08:00
Alex Hornby
c11cdc23ed mononoke: test bulkops vs bonsai expectations
Summary: Simplify the tests for bulkops, no need to map to hg to check the expected changesets.   Can compare to expected bonsai directly instead as its simpler

Reviewed By: StanislavGlebik

Differential Revision: D25804020

fbshipit-source-id: eb4381c37ed6a4fb1e213f0397ffb2136ddee473
2021-01-11 10:55:39 -08:00
Alex Hornby
ce85f95e55 mononoke: add choice of direction to bulkops
Summary: When scrubbing repos it is preferable to scrub newest data first.  This diff adds Direction::NewestFirst to bulkops for use in scrubbing and updates existing call sites to Direction::OldestFirst so as not to change behaviour

Reviewed By: StanislavGlebik

Differential Revision: D25742279

fbshipit-source-id: 363a4854b14e9aa970b2c1ec491dcaccac7a6ec9
2021-01-11 10:55:39 -08:00
Alex Hornby
941cdc48b2 mononoke: use iter::step_by in bulk ops windowing
Summary: Preparation for adding OldestFirst vs NewestFirst direction of fetching in next diff.

Reviewed By: StanislavGlebik

Differential Revision: D25742281

fbshipit-source-id: 655f297efc2094d4325717d97cce53e697c35597
2021-01-11 10:55:39 -08:00
Alex Hornby
c8b4d5d2d8 mononoke: add bulkops benchmark
Summary: Add a benchmark tool for bulkops that uses the criterion benchmarking framework. This is so we can measure effect of optimizations later in stack.

Differential Revision: D25804026

fbshipit-source-id: 71b8addf1145c0ecb69d6392b4602172f2b52080
2021-01-11 10:55:39 -08:00
Thomas Orozco
9d7b0267dd revisionstore: pass client correlator
Summary:
We used to get those in the old (Python) LFS extension, but didn't have them in
the new one. However, this is helpful to correlate requests to LFS with data in
hg logs. It's also convenient to be able to identify whether a set of requests
are part of the same session or not.

This diffs threads the client correlator through to the LFS store from the
Python, similarly to how it's done in EdenAPI.

Reviewed By: DurhamG

Differential Revision: D25804930

fbshipit-source-id: a5d5508617fa4184344834bbd8e3423816aa7668
2021-01-11 10:46:20 -08:00
Stefan Filip
691d8f7ef2 hgcommands: downgrade to indicatif 0.14
Summary: The dependency that we want to share is 0.14 instead of 0.15.

Reviewed By: singhsrb

Differential Revision: D25871110

fbshipit-source-id: 16e9f8a858ee04a47867c2916909edfc996f8bc4
2021-01-11 10:03:51 -08:00
Mark Juggurnauth-Thomas
a7e8a2c5c2 crdump: add manifest_node to crdump output
Summary:
Add `manifest_node` to the crdump output, which is the root manifest node of the commit.

This is useful for detecting commits that have the same tree content but
different metadata (e.g. if only the commit message has been edited).

Reviewed By: singhsrb

Differential Revision: D25782674

fbshipit-source-id: dfdf426833533140b676eee82e123a0cba23c77a
2021-01-11 07:30:35 -08:00
Alex Hornby
30d87db8eb mononoke: update callsites to use PublicChangesetBulkFetch::fetch
Summary:
We had a mix of callsites using fetch_all_public_changesets directly vs those using the PublicChangesetBulkFetch::fetch.

Update callsites to use PublicChangesetBulkFetch::fetch for consistency.  This also has the nice side effect to removing some explicit config_store usage.

Reviewed By: StanislavGlebik

Differential Revision: D25804019

fbshipit-source-id: 5a88888dd915d1d693fb26ffe3bb359c9e918d5c
2021-01-11 03:52:36 -08:00
Thomas Orozco
b7dd3b1699 mononoke/lfs_server: log HTTP-server level errors
Summary:
Right now, we have zero visibility HTTP level errors (such as broken pipes),
because this is all set up on Gotham with no logging. This diff moves the
bootstrapping from Gotham to us to fix this.

There's a bit of code I'd like to deduplicate here, but it's tricky to do given
that the code is a little different in the HTTP vs. HTTPS branches. For now,
this will give us some logging we need without too much effort. We can make it
more robust (and route it to Scuba or give it session IDs) if this proves
useful.

Reviewed By: StanislavGlebik

Differential Revision: D25851426

fbshipit-source-id: 4ca5d1ecb3931715f04af735aa1b7cfdac87846d
2021-01-11 03:32:26 -08:00
Thomas Orozco
772680f2f7 third-party: rust: update Gotham to 0.5
Summary:
This updates Gotham. Under the hood I rebased our fork, you can see the diff
here: P161171514.

The stuff that is relevant is that Gotham got rid of its dependency on
`failure` and now uses `anyhow` instead, and I also added a little bit to our
existing socket data patch by making a few things public so that we can get
access to a few more internals.

Reviewed By: StanislavGlebik

Differential Revision: D25850262

fbshipit-source-id: 25ebf5d63be39e3e93208705d91abc5c61c90453
2021-01-11 03:32:25 -08:00
Liubov Dmitrieva
dab9787cef fix issue with empty initial set of remote bookmarks
Summary:
commit cloud commands shouldn't fail if the set is empty

the bug was introduced by using the function bookmarks.selectivepullbookmarknames that has a check at the end that the set is not empty, commit cloud doesn't need the check

the issue introduced D25802193 (713faa71cd) via code refactoring

Differential Revision: D25853480

fbshipit-source-id: 7d3f057dead097b86269e7b03d78f5523e8f1ec7
2021-01-11 02:50:14 -08:00
Mark Juggurnauth-Thomas
4da7dfb91f add ref-cast to thrift dependencies
Summary:
Depending on the thrift defition, `thrift_library` targets may also depend on `ref-cast`.
Add this to the `Cargo.toml`.

Reviewed By: lukaspiatkowski

Differential Revision: D25636872

fbshipit-source-id: 8263395db2bb31127528f5c66c4cc5dd9180d89f
2021-01-11 02:17:50 -08:00
svcscm
bedf7d8efb Updating submodules
Summary:
GitHub commits:

6e82a16334
8ca26c2404
354b4adcd7

Reviewed By: yns88

fbshipit-source-id: 6cb8560df71457129748fb6736fe25f58cd1b0bc
2021-01-11 01:54:06 -08:00
Stanislau Hlebik
749919b0fb mononoke: add an admin command to insert mapping entries
Summary:
This diff adds a debug command that allows inserting different kinds of mapping
entries:
1) Rewritten, meaning that source repo commit rewrites into a target repo
commit
2) Equivalent working copy, meaning that source repo commit doesn't rewrite
into a target repo commit, but one of its ancestors does
3) NotSyncCandidate, meaning that large repo commit shouldn't be remapped into
a small repo

Reviewed By: ahornby

Differential Revision: D25844996

fbshipit-source-id: 1ba64540cf511da8cc50c80a5bee822a950707be
2021-01-11 01:00:59 -08:00
Stanislau Hlebik
d1bfed8f4a mononoke: remove MAPPING_VERSION_ARG
Summary: Let's be a bit more consistent and use ARG_VERSION_NAME

Reviewed By: krallin

Differential Revision: D25844995

fbshipit-source-id: c09be5a38ef97bc491b324f49a2c7d0b6a47212e
2021-01-11 01:00:59 -08:00
svcscm
513445f509 Updating submodules
Summary:
GitHub commits:

f07bb93a7a

Reviewed By: yns88

fbshipit-source-id: d2b44ee8aef91a20af55a47c64b22d69b6495bf3
2021-01-11 01:00:59 -08:00
svcscm
41d1855481 Updating submodules
Summary:
GitHub commits:

2ac2c88a69
a1a88c7a3f
dd429c2e51
97f46812a5
e4bd2c6bef
e4be70c362

Reviewed By: yns88

fbshipit-source-id: a5e7bfa2335e1547980137300a55ac83fcca5670
2021-01-10 10:52:10 -08:00
Andres Suarez
21c95391ca Apply clang-format update fixes
Reviewed By: igorsugak

Differential Revision: D25861960

fbshipit-source-id: e3c39c080429058a58cdc66d45350e5d1420f98c
2021-01-10 10:06:29 -08:00
svcscm
239356ffa9 Updating submodules
Summary:
GitHub commits:

12bcb6a9c4
779d7b6052
9f238cb8b9

Reviewed By: yns88

fbshipit-source-id: a4995f9390755d09d9e645a9bb983e517d590cc3
2021-01-10 10:06:28 -08:00
svcscm
5c3318afc6 Updating submodules
Summary:
GitHub commits:

2aea7a21a8

Reviewed By: yns88

fbshipit-source-id: 1a15e3e4de9ad5d93a4495bb956ebac0c7488d6e
2021-01-09 09:45:37 -08:00
svcscm
bf62fb2c66 Updating submodules
Summary:
GitHub commits:

ed6fa93cc8

Reviewed By: yns88

fbshipit-source-id: e31b527397a1c569a6d74136b039f0473032fb9a
2021-01-09 09:45:37 -08:00
svcscm
bebd81271a Updating submodules
Summary:
GitHub commits:

8f2777ae4c
2f9a3d6e4e
06f9ac3026
3c2929a0e3
aa1c0efece

Reviewed By: yns88

fbshipit-source-id: 12993e3004220033feae9160321870c3259e21b4
2021-01-08 17:52:00 -08:00
svcscm
8915af6de8 Updating submodules
Summary:
GitHub commits:

867a307ecd
90d71b6135

Reviewed By: yns88

fbshipit-source-id: db740d11bbe1580559c70f7621c340a8be2f9bd8
2021-01-08 17:52:00 -08:00
svcscm
702f0a33ff Updating submodules
Summary:
GitHub commits:

6d8b291bd4
8cf67ca04f
78e4b605a3
70fb934db3
e19755143e
9daae87a3d
3a27a4c8a4

Reviewed By: yns88

fbshipit-source-id: 8be42153ae2e76389af175b6278d9782893b845c
2021-01-08 13:01:02 -08:00
Stefan Filip
dcfb24ccc6 commands: add simple progress reporting for debugsegmentclone.
Summary:
Rough progress reporting. The progress bars are straight coming from the
`indicatif` crate. Integrating with the `IO` object is not trivial because
we only have a reference. It gets tricky. I think that it makes sense for
us to expand the IO object to something that is more than a `Box<dyn Write>`.
We have about 3 scenarios:
1. Write object that we need to implement interior mutability for to give out
clones.
2. Stdin/Stdout which have their own imlementation for interior mutability.
3. PyObject which has locking already implemented.

(Note: this ignores all push blocking failures!)

Reviewed By: quark-zju

Differential Revision: D25840469

fbshipit-source-id: 87f466f06f2c5d4c63ccb3bbc5c009fae41ed002
2021-01-08 12:07:45 -08:00
svcscm
3c39bf84de Updating submodules
Summary:
GitHub commits:

4cb83a6061
e9007c5ecf

Reviewed By: yns88

fbshipit-source-id: 96db2cff93c7c72b8dba0ee94e0411bcbc8c12e1
2021-01-08 11:32:40 -08:00
Stanislau Hlebik
5a7087f66f mononoke: add link to reclone instruction
Reviewed By: krallin

Differential Revision: D25846570

fbshipit-source-id: 7e8f0d103659dba4c1ab70cae0c172878b967fb6
2021-01-08 10:33:40 -08:00
svcscm
6325db3051 Updating submodules
Summary:
GitHub commits:

2bad81b695
0783f9ecd3

Reviewed By: yns88

fbshipit-source-id: 02f154183a5ee33e3f34d766043d563204e79e0b
2021-01-08 09:24:05 -08:00
Thomas Orozco
81d6aae51d mononoke/edenapi_server: capture handler errors
Summary:
Right now we don't log handler errors to Scuba. This can make debugging a
little tricky: if a client is sending an invalid request, we'll see that we
sent them a 400, but we won't know what was invalid about the request.

This diff updates our logging to actually log that.

Reviewed By: sfilipco

Differential Revision: D25826522

fbshipit-source-id: 89486014e0eeaac5c9b149224601db54a26080d9
2021-01-08 08:45:01 -08:00
svcscm
4babce78c4 Updating submodules
Summary:
GitHub commits:

fcfeaeb8c5
c03dbc0428

Reviewed By: yns88

fbshipit-source-id: cbd3191597bed4602ad3e181338d8ad118c8bf64
2021-01-08 08:45:01 -08:00
svcscm
8f93267ebb Updating submodules
Summary:
GitHub commits:

d973a73e8b

Reviewed By: yns88

fbshipit-source-id: 8d525769f98777c54e800001c578f2b3ee385395
2021-01-08 01:56:39 -08:00
Thomas Orozco
165071f16c revisionstore: make lfs.concurrentfetches actually work
Summary:
There is a little bug here. We produce a stream of futures of futures, then we
buffer it, which gives us a stream of futures, and then we await the futures
one by one, here:

```
while let Some(next) = stream.next().await {
    next.await?
}
```

This is not really correct, because it means we don't actually do fetches
concurrently at all (we just instantiate futures concurrently, but that's not
really async work).

This fixes that by removing one layer of future-ing.

Reviewed By: singhsrb

Differential Revision: D25825895

fbshipit-source-id: 3ad3367f1eb802ce5b9b5288f04fd3705e172537
2021-01-08 01:24:30 -08:00
Stanislau Hlebik
03e7f0d028 mononoke: change crossrepo map subcommand to return CommitSyncOutcome
Summary:
Cross repo sync has two tables to store mapping between commits (this is
something we should probably change, but this is what we have right now).

"map" subcommand was a bit useless because it searched only in a single table,
so for lots of commits it would just return empty response.

Let's instead return CommitSyncOutcome which gives more useful information

Reviewed By: krallin

Differential Revision: D25823629

fbshipit-source-id: afc14f48b6c30bec3714dc9b79cfc4a7d67e38a9
2021-01-08 00:04:11 -08:00
svcscm
69ca666e3c Updating submodules
Summary:
GitHub commits:

1be254ba53

Reviewed By: yns88

fbshipit-source-id: 2b70623a53c45f9a8e3866878b2a79ce26028ed5
2021-01-08 00:04:11 -08:00
svcscm
18faf50fd0 Updating submodules
Summary:
GitHub commits:

f8d96e5158
ab3426b9c3
e776c619e7

Reviewed By: yns88

fbshipit-source-id: 2a95fd32c8d6a8b30b732ed87b357e71ed0275cf
2021-01-07 21:48:20 -08:00
Stefan Filip
9845d2ac8a edenapi: add download progress reporting to full_idmap_clone_data
Summary:
This allows adding progress bars tracking downloads from the server.

We could be smarter in this instance if we were to deserialize on the fly.
The first part of the payload contains the number of idmap entries that we need
but it needs more work to make it clear. The progress object right now is
designed for general bytes.

Reviewed By: quark-zju

Differential Revision: D25840470

fbshipit-source-id: c466c8d606b44981fe63c95352db2d8f14d6071b
2021-01-07 21:44:30 -08:00
svcscm
2b8b3ec72b Updating submodules
Summary:
GitHub commits:

0ba2ee1fb8

Reviewed By: yns88

fbshipit-source-id: 11c61f837eac1e34075e999d92d460f4c754bd29
2021-01-07 21:10:31 -08:00
Egor Tkachenko
11dd72d6c5 Add unbundlereplay command
Summary:
Unbundlereplay command was not implemented in the mononoke but it is used by sync job. So let's add this command here
together with additional integration test for sync between 2 mononoke repos. In addition I'm adding non fast forward bookmark movements by specifying key to sync job.

Reviewed By: StanislavGlebik

Differential Revision: D25803375

fbshipit-source-id: 6be9e8bfed8976d47045bc425c8c796fb0dff064
2021-01-07 20:36:26 -08:00
svcscm
a1db86f179 Updating submodules
Summary:
GitHub commits:

6ec1b37fd0
599937beab

Reviewed By: yns88

fbshipit-source-id: da97fbaa77910fe7f98751b03af6d278235b3c43
2021-01-07 20:36:26 -08:00