Commit Graph

62288 Commits

Author SHA1 Message Date
Jun Wu
3fc8f38541 changelog2: add "lazytext" backend
Summary: The backend is designed to be used by the "debugsegmentclone" command, which does not write revlog.

Reviewed By: sfilipco

Differential Revision: D25624786

fbshipit-source-id: e145128c7b41d78fed495f8da540169f741b674d
2020-12-18 16:47:11 -08:00
Jun Wu
207f755dc0 hgcommits: make revlog optional for the hybrid backend
Summary: This makes it possible to add new commits in a repo without revlog.

Reviewed By: sfilipco

Differential Revision: D25602527

fbshipit-source-id: 56c27a5f00307bcf35efa4517c7664a865c47a43
2020-12-18 16:47:11 -08:00
svcscm
5b5392f1b7 Updating submodules
Summary:
GitHub commits:

17b64c83af
c46887708b
9dc9e2944f

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 8d1a8859ad87aa3cff3686f8e4d2a322fa641478
2020-12-18 16:47:11 -08:00
svcscm
b25a2c7ba2 Updating submodules
Summary:
GitHub commits:

5386fd4a85
bbc4ede54b
d6693c88a0

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 62bc4446e39094510fcf386a7cee677c5da3a5f0
2020-12-18 12:45:00 -08:00
Xavier Deguillard
ee48ba3dd6 store: silence howtoeven lint
Summary:
HowToEven believes that both path and manifestNode might be used after being
moved and thus complains about it as that's often what is intended. However,
in C++17, this lint is spurious as both of these variables will be moved after
being copied properly in the first lambda. To silence the linter, let's just
split the combinator chain in 2.

Reviewed By: genevievehelsel

Differential Revision: D25627413

fbshipit-source-id: 1a93ca039310dfd04a3f11bd9c7de32e93057517
2020-12-18 12:10:05 -08:00
svcscm
c0e4a5ce69 Updating submodules
Summary:
GitHub commits:

5f2af60ce4
cf9aab0e91
dfd307bbcf

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 1bc39fa00a4667454abc0ef635a7fa99150c36f4
2020-12-18 11:38:46 -08:00
Aida Getoeva
7867ce6965 mononoke: fix mysql options
Summary: Because mysql connection pool options had both `conflicts_with(myrouter)` and default values, the binary always failed if myrouter option was provided.

Differential Revision: D25639679

fbshipit-source-id: 21ebf483d4ee88a05db519a14b7e2561b3089ad1
2020-12-18 11:21:38 -08:00
Jun Wu
78005ae5a5 py3: fix test-run-tests.py
Summary:
When running `python3 run-tests.py test-run-tests.py`, some bytes were printed
with `b` prefix.  Convert them to `str`.

Reviewed By: DurhamG

Differential Revision: D25642164

fbshipit-source-id: f1103b24ad88d0d024f6be546bf632141f06ebd1
2020-12-18 10:38:19 -08:00
svcscm
69624fb27c Updating submodules
Summary:
GitHub commits:

20f47e6c4c
1003cdadb9

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 4a746cd31c6456a062338b2edcc21533f36a6174
2020-12-18 09:55:13 -08:00
Stanislau Hlebik
63690b7aa7 mononoke: remove deprecated method from cross repo sync library
Summary:
A bit of history first. For some time we had a problem in our cross repo sync
library where it used the "current" commit sync version, where "current" meant
"the latest commit sync config version that was added". That was incorrect, and
we migrated away from this model, however there were still a few places that
used get_current_mover_DEPRECATED() mover.

Removing this method from a test file is easy, but it's trickier for
sync_diamond_merge tool. This tool is used to sync a diamond merge from a small
repo to a large repo (this is non-trivial to do, so we don't do it
automatically). To make things simpler this diff requires all involved commits
(i.e. both parents, where to rebase (onto) and root of the diamond merge) to
have the same commit sync config versions.

Reviewed By: markbt

Differential Revision: D25612492

fbshipit-source-id: 6483eed9698551920fb1cf240218db7b7e78f7bd
2020-12-18 09:35:31 -08:00
svcscm
f4a5855547 Updating submodules
Summary:
GitHub commits:

