Commit Graph

59228 Commits

Author SHA1 Message Date
Meyer Jacobs
586ada8de6 taggederror: introduce bail macro replacement which allows tagging
Summary: This change introduces a bail macro that allows tagging errors using the syntax `bail!(fault=Fault::Request, "my normal {}", bail_args)` or `bail!(Fault::Request, "my normal {}", bail_args)`.

Reviewed By: DurhamG

Differential Revision: D22646428

fbshipit-source-id: a6ec2940001b26db8ddc3a6d3620a1e17406c867
2020-07-22 15:37:14 -07:00
svcscm
be0df9024d Updating submodules
Summary:
GitHub commits:

1468c0968c
96ce0470a7

Reviewed By: bigfootjon

fbshipit-source-id: 9632458f8ad37cc6a46e25972697398547a9a7e7
2020-07-22 15:37:14 -07:00
svcscm
0c29277299 Updating submodules
Summary:
GitHub commits:

bd67fc9d01

Reviewed By: bigfootjon

fbshipit-source-id: 94ab4e83026defa3cb3f6e6ffc7969db55f3238d
2020-07-22 13:58:30 -07:00
Katie Mancini
c6900de010 quiet noisy scs proxy hash logging
Summary:
lower the debug level for scs proxy hash logging so that this does not cause so
much noise in the logs of production eden

Reviewed By: chadaustin

Differential Revision: D22668574

fbshipit-source-id: 1a7c2a4706514c0ef0bb848424681eef9316d296
2020-07-22 13:10:07 -07:00
svcscm
9a3e829298 Updating submodules
Summary:
GitHub commits:

aa7baa76be
5455e216d1
d44cbc5314

Reviewed By: bigfootjon

fbshipit-source-id: 10b8adc1775f04c9201da0794262c9d929eeacb0
2020-07-22 12:45:24 -07:00
Alex Hornby
6a0b614a90 mononoke: fix flaky test-walker-validate.t
Summary: Fix flaky test-walker-validate.t.   There can be more than one route to the bad filenode, so wildcard the src and via fields when matching the output.

Reviewed By: StanislavGlebik

Differential Revision: D22664371

fbshipit-source-id: f4d880187ec2b557fb5f69ad546c2486d150b337
2020-07-22 11:05:48 -07:00
Arun Kulshreshtha
edb856a77e mononoke_api: use create_getpack_v2_blob in HgFileContext
Summary: Use `create_getpack_v2_blob` instead of `create_getpack_v1_blob` for fetching file content because the former also provides metadata, which is required to support LFS.

Reviewed By: quark-zju

Differential Revision: D22564950

fbshipit-source-id: 2835160a9dfd18b80cd13e4a5dbcf6f4ce2f4579
2020-07-22 10:37:14 -07:00
Kostia Balytskyi
55cb8dba22 admin: asyncify crossrepo subcommand
Summary: This makes crossrepo subcommand not import `BoxFuture`

Reviewed By: StanislavGlebik

Differential Revision: D22647197

fbshipit-source-id: ea2dd20039a8aaf96be0483cc25f3fad38d262f5
2020-07-22 09:17:43 -07:00
svcscm
14a58f4e13 Updating submodules
Summary:
GitHub commits:

3c5f23c86c

Reviewed By: bigfootjon

fbshipit-source-id: b6f0cea7e6f49f67e4b020a64028488b27927e4e
2020-07-22 08:06:36 -07:00
Stanislau Hlebik
aaafd7a707 mononoke: allow specifying list to redact in a file
Summary:
For large lists it's much more convenient to specify them in a file - we are
not limited by cmd line size limit.

Reviewed By: krallin

Differential Revision: D22595023

fbshipit-source-id: 93035208700f981453eaf98f84341a86f2f1c04d
2020-07-22 07:37:36 -07:00
Kostia Balytskyi
1e5a0dc4db admin: add crossrepo config subcommand
Summary: This is to be able to inspect `LiveCommitSyncConfig` from our admin tooling.

Reviewed By: StanislavGlebik

Differential Revision: D22497065

fbshipit-source-id: 3070890b7dc2a4075a5c15aca703494e33ee6530
2020-07-22 07:34:59 -07:00
Stanislau Hlebik
c6ff6a0216 mononoke: add a command to verify manifests
Summary:
We have three different types of manifests that store file type and content -
hg manifests, fsnodes and unodes.

Let's add a command that verifies that these manifests are consistent.

There's some copy-paste in the code when listing manifests (e.g. list_fsnodes,
list_unodes etc are quite similar). There might be a way to have less
copy-paste, but given that each of the functions have some small differences it
doesn't really seem worth it.

