Commit Graph

59442 Commits

Author SHA1 Message Date
Durham Goode
823759ecc4 py3: fix test-simplekeyvaluefile.py
Summary: It now passes

Reviewed By: quark-zju

Differential Revision: D22654321

fbshipit-source-id: c1e327be69c4b0d41461422a4c0ff2e0d1bc28fd
2020-07-22 19:00:42 -07:00
Durham Goode
e336dd55d7 py3: fix test-fb-hgext-diff-since-last-submit-t.py
Summary: It now passes

Reviewed By: quark-zju

Differential Revision: D22654015

fbshipit-source-id: 8a0d97fa35b593ed012a2653e8ccf629854afc71
2020-07-22 19:00:42 -07:00
Durham Goode
e1b037aa35 py3: fix test-fb-hgext-remotefilelog-datapack.py
Summary: It now passes

Reviewed By: quark-zju

Differential Revision: D22653975

fbshipit-source-id: 8b6b39d9ff3dd8fa6d4bdc4fe28fc13a22efd9ff
2020-07-22 19:00:42 -07:00
Durham Goode
7011986ac2 py3: fix test-sparse-fetch-t.py
Summary: The test now passes

Reviewed By: quark-zju

Differential Revision: D22653782

fbshipit-source-id: 69dc2a364013848e8640c9f89e0552b6ce0fcd2b
2020-07-22 19:00:42 -07:00
Durham Goode
4cc3731d03 py3: fix test-sparse-profiles.t
Summary: It now passes

Reviewed By: quark-zju

Differential Revision: D22653171

fbshipit-source-id: 1c59bb0ab0140f569bdd24f0c19f651041be2f9c
2020-07-22 19:00:42 -07:00
Durham Goode
9eeb1d6412 py3: fix test-push.t
Summary: It now passes

Reviewed By: quark-zju

Differential Revision: D22652658

fbshipit-source-id: f7eb9e34067898e0220f3572fa142199eb5f7803
2020-07-22 19:00:41 -07:00
Durham Goode
065db9681c py3: fix test-merge-tools.t
Summary: It now passes

Reviewed By: quark-zju

Differential Revision: D22652124

fbshipit-source-id: 145ef33507ce1cf774a22841c1809a068720a80b
2020-07-22 19:00:41 -07:00
Durham Goode
6b12fdb38b py3: fix test-worker.t
Summary: It now passes

Reviewed By: singhsrb

Differential Revision: D22651796

fbshipit-source-id: 3383b42396127c5121b326d426f83d293bc49ed1
2020-07-22 19:00:41 -07:00
Durham Goode
b9d2e97a12 py3: fix test-journal.t
Summary: It now passes

Reviewed By: singhsrb

Differential Revision: D22651738

fbshipit-source-id: 24635ee344018574fd99e37781221fab82a2b4d7
2020-07-22 19:00:41 -07:00
Durham Goode
f36c5dda8d py3: fix tweakdefaults
Summary: The test now passes

Reviewed By: singhsrb

Differential Revision: D22651701

fbshipit-source-id: c698bee1453de6457398bfc56bd5d921da2d80ae
2020-07-22 19:00:41 -07:00
Durham Goode
72e59cb7ec py3: fix simplecache
Summary: The test now passes

Reviewed By: singhsrb

Differential Revision: D22651610

fbshipit-source-id: c745300ef8b92b1973f5f41b34738dfd470fcbce
2020-07-22 19:00:41 -07:00
Durham Goode
f0ea8f584d py3: fix hg doctor
Summary: The test now passes.

Reviewed By: singhsrb

Differential Revision: D22651357

fbshipit-source-id: 9c690f1ed12cd4bd2b337ed931e217b4cca667bb
2020-07-22 19:00:41 -07:00
Durham Goode
b956d30e1a py3: log python version to scuba
Summary:
Logs the python version string to scuba.  This is the full string, like
'2.7.5 (default, Apr  2 2020, 13:16:51) \n[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]'
so it will require contains "2.7" or contains "3.8" type checks. I figured
having the full python information would be useful, instead of just logging the
major and minor versoin.

Reviewed By: singhsrb

Differential Revision: D22650538

fbshipit-source-id: 9bdbd5f71c2063ecdd06ed4994e00d8f9c9e0698
2020-07-22 17:56:19 -07:00
Xavier Deguillard
31044a4cb2 thrift: do not test for socket before connecting to it
Summary:
In Windows 10 2004, the behavior of AF_UNIX socket changed slightly, a socket
on which a server is listening to now appears to be shown as a "reparse point"
on disk. This appears to confuse Python as `os.path.exists(socketpath)` no
longer returns `True` for a listened to socket, which means that edenfsctl
would not be able to communicate with EdenFS, even though it is up and running.

Windows still has this weird behavior where the socket is created on disk
during connect, but EdenFS knows about this and already retries several times
(D21755498 (2c5768404d)) to avoid the issue, it's therefore fine to remove this code.

Reviewed By: wez

Differential Revision: D22666081

fbshipit-source-id: e2eea3fdd7628354b8b187b76899be4e9e2fa17f
2020-07-22 15:37:14 -07:00
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