4f641ac16d
4488c1ca63

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: bff8e52fecb027928025eedf4a0560190054f5a0
2020-12-18 08:36:47 -08:00
Liubov Dmitrieva
18b8c66439 introduce some delay befor writing warning
Summary:
The warning will go to debug level logs if the delay is not reached.

The messages about the locks make profoundly bad effect on attitude to commit cloud even if the delay is just 1 second (that is a reasonable delay).

Reviewed By: quark-zju

Differential Revision: D25587459

fbshipit-source-id: 9a09484d590ba04d17a881e0c9c5d543686b934f
2020-12-18 06:32:00 -08:00
Lukas Piatkowski
67b05b6c24 mononoke/integration: make integration tests work under @mode/dev-rust-oss
Summary: Last step in covering Mononoke with mode/dev-rust-oss buck build mode.

Reviewed By: markbt

Differential Revision: D25461223

fbshipit-source-id: 3fa0fa05e8c96476e069990e8f5cc6d56acf38c0
2020-12-18 06:13:32 -08:00
svcscm
cf98c5e0a9 Updating submodules
Summary:
GitHub commits:

2a41f3f09d
d4b2c1ca96

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 464f0ab42dfb378027f20f60e37e8dc445e5d9c5
2020-12-18 06:13:32 -08:00
svcscm
96359ff3d4 Updating submodules
Summary:
GitHub commits:

087554f8f9
2395a8da5e
1794d85fed
d1802684f9
d545b5f9b0
9dbc250105
085d96b6c4
98d2c092f7

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 5ac5a6a3fcabc20a2a744131a6177739cdee7669
2020-12-17 16:47:28 -08:00
Aida Getoeva
8b93f52b71 mononoke/mysql: use single static shared connection pool
Summary:
The correct workflow for using a multi-threaded connection pool for multiple DBs is to have a single shared pool for all the use-cases. The pool is smart enough to maintain separate "pools" for each DB locator and limit them to maximum 100 conn per key.

In this diff I create a `OnceCell` connection pool that is initialized once and reused for every attempt to connect to the DB.
The pool is stored in `MononokeAppData` in order to bind its lifetime to the lifetime of Mononoke app. Then it is passed down as a part of `MysqlOptions`.  Unfortunately this makes `MysqlOptions` not copyable, so the diff also contains lots of "clones".

Reviewed By: ahornby

Differential Revision: D25055819

fbshipit-source-id: 21f7d4a89e657fc9f91bf22c56c6a7172fb76ee8
2020-12-17 15:46:30 -08:00
Aida Getoeva
e9f3284b5b mononoke/mysql: make mysql options not copyable
Summary:
In the next diff I'm going to add Mysql connection object to `MysqlOptions` in order to pass it down from `MononokeAppData` to the code that works with sql.
This change will make MysqlOptions un-copyable.

This diff fixed all issues produced by the change.

Reviewed By: ahornby

Differential Revision: D25590772

fbshipit-source-id: 440ae5cba3d49ee6ccd2ff39a93829bcd14bb3f1
2020-12-17 15:46:30 -08:00
Aida Getoeva
8ecb9977a5 mononoke: use parse mysql options in benchmark filestore
Summary:
benchmark_filestore XDB subcommands uses mysql and has option of using either myrouter or mysql. In this diff I used `args::parse_mysql_options` function to parse the arguments instead of manual processing and get a `MysqlOptions` object.
This is needed later to pass a connection pool object through the `MysqlOptions` struct (see the next diff).

Reviewed By: ahornby

Differential Revision: D25587898

fbshipit-source-id: 66fcfd98ad8f3f9e285ca9635d8f625aa680d7ff
2020-12-17 15:46:29 -08:00
svcscm
9677a6ba17 Updating submodules
Summary:
GitHub commits:

342fa4f10e
7255a8f18e
cb2bf7c923
ff89efd48a
4709344d24

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 276c81d3617ccd18d12e50f3b7f46793ce7babe3
2020-12-17 14:58:14 -08:00
Egor Tkachenko
ccc9e4e39a Verification of backup repos
Summary:
This package will be used by chronos job on regular basis. It will spawn legocastle jobs for each of backup repos, pull them in together with origin repo from production tier and compare hashes of commits.