Reviewed By: krallin

Differential Revision: D22663631

fbshipit-source-id: 487be8611df218472cec1899f34367906794484b
2020-07-22 07:25:31 -07:00
svcscm
eccb4f389f Updating submodules
Summary:
GitHub commits:

8bcfb0f1bd
c2c70665ef

Reviewed By: bigfootjon

fbshipit-source-id: 25dd3a222f1573a3c61b2e00df4d812baa594199
2020-07-22 07:25:31 -07:00
svcscm
b64f3b8e17 Updating submodules
Summary:
GitHub commits:

69bb6f7a24
ddaf5161c8

Reviewed By: bigfootjon

fbshipit-source-id: 00637b4e26c25fd0972a01dc05c05e3c5180005b
2020-07-22 04:44:37 -07:00
generatedunixname89002005287564
839c31572e Daily arc lint --take CLANGFORMAT
Reviewed By: zertosh

Differential Revision: D22661583

fbshipit-source-id: feb6b7fddee4809d8d089dd6eb51aa3f7185faed
2020-07-22 04:35:29 -07:00
svcscm
9174f24799 Updating submodules
Summary:
GitHub commits:

75e80949d7

Reviewed By: bigfootjon

fbshipit-source-id: feaf2f86ad8901bab2b4e51a739b8a2ff19f79b0
2020-07-22 03:57:17 -07:00
Lukas Piatkowski
808a00ea73 mononoke/integration tests: provide localhost certs for OSS test runs (#30)
Summary: Pull Request resolved: https://github.com/facebookexperimental/eden/pull/30

Reviewed By: johansglock

Differential Revision: D22596741

fbshipit-source-id: e8cf5da09f5c8c812b78b44aac969f52e195684f
2020-07-22 03:29:19 -07:00
svcscm
ab4f804b3b Updating submodules
Summary:
GitHub commits:

18d0657204
85009b3f2b
400448d84b

Reviewed By: bigfootjon

fbshipit-source-id: 0952ef151988a92951eb8142d8b6f5c5602e6054
2020-07-21 20:48:34 -07:00
Saurabh Singh
3f07bece6b tests: fix test-fileset.t
Summary: This was unfortunately broken by D22468669 (0562c1220f).

Reviewed By: DurhamG

Differential Revision: D22656138

fbshipit-source-id: 96f276466b09ec0017967289c380a7dbf3d1ecea
2020-07-21 19:10:34 -07:00
Durham Goode
fec3f6ee4c py3: fix dirsync
Summary: The tests now pass

Reviewed By: singhsrb

Differential Revision: D22651024

fbshipit-source-id: 86d262d8526abe8cab5f55be0822cf9e4bc3e1b8
2020-07-21 18:22:59 -07:00
svcscm
f93256a5e4 Updating submodules
Summary:
GitHub commits:

74e8af8618

Reviewed By: bigfootjon

fbshipit-source-id: eeb7d0b26e7f4f5531f524bc3b174c847e9fdf87
2020-07-21 18:22:59 -07:00
svcscm
41a2593a3b Updating submodules
Summary:
GitHub commits:

c90d8287a9
349b2037fc
5d517eb779
f5938fc16c
8d65fb227a
b923dc720b
1ff7f1aa63
236e046925
139c6f2292

Reviewed By: bigfootjon

fbshipit-source-id: 1dd8af1e8eef84ff67afe446a9c63e9e549b8c6c
2020-07-21 14:45:53 -07:00
Victor Zverovich
e3f4a56f6b Migrate to field_ref Thrift API
Summary:
We are unifying C++ APIs for accessing optional and unqualified fields:
https://fb.workplace.com/groups/1730279463893632/permalink/2541675446087359/.

This diff migrates code from accessing data members generated from unqualified
Thrift fields directly to the `field_ref` API, i.e. replacing

```
thrift_obj.field
```

with

```
*thrift_obj.field_ref()
```

The `_ref` suffixes will be removed in the future once data members are private
and names can be reclaimed.

The output of this codemod has been reviewed in D20039637.

The new API is documented in
https://our.intern.facebook.com/intern/wiki/Thrift/FieldAccess/.

drop-conflicts

Reviewed By: yfeldblum

Differential Revision: D22631599

fbshipit-source-id: 9bfcaeb636f34a32fd871c7cd6a2db4a7ace30bf
2020-07-21 11:23:35 -07:00
Kostia Balytskyi
dd4fcd7aee commit_validator: validate according to recorded sync config version
Summary: `commit_validator` cannot just use latest `CommitSyncConfig` to validate how a commit was synced between large and small repos. Instead, when querying `synced_commit_mapping`, it needs to pay attention to `version_name` used to create the mapping. Then it needs to query `LiveCommitSyncConfig` for a config of this version and use it as a validation basis.

Reviewed By: StanislavGlebik

Differential Revision: D22525606

fbshipit-source-id: 6c32063b18461d592d931316aec7fd041bcc1ae4
2020-07-21 10:19:44 -07:00
Egor Tkachenko
661d31bd21 mononoke: check that repo is locked during unbundle process
Summary:
Currently the repo lock is checked only once at the beginnig of unbundle future. That unbundle process take some time and during that time repo can be locked by someone.
We can reduce that possibility by creating additional future, which will check the repo in the loop and poll both futures for whoever will finish first.

Reviewed By: StanislavGlebik

Differential Revision: D22560907

fbshipit-source-id: 1cba492fa101dba988e07361e4048c6e9b778197
2020-07-21 09:41:38 -07:00
Kostia Balytskyi
be29e70289 admin: report version in crossrepo map
Summary: What the title says.

Reviewed By: farnz

Differential Revision: D22476423

fbshipit-source-id: 5d6781fc09e3f89c1d555787821770d6b131c9f2
2020-07-21 09:09:23 -07:00
Kostia Balytskyi
9d607c382b commit sync config versioning: expose version in RewrittenAs
Summary:
This is the next step in exposing version, used to sync commits in read
queries. The previous step was to query this from DB, now let's also put it
into an enum payload. Further, I will add consumers of this in admin and
validation.

Note that ideally, `RewrittenAs` should always have a version associated with
it, but:
- right now this is not true in the DB (needs backfilling)
- even when I backfill everything, I would not like to error out just at
  reading time, I would prefer the consumers to deal with the absense of a
  version in rewrtitten commits.

Therefore, I decided to use `Option` here.

Reviewed By: StanislavGlebik

Differential Revision: D22476166

fbshipit-source-id: 5bc27bb21b7e59c604755ef35aa5d3d2c3df527e
2020-07-21 09:09:23 -07:00
Kostia Balytskyi
fc61c74f23 live_commit_sync_config: make scs xrepo-lookup watch live changes
Summary:
When we change `CommitSyncConfig`, we want to not have to restart `scs` servers, and instead have them pick up the new config by using `LiveCommitSyncConfig`.

This diff turned out larger than I expected, mainly due to the need to introduce various things around `TestLiveCommitSyncConfig`:
- `TestLiveCommitSyncConfig`: the trait implementer to use in `mononoke_api::Repo`
- `TestLiveCommitSyncConfigSource`: the helper struct to keep around for new values injection (very similar to how our `ConfigStore` has an inner `ConfigSource`, which can also be `TestSource`, but here injected values can be `CommitSyncConfig` instead of JSON).
- all the places in integration tests, where `setup_configerator_configs` is now needed (I plan to start setting up configerator configs always in a separate diff, as it is cheap)

Here are the explanations for a few things I think may be not immediately obvious:
- I removed the `Clone` bound from `LiveCommitSyncConfig` trait, as `Clone` traits [cannot be made into trait objects](https://doc.rust-lang.org/book/ch17-02-trait-objects.html#object-safety-is-required-for-trait-objects)
- `TestLiveCommitSyncConfigSource` vs `TestLiveCommitSyncConfigSourceInner` discrepancy is to ensure nobody should instantiate `TestLiveCommitSyncConfigSourceInner` outside of `live_commit_sync_config/src`
- I am aware of the ugly discrepancy between the main `--mononoke-config-path`, which is used to load initial configuration and can be both a file-based and a configerator-based config; and `--local-configerator-path`, used to override config sources for `Tunables` and `LiveCommitSyncConfig`. Ideally these two should just be unified somehow, but that is a little out of scope of this diff (I've already added it to the dirt doc though).
- in `mononoke_api::Repo` there are methods `new_test_xrepo` and `new_test_common`, which changed from maybe accepting just a `CommitSyncConfig` to now maybe accepting both `CommitSyncConfig` and `LiveCommitSyncConfig`. It can be made a bit cleaner: I can just query `CommitSyncConfig` from `LiveCommitSyncConfig` in `new_test_common` and avoid having two args. I was too lazy to do this, lmk if you feel strongly about it.

Reviewed By: StanislavGlebik

Differential Revision: D22443623

fbshipit-source-id: 0d6bbda2223e77b89cc59863b703db5081bcd601
2020-07-21 09:09:23 -07:00
Viet Hung Nguyen
c5e880c239 mononoke/repo_import: Add bookmark moving functionality
Summary: After we derived the bonsaichangesets (D22455297 (c315c56c05)), we want to move a bookmark in small increments to reveal the commits to the users (https://fburl.com/wiki/zp9hgd7z step 8). This diff adds this functionality to repo_import and automate this step.

Reviewed By: StanislavGlebik

Differential Revision: D22598159

fbshipit-source-id: 01db898f07a0b7be50c3f595e78931204f33bb46
2020-07-21 06:47:51 -07:00
Alex Hornby
2aaddc487e mononoke: add context to alias deserialize error handling
Summary: Add context to show the affected key if there are problems deserializing an alias.

Reviewed By: krallin

Differential Revision: D22629544

fbshipit-source-id: 1718d4187386e37038bb5c958db2659bd5b54cfd
2020-07-21 06:11:46 -07:00
svcscm
fb18541328 Updating submodules
Summary:
GitHub commits:

f8cc2b4fdd

Reviewed By: bigfootjon

fbshipit-source-id: a1c32ad780e479c6bbbb703efdc5d3918b7df8b3
2020-07-21 03:02:27 -07:00
Chad Austin
8a19bac535 remove some journal update duplication
Reviewed By: genevievehelsel

Differential Revision: D21489112

fbshipit-source-id: c31808f68cda79ed20ef27415837eb89e11ca825
2020-07-21 00:39:55 -07:00
svcscm
4b048162d9 Updating submodules
Summary:
GitHub commits:

cb65bfd323
0ba862ab9e
8e1ad914b1
0f487cc35f
0bd7ceeaae
53c3810de3
a3eb91783b
3c93dccc2d

Reviewed By: bigfootjon

fbshipit-source-id: be7c5340f753168d00e089afcb3181dcb11a68f1
2020-07-20 18:37:41 -07:00
Jun Wu
8cc63c6d37 smartset: reduce dependency on len(repo)
Summary:
The spanset has the assumption that `0..len(repo)` are valid revs.
That's not true with segmented changelog. So reduce the dependency on the
assumption.

Reviewed By: kulshrax

Differential Revision: D22519586

fbshipit-source-id: a493d26d6d69a36966f4a037f87a03593b697cbd
2020-07-20 17:27:54 -07:00
Jun Wu
c6fc753ad7 smartset: rename spansset to idset
Summary: Match the Rust `IdSet` name and be more different from `spanset`.

Reviewed By: kulshrax

Differential Revision: D22519590

fbshipit-source-id: 5be7990c2157dc09a37067ea7402a49da2a3127c
2020-07-20 17:27:54 -07:00
Jun Wu
0562c1220f tests: enable template-new-builtin
Summary: This makes tests depend less on revision numbers.

Reviewed By: DurhamG

Differential Revision: D22468669

fbshipit-source-id: 74a06930faa3e6ee9d246ecc718c2a3740f57a54
2020-07-20 17:27:53 -07:00
Jun Wu
bd04ff507d changelog: use Rust RevlogIndex for __len__
Summary: The `__len__` operation returns the number of commits.

Reviewed By: DurhamG

Differential Revision: D22402200

fbshipit-source-id: 3084dc02dc1e9999f839f22e314eb09e430cd6d2
2020-07-20 17:27:53 -07:00
Jun Wu
680c0592b7 pydag: add an unsaferange API
Summary:
It turns out the Python world needs the integer range API in many places.
Deprecating them is non-trivial. Therefore expose the API.

Reviewed By: DurhamG

Differential Revision: D22402201

fbshipit-source-id: de31d15c18e5f4e0f8826f71315b98ad58b1764e
2020-07-20 17:27:52 -07:00
Jun Wu
24e46bb082 strip: use Rust strip for testing
Summary:
The Rust strip logic works for both revlog and segmented changelog. Use it in
tests for easier segmented changelog migration.

The old revlog strip has a lot of complexities on linkrev. Since this is only
used for testing, I avoided the complexities by just saying all linkrevs are
invalidated so we can skip the complexities of dealing with filelog or
manifest, or generating a temporary bundle and unbundling them later.

Most test changes are because we no longer strip filelogs. So unbundling
them will not add new file revisions.

`test-repair-strip.t` is removed because it is only about "Permission Denied"
cases. With the new code path file logs are not stripped and the test is not
relevant.

This does not affect hgsql as it has the Rust logic totally disabled.

Reviewed By: DurhamG

Differential Revision: D22402198

fbshipit-source-id: 1c207393f59a8a3a601cfbdf7f07534b8acf46bf
2020-07-20 17:27:52 -07:00
Arun Kulshreshtha
202e6433dc remotefilelog: add option to turn on EdenAPI for fetching file data and history
Summary: Add a new config option (`remotefilelog.http`) to make Mercurial use an EdenAPI-backed remote store in place of the SSH remote store.

Reviewed By: quark-zju

Differential Revision: D22492536

fbshipit-source-id: efcc780b65d4fd64b70728d056eadff59ed78128
2020-07-20 14:18:06 -07:00
generatedunixname89002005307016
6527db2809 suppress errors in eden - batch 1
Reviewed By: pradeep90

Differential Revision: D22628389

fbshipit-source-id: c109334243a92269a7fb9a9b0515565ac22ecfac
2020-07-20 13:29:51 -07:00
svcscm
209c054215 Updating submodules
Summary:
GitHub commits:

3c2a306bd8
63685d5006
9870704420

Reviewed By: bigfootjon

fbshipit-source-id: 6edd055041ab21ebe2fd7fddd701e8e9bc63bb04
2020-07-20 13:19:52 -07:00
Jun Wu
cf0ca1416a smartlog: turn on collapse-obsolete by default
Summary: It has been on beta for a while.

Reviewed By: DurhamG

Differential Revision: D22519355

fbshipit-source-id: 805341d6a8bf13b6847830aee55e2cf19940a626
2020-07-20 12:50:13 -07:00
svcscm
63c85b7072 Updating submodules
Summary:
GitHub commits:

77062cf13e
cf6188b5d9

Reviewed By: bigfootjon

fbshipit-source-id: 381d2205b86780c5053ffe8b20af35c9ed17fc20
2020-07-20 12:11:55 -07:00
Meyer Jacobs
f8b83f7880 debug: log exception metadata to scuba along with other exception information
Summary:
Extend `_log_exception` to inspect exceptions for metadata, and log any that is found to Scuba. Eventually I'd like to merge at least some of this information from the `perfpipe_hg_errors` table into the `perfpipe_dev_command_timers`.

Introduce `Tagged` mixin and `Fault` enum Python types for tagging Python exceptions.

Introduce `debugthrowexception` for testing Python error handling flow.

Reviewed By: DurhamG

Differential Revision: D22585764

fbshipit-source-id: f6300ae25db25d5e75fab9c2a03fb4f9beb06c1f
2020-07-20 11:46:13 -07:00
Mark Thomas
0046feb616 smartlog: --commit-info should colorize its output
Summary:
Smartlog commands with `--commit-info` additionally print out the changes in
the current commit, in the same format as `hg status`.  Add labels so that
the output is correctly colorized.

Reviewed By: farnz

Differential Revision: D22625583

fbshipit-source-id: e4658ecabbf8bbd2121bdf284eae9766ac98641e
2020-07-20 11:13:18 -07:00
Mateusz Kwapich
0a8aaa461c repo_stack_info: return queue when the limit is hit
Summary:
This allows clients to get more commits in the followup query, also it lets the
clients know that the limit was reached.

Reviewed By: markbt

Differential Revision: D22576875

fbshipit-source-id: 93de20b1033cd5d0cdf902a418d7b727b03d2d08
2020-07-20 10:39:52 -07:00
Mateusz Kwapich
3547ffd3a9 repo_stack_info: make the repo_stack_info results ordered
Summary:
We already traverse in useful order, let's preserve this order as it's natural
for clients to expect some kind of topological ordering.

Reviewed By: markbt

Differential Revision: D22576873

fbshipit-source-id: 32a6f0de1ba9cc473e57b5a69fde538dfe8a3d75
2020-07-20 10:39:52 -07:00
Mateusz Kwapich
a142790f41 repo_stack_info limit the limit
Summary: This prevents us from abuse in form of crazy big queries.

Reviewed By: markbt

Differential Revision: D22576876

fbshipit-source-id: 0e407d79ba367f1b42faa82e4757053e43001e50
2020-07-20 10:39:52 -07:00
Mateusz Kwapich
6bc6730839 repo_stack_info: limit the output size, not traversal depth.
Summary:
The customers need our queries to return a predictable amounts of output
whilist limiting the depth doesn't really do it: the output may be
theoretically exponential.

Reviewed By: markbt

Differential Revision: D22576874

fbshipit-source-id: 65c793b229889c0cf26af693537ed6dbc0d33ebd
2020-07-20 10:39:52 -07:00