`fbpkg.builder` allows to create package and add it to contbuild together with creating a binary.
`https://www.internalfb.com/intern/wiki/Fbpkg/fbpkg.builder/#overview`

Reviewed By: HarveyHunt

Differential Revision: D25573914

fbshipit-source-id: 3f7ff3a6b2d7acefed46683122b72c5bc862e1aa
2020-12-17 14:36:11 -08:00
Thomas Orozco
db4c8fa924 mononoke/bonsai_hg_mapping: get rid of futures 0.1
Summary:
Like it says in the title. This is nice to do because we had old futures
wrapping new futures here, so this lets us get rid of a lot of cruft.

Reviewed By: ahornby

Differential Revision: D25502648

fbshipit-source-id: a34973b32880d859b25dcb6dc455c42eec4c2f94
2020-12-17 14:30:57 -08:00
Thomas Orozco
f39675ba67 mononoke/phases: remove futures 0.1
Summary:
This was kinda almost done. Might as well finish it by updating what's left,
i.e. the tests.

Reviewed By: ahornby

Differential Revision: D25498799

fbshipit-source-id: 65b7b144f5cf86d5f1754f5c7dafe373173b5ece
2020-12-17 14:30:57 -08:00
svcscm
1ba7c2d80d Updating submodules
Summary:
GitHub commits:

12803c4772
04b3524ad0

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: ae50c6484c4d5298115ba0d2b47ccbdab9abe418
2020-12-17 12:34:35 -08:00
Stanislau Hlebik
111a3199fc mononoke: limit concurrency when putting commits to scribe queue
Summary: Let's not spawn too many futures at once

Reviewed By: markbt

Differential Revision: D25612069

fbshipit-source-id: e48901b981b437f66573a1abfba08eb144af2377
2020-12-17 12:14:06 -08:00
svcscm
7c5758115b Updating submodules
Summary:
GitHub commits:

ecacf40481
986b5d790e
41186bf69b
c58849e71f

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 42d2a3650c701c4cd02acf041c0cf991ef349bb2
2020-12-17 12:14:06 -08:00
svcscm
dc70866f7a Updating submodules
Summary:
GitHub commits:

b9f9aeb5ba
9543c43d3a

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 222e6aa54b9cb325ac32ef8bc31ef476b52c4f9f
2020-12-17 10:18:12 -08:00
Stanislau Hlebik
6716b51bae mononoke: add unit-tests to find_draft_ancestors method
Summary: Forgot to add them when I wrote the test. Let me add tem now

Differential Revision: D25611802

fbshipit-source-id: 0db7bee2034ad6e1566c5eb6de2e80e18140d757
2020-12-17 10:13:15 -08:00
svcscm
ec650aa025 Updating submodules
Summary:
GitHub commits:

e52b5e3184
3d73d6da77

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: d0246c9eab8c017998e37e33f87ad8be10200066
2020-12-17 09:32:25 -08:00
Pavel Aslanov
ade7d57425 convert blobrepo tests to new type futures
Summary: convert blobrepo tests to new type futures

Reviewed By: StanislavGlebik

Differential Revision: D25589260

fbshipit-source-id: 49a49dac6ad98b52a7800010cd08f30e4853c44f
2020-12-17 07:45:26 -08:00
Pavel Aslanov
0fc5c3aca7 convert BlobRepoHg to new type futures
Summary: Convert all BlobRepoHg methods to new type futures

Reviewed By: StanislavGlebik

Differential Revision: D25471540

fbshipit-source-id: c8e99509d39d0e081d082097cbd9dbfca431637e
2020-12-17 07:45:26 -08:00
Durham Goode
cfd7ccc828 configs: add Python support for allowed_locations list
Summary:
configs.allowedlocations restricts what configs can be loaded to a
certain set of files. This will enable us to deprecate all old config locations.

This diff adds Python support and a high level test.

Reviewed By: quark-zju

Differential Revision: D25539736

fbshipit-source-id: fa2544379b65672227e0d9cf08dad7016d6bbac8
2020-12-17 06:37:54 -08:00
Durham Goode
dce0faa9b1 configparser: add allowed_location criteria to config verifier
Summary:
We want to start disallowing non-approved config files from being
loaded. To do that, let's update the config verifier to accept an optional list
of allowed locations. If it's provided, we delete any values that came from a
disallowed location.

This will enable us to prune our config sources down to rust configs,
configerator configs, .hg/hgrc, and ~/.hgrc.

Reviewed By: quark-zju

Differential Revision: D25539738

fbshipit-source-id: 0ece1c7038e4a563c92140832edfa726e879e498
2020-12-17 06:37:54 -08:00
svcscm
609e80129a Updating submodules
Summary:
GitHub commits:

95e08d42fb

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: f2a663de4a424452812d026d8defce810f16aec6
2020-12-17 04:47:20 -08:00
Egor Tkachenko
7ba932a332 Add field backup_source_name to repo_config
Summary:
Remove logic of striping `_backup` suffix and get source repo from configerator.
Has dependency on D25571595. And should be landed after it.

Reviewed By: krallin

Differential Revision: D25420829

fbshipit-source-id: 50e2fe2bede849ba622dcbde2a360b08e640901a
2020-12-17 04:30:03 -08:00
svcscm
bcc4524033 Updating submodules
Summary:
GitHub commits:

9a83e4242a

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 4aaf96d1a0b749e272f6ddd5792df03bfe62b4d8
2020-12-17 04:30:03 -08:00
svcscm
c2ec45bdfb Updating submodules
Summary:
GitHub commits:

acef4a6449

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 543b5987f32c6bdcfb82c3ec4e1fe5acbc90249c
2020-12-17 03:10:01 -08:00
Stanislau Hlebik
79dda5ed04 mononoke: log public commits to scribe from scs move/create_bookmark method
Summary:
The goal of this stack is to start logging commits to scribe even if a commit was
introduced by scs create_commit/move_bookmark api.  Currently we don't do that.

Initially I had bigger plans and I wanted to log to scribe only from bookmarks_movement and remove scribe logging from unbundle/processing.rs, but it turned out to be trickier to implement. In general, the approach we use right now where in order to log to scribe we need to put `log_commit_to_scribe` call in all the places that can possibly create commits/move bookmarks seems wrong, but changing it is a bit hard. So for now I decided to solve the main problem we have, which is the fact that we don't get scribe logs from repos where bookmarks is moved via scs methods.

To fix that I added an additional option to CreateBookmark/UpdateBookmark structs. If this option is set to true then before moving/creating the bookmark it finds all draft commits that are going to be made public by the bookmark move i.e. all draft ancestors of new bookmark destinationl. This is unfortunate that we have to do this traversal on the critical path of the move_bookmark call, but in practice I hope it won't be too bad since we do similar traversal to record bonsai<->git mappings. In case my hopes are wrong we have scuba logging which should make it clear that this is an expensive operation and also we have a tunable to disable this behavioiur.

Also note that we don't use PushParams::commit_scribe_category. This is intentional - PushParams::commit_scribe_category doesn't seem useful at all, and I plan to deprecate it later in the stack. Even later it would make sense to deprecate PushrebaseParams::commit_scribe_category as well, and put commit_scribe_category optoin in another place in the config.

Reviewed By: markbt

Differential Revision: D25558248

fbshipit-source-id: f7dedea8d6f72ad40c006693d4f1a265977f843f
2020-12-17 00:19:00 -08:00
svcscm
31b5439048 Updating submodules
Summary:
GitHub commits:

df0dbc3b05
de5a1eb4c3
4a23e52ffc
88f345081c

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: c960a183d9ae77d4ebe477d880a7a4b985feead8
2020-12-17 00:19:00 -08:00
svcscm
a319526663 Updating submodules
Summary:
GitHub commits:

6fe2bfab61
99f5a800c3
a6db0be0c9

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 28ec3ada5f7ba80ed6f260d94354fd899a3c0493
2020-12-16 22:18:54 -08:00
Jun Wu
63bb40f9c4 ui: move push/pull messages to stderr
Summary:
Those messages like "pulling from ...", "added n commits ..." belong to stderr.

This makes it possible for us to turn on verbose output for auto pull, without
breaking tools that parses stdout.

Reviewed By: sfilipco

Differential Revision: D25315955

fbshipit-source-id: 933f631610840eb5f603ad817f7560c78b19e4ad
2020-12-16 20:12:04 -08:00
Jun Wu
aef162f7a1 dag: add an API for IdMap identity
Summary:
It turns out `Arc::ptr_eq` is becoming unreliable, which will cause fast paths
to be not used, and extreme slowness in some cases (ex. `public & nodes`
iterating everything in `public`).

This diff adds an API for an IdMap to tell us its identity. That identity is
then used to replace the unreliable `Arc::ptr_eq`.

For an in-memory map, we just assign a unique number (per process) for its
identity on initialization. For an on-disk map, we use the type + path to
represent it.

Note: strictly speaking, this could cause false positives about
"maps are compatible", because two maps initially cloned from each other
can be mutated differently and their map_id do not change. That will
be addressed in upcoming diffs introducing a more complex but precise way to
track compatibility.

Reviewed By: sfilipco

Differential Revision: D25598076

fbshipit-source-id: 98c58f367770adaa14edcad20eeeed37420fbbaa
2020-12-16 20:08:41 -08:00
svcscm
14469f6379 Updating submodules
Summary:
GitHub commits:

9869d46691
890d153dde
8573768d00

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 1aa4fa02479e9452894fa6db2c86b1a2c4b1774d
2020-12-16 20:08:41 -08:00
svcscm
b35a6319dd Updating submodules
Summary:
GitHub commits:

29d12748b0
d28376f763
571fba1ee7
4406ac585f
a0555b0be4
decc5b34be

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: e2173fc9c8f83c232c5245c03e80442b39b106e6
2020-12-16 17:51:18 -08:00
Xavier Deguillard
c37954fa29 rage: use registry to find Windows version
Summary:
On Windows, platform.version appears to be misleading as it returns 1903 for
Windows 10 1909... The registry has the correct build, so let's use that instead.

Reviewed By: kmancini

Differential Revision: D25577939

fbshipit-source-id: f47032906d02669bd1cb1a48304733c1e3499f81
2020-12-16 17:21:13 -08:00
Jun Wu
c9a701d104 pull: update visibility efficiently via repo.pull API
Summary:
With selectivepull we can tell visibility directly about which heads to add,
instead of adding all nodes in a changegroup.

Note: This does not affect the pull command, nor exclude public commits yet.

Reviewed By: markbt

Differential Revision: D25562090

fbshipit-source-id: aa5f346f33058dfdb3b2f23f175e35b5d3c30a1d
2020-12-16 17:12:55 -08:00
Jun Wu
35094bad4e remotenames: move a few methods to core
Summary: They will be used in core later.

Reviewed By: markbt

Differential Revision: D25562093

fbshipit-source-id: 4402a629a09920fd4c6f85cb8e777446bb218a37
2020-12-16 17:12:55 -08:00
svcscm
2b1ae681ca Updating submodules
Summary:
GitHub commits:

8abd038bfa
5c437f7ea4
9c9f59e752
c3d0623253
154c0c183d
0268d68581

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 5cc406cbcc9eb0f1e37828ee40beef2901962349
2020-12-16 17:12:55 -08:00
svcscm
dc746f4279 Updating submodules
Summary:
GitHub commits:

947ae93192
c6b01f4108
1160b9594c

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: ef1e81a844098ea7f9dd7978cb746a5af4ad0409
2020-12-16 10:53:00 -08:00
Mark Juggurnauth-Thomas
91f2d07dbe tests: add test for derived data tailer
Reviewed By: krallin

Differential Revision: D25562158

fbshipit-source-id: 2ff917c4ae2f7c4b273b91d3f742bab6b05d8b46
2020-12-16 10:38:48 -08:00
Mark Juggurnauth-Thomas
5eaf0cfde2 backfill_derived_data: don't try to rederive heads we just derived
Summary:
When tailing to fill or backfill derived data, omit checking the heads from the
previous round of derivation, as we know for sure they've been derived.

Reviewed By: krallin

Differential Revision: D25465445

fbshipit-source-id: 384c7e67e99c561ce6aae324070e7c274c56b736
2020-12-16 10:38:48 -08:00