Commit Graph

73380 Commits

Author SHA1 Message Date
Carolyn Busch
6c6e8c0124 clone: add conditionals for python or rust clone
Summary: To decide whether to use python or rust clone, first check if flag options are supported by rust clone. Then check if the repo to be clone has serverside segmented changelog support which is required by rust clone.

Differential Revision: D35507009

fbshipit-source-id: 739dc97e7d1812ccc547f8be3c2e98d22960c3fd
2022-04-21 16:39:31 -07:00
Carolyn Busch
353a55b11a repo: add hgrc option to init
Summary: Add optional content for hgrc file to write out the config file includes and configs like path.

Differential Revision: D35786090

fbshipit-source-id: 5b6fda59864bdd3ce149b490930ccb1e07ddd933
2022-04-21 16:39:31 -07:00
Carolyn Busch
81a1c8cd52 repo: add methods for adding requirements
Summary: Add methods to repo to add requirements. We might not want to add these methods, since only clone needs to add reqs for remotefilelog and segmented changelog and we don't want to encourage adding any other requirements outside of repo initialization.

Reviewed By: sggutier

Differential Revision: D35486626

fbshipit-source-id: 55ad6bd3f9e9005cd6280c2443013a1cc615dcec
2022-04-21 16:39:31 -07:00
Carolyn Busch
f9852d6708 clone: initialize metalog tracked in repo init
Summary: Add a method to initialize tracked files in metalog for repo init.

Differential Revision: D35486627

fbshipit-source-id: c29dac5742923c6ede6ee9c9eaeaa34c49f23793
2022-04-21 16:39:31 -07:00
Carolyn Busch
d656f9c50c repo: return a repo from init
Summary: Create and return a repo object in the Repo::init method so additional loading of the repo is not required to use the repo after calling init.

Differential Revision: D35486628

fbshipit-source-id: 4521742b56925882725ae93524c835b81a910220
2022-04-21 16:39:31 -07:00
Facebook Community Bot
becb609a11 Re-sync with internal repository 2022-04-21 16:20:34 -07:00
Michael Cuevas
8fb9ea454a eden/{integration, fs, facebook}: switch to platform010
Summary:
We should all be migrating to platform010, for the improved performance of its
generated code and for its improved diagnostics/portability.

Reviewed By: xavierd

Differential Revision: D35573251

fbshipit-source-id: 5339212de0e617df13277ffcb5a67a535263847d
2022-04-21 15:37:37 -07:00
Jeremy Fitzhardinge
4c0893adc3 eden/watchman/re: clean up unused deps
Reviewed By: dtolnay

Differential Revision: D35730772

fbshipit-source-id: 9ecacb2be237ef8706db7739d54959ee53f9082e
2022-04-21 14:58:37 -07:00
Jun Wu
f83d32575b revisionstore: fix lfs test
Summary: I forgot to run `hg absorb` for D35786868 (ad4aa6ce12).

Reviewed By: DurhamG

Differential Revision: D35825355

fbshipit-source-id: a9a67c3958bc1bd66016d0a3e971b3609511e24f
2022-04-21 13:08:26 -07:00
Durham Goode
ba94504297 tests: disable test-debugruntest.t
Summary:
conch_parser fails to build on some platforms. I ripped out the
dependency but didn't notice it was used in this test. Let's disable the test.

Reviewed By: sggutier

Differential Revision: D35824280

fbshipit-source-id: fd25b2adee065d67b2e686f69d1d92811ff5e7e2
2022-04-21 13:07:02 -07:00
Jun Wu
493761f5a7 backingstore: disable lfs retry properly
Summary:
The backofftimes config is a list not a single value. `0` means retrying 1 time
with no backoff delay. Change it to an empty list to disable retry properly.

Differential Revision: D35789961

fbshipit-source-id: 4845b5ef9d86071e65639888bddc189b52197878
2022-04-21 11:47:21 -07:00
Jun Wu
ad4aa6ce12 revisionstore: do not panic if backoff time is 0
Summary:
```
rand::thread_rng().gen_range(0.0..backoff_time)
```

where backoff_time is 0.0 panics with "cannot sample empty range".

Differential Revision: D35786868

fbshipit-source-id: 46f1366d4d2f4fcef77f7030dbecdcebf9693747
2022-04-21 11:47:21 -07:00
Yan Soares Couto
8b32def617 Add markdown explaining sharded maps in repo
Reviewed By: mitrandir77

Differential Revision: D35644242

fbshipit-source-id: cca0e43ce151be0ae46452df313858582091429a
2022-04-21 10:42:28 -07:00
Yan Soares Couto
7a4e452179 deleted_manifest: Take self in DeletedManifestOps
Summary:
Before this diff, `RootDeletedManifestId` implemented `DeletedManifestOps`, but the arguments of the methods took `DeletedManifestId`, which made it a bit awkward to work with. This diff makes the methods take `&self`, which is much cleaner to do.

So what before looked like this
```
let root = something.await?;
let mf_if = root.deleted_manifest_id().clone();
let res = RootDeletedManifestId::find_entry(..., mf_id).await?;
```

Now looks like this
```
let res = something.await?.find_entry(...).await?;
```

Reviewed By: mitrandir77

Differential Revision: D35614216

fbshipit-source-id: d9f16a7ca716db8d70b1acd67cab781022467fb6
2022-04-21 10:42:28 -07:00
Yan Soares Couto
c08ce6a925 dump-changesets: Change subcommand to dump-changesets and allow not fetching public changesets
Summary:
This command is also useful to just change format of dumped changesets (for example, I dumped them thrift serialized and used that for backfilling, but now need it plaintext for validation). In this case there's no "fetching public" at all, so I changed the command to be a bit more generic than that, and fetching public changesets being only an option on it.

The new way to structure args makes it a bit awkward to work with, as it's a bit hard to tell which args go in which part of the command, since some are common and some are not.

Reviewed By: mitrandir77

Differential Revision: D35580371

fbshipit-source-id: 4f32ed5af048642d72413d826eb3ee8b39cb494e
2022-04-21 10:42:28 -07:00
Yan Soares Couto
7314bfbacc dump-public-changesets: Add plaintext output format
Summary:
This allows the command to also output changesets in plaintext. This is useful since this is the input for commands like `backfill-derived-data validate`.

This will also allow to convert between formats, I'll add more useful related commands on next diffs.

Reviewed By: mitrandir77

Differential Revision: D35579781

fbshipit-source-id: c2739e5d2dcace97edd762a2217c3d6636f47189
2022-04-21 10:42:28 -07:00
Yan Soares Couto
4e8cd63420 dump-public-changesets: Add output format, only 1 option for now
Summary: Mostly a refactor, let's add an output format. On the next diff I'll add different output formats.

Reviewed By: mitrandir77

Differential Revision: D35579467

fbshipit-source-id: aab495f9630f7ff21c487a14e474a3d16e782de1
2022-04-21 10:42:28 -07:00
Yan Soares Couto
59c396f572 Move dump_public_changeset_entries into mononoke_newadmin
Summary:
This moves the tool into mononoke_newadmin and uses the new clap, which makes parsing code much simpler.

Since this is an internal tool only, I deleted the old binary and moved all the code, and change all the test usages. Everything should work the same, just using `mononoke_newadmin dump-public-changesets` instead of `dump_public_changeset_entries`, and as a bonus admin is already deployed automatically :)

Reviewed By: kris1319

Differential Revision: D35578563

fbshipit-source-id: b7cc70d77862cd12a70849b1ffefc9ed65c5ab7c
2022-04-21 10:42:28 -07:00
Harvey Hunt
eb80ece5a8 mononoke: lfs: Log client TW job and task to scuba
Summary:
Update the LFS server to log a client's TW job and task ID to scuba,
so it is easier to identify the sources of traffic.

Reviewed By: mitrandir77

Differential Revision: D35786144

fbshipit-source-id: 53580f35997f4359435d4e9606120fab7ae7b6dc
2022-04-21 09:48:55 -07:00
Harvey Hunt
f2825f8d17 mononoke: Log client tw job and task to scuba
Summary: Update Mononoke server to log the TW job and task ID to Scuba.

Reviewed By: farnz

Differential Revision: D35786141

fbshipit-source-id: db963c8024f43f462ad1ad6cc6ce7054be72208b
2022-04-21 09:48:55 -07:00
Harvey Hunt
189c6f66e7 hg: Store tupperware job and task in ClientInfo
Summary:
`ClientInfo` currently concatenates the TW job and task into a single
string. However, this will make it hard to group by a job when investigating logs.

Update `ClientInfo` to record the job and task ID separately.

Reviewed By: farnz

Differential Revision: D35786145

fbshipit-source-id: 12b1bee08df5ddd1811ffa1fe0d625c2e4a606d7
2022-04-21 09:48:55 -07:00
Durham Goode
d10e9a7a6d conch: remove dependency on conch_parser
Summary:
This introduces test breakages on Windows and build breakages on Mac.
Let's remove it for now.

Reviewed By: quark-zju, singhsrb

Differential Revision: D35818261

fbshipit-source-id: 02560acaf9adb90f0947a865c33139f4ae025372
2022-04-21 09:22:42 -07:00
Jeremy Braun
eb5a890156 Rename/move InodeLoader tests to InodeOrTreeOrEntryLoader
Summary: `InodeLoader` is unused now. Delete it, and port it's tests over to `InodeOrTreeOrEntryLoader`. The test used to compare paths to verify results, because it was easy to walk the inode tree in reverse order to build up a path. We no longer have the path available, as Trees don't below to a hard parent (they can be moved, similar to inodes). Instead, we now set the contents of the file to the absolute path, and compare `Hash20` objects to verify we got the file we expected.

Reviewed By: xavierd

Differential Revision: D35663897

fbshipit-source-id: a58458a7d69aae283dfad031214344f02ebba850
2022-04-21 08:56:40 -07:00
Jun Wu
1ff8dc90ba test-fb-hgext-pushrebase-remotenames: fix output on macOS
Summary: On macOS the output includes a few extra lines.

Reviewed By: DurhamG

Differential Revision: D35799857

fbshipit-source-id: c2b0530078d129c22d52598274ef008c8f6d77f0
2022-04-21 01:06:18 -07:00
Zeyi (Rice) Fan
938c92c4b7 utils: support multibyte in SpawnedProcess
Summary: This diff makes SpawnedProcess to be Unicode-compatible.

Reviewed By: xavierd

Differential Revision: D35267985

fbshipit-source-id: 627035bf5170b2f300ede8553dff08b4ab7385a3
2022-04-20 20:02:11 -07:00
Zeyi (Rice) Fan
3f8d38c374 attempting to stop internal daemon when shutting down EdenFS
Reviewed By: chadaustin

Differential Revision: D35150381

fbshipit-source-id: 0f3dcc785a430635322c4752ea22ece759e843df
2022-04-20 20:02:11 -07:00
Katie Mancini
9463488e8b fix C++ 20 compile error
Summary:
When we try to switch to platform 10 we get this compile error:

```
eden/fs/nfs/Nfsd3.cpp:1378:26:
error: call to consteval function
'fmt::basic_format_string<char, const unsigned int &>::basic_format_string<const char *, 0>'
is not a constant expression
  return fmt::format(fmtString, std::get<typename T::TrueVariant>(val.v));
```

The problem is that fmtString either needs to be a `basic_format_string` or
needs to be a constexpr so that we can cast it to `basic_format_string` through
various means.

Not totally sure why this worked pre c++ 20, but C++20 introduced some stricter
type checking on the fmt library or constexpr stuff in general i guess.

https://github.com/fmtlib/fmt/issues/2438 outlines the possible fixes

`fmt::runtime` looks like the best way.

Reviewed By: vitaut

Differential Revision: D35756658

fbshipit-source-id: 7b65ccf0719a964ab1f2fc1aed72744e72374d20
2022-04-20 17:37:54 -07:00
svcscm svcscm
2c765f6e76 Updating submodules
Summary:
GitHub commits:

ae582dce41
1f480a0235
840a50e833
8b9b2b02e5
85e3bf9a99
c40e4f45e4
840fd41b95
e1cdb9d752
6cd6a7484d

Reviewed By: yns88

fbshipit-source-id: f4bc8f8e8ec51576dead3aee7489fa613b69665f
2022-04-20 16:43:46 -07:00
Genevieve Helsel
ff2b2f362a make procutilstest more forgiving
Reviewed By: chadaustin

Differential Revision: D35788111

fbshipit-source-id: c845b70fc1755d56f9eab2d4e27ee631846fea93
2022-04-20 16:31:08 -07:00
Jon Janzen
0ab7d5f574 Delete travis.yml
Summary: No project has this enabled anymore. We can delete this.

Reviewed By: yns88

Differential Revision: D34740004

fbshipit-source-id: bcbd3da6a4195aa74801b38867376f2d0f0c483b
2022-04-20 16:16:12 -07:00
svcscm svcscm
3aa8b49d08 Updating submodules
Summary:
GitHub commits:

b45ef2bc4c
861c2024dc

Reviewed By: yns88

fbshipit-source-id: 7da20404bbf75ae32836f850a6ff70397a91d539
2022-04-20 15:58:41 -07:00
Zeyi (Rice) Fan
647c5aacbe rage: set up fb environment when dumping traces
Reviewed By: chadaustin

Differential Revision: D35325659

fbshipit-source-id: 17bfc262c11aa6f620416c130ac7bbf94011f881
2022-04-20 15:11:01 -07:00
svcscm svcscm
f556079bca Updating submodules
Summary:
GitHub commits:

de47a8492e
ce2078bf03
47a88f953f
a4d01ceee7
e81e08a960

Reviewed By: yns88

fbshipit-source-id: e5169c9b70aad54ce020ebbf20edcc4d09e1205c
2022-04-20 14:41:23 -07:00
svcscm svcscm
990cde93ea Updating submodules
Summary:
GitHub commits:

f9b5c0d592

Reviewed By: yns88

fbshipit-source-id: a048a597cbca2750c3c60eb33d51525249df8257
2022-04-20 14:04:11 -07:00
Xavier Deguillard
d30af1eab4 diff: fix double caseSensitive field in DiffContext
Summary: We really only should have one, but alas we have 2. Let's unify them.

Reviewed By: MichaelCuevas

Differential Revision: D35659643

fbshipit-source-id: f171508fb9dd01e69c69753ba845fc4a3da04243
2022-04-20 13:41:21 -07:00
svcscm svcscm
5d0ff9558d Updating submodules
Summary:
GitHub commits:

9635258fda

Reviewed By: yns88

fbshipit-source-id: 4ef3cb0e76d87fefa6114f9d555aacccf0277b6e
2022-04-20 13:09:12 -07:00
Jun Wu
a6e31de629 debugruntest: initial alternative .t runner
Summary:
An alternative to run-tests.py. Does not shell out to anything
and supports Python code.

Reviewed By: DurhamG

Differential Revision: D34725135

fbshipit-source-id: 686b5996bb6016a8ebad04f804171a9a2fccd6aa
2022-04-20 12:57:30 -07:00
Jun Wu
a2f029fd7e chg: add edenscm.dispatch.ischgserver to test if run under chgserver
Summary: This will be used by a later change.

Reviewed By: DurhamG

Differential Revision: D34790215

fbshipit-source-id: c7a5f89ab0a8c03bd975df6ae2af4386d6942035
2022-04-20 12:57:30 -07:00
Jun Wu
64838bbc31 testing: add extensions to extend TestTmp
Summary:
TestTmp itself is independent from application logic (ex. hg) and is
intended to be maybe useful for non-hg use-cases.

In hg's use-cases the hg and python command, and a bunch of env vars
like HGUSER need to be set.

Add an "extension" concept: `testsetup(t: TestTmp)` to extend TestTmp.
For now, just add hg and python (the command) as optional extensions.
In the future other users of the testing library might want to define
their own extensions.

Reviewed By: DurhamG

Differential Revision: D34790207

fbshipit-source-id: 8d5aac9a1fb5ad56d9df1c16a5240f77db6499b1
2022-04-20 12:57:30 -07:00
Jun Wu
f42faf1c64 sshpeer: short circuit hg serve command in tests
Summary:
Previously the hg serve command requires a chain of other commands to run:

  hg (client) -> /bin/sh -> /usr/bin/env -> python -> dummyssh -> hg (server)

This diff makes it run the server process directly:

  hg (client) -> hg (server)

So there is no dependency on /bin/sh (or cmd.exe), a standalone python etc.

The dummyssh logic is "inlined" so the stdout + stderr order is preserved.

Test changes:
- run-tests and testutil: ensure sys.argv[0] is set to hg, not the t.py test
  so util.hgcmd() works
- test-clone, test-pull, test-push: removed checks about ssh injection - we
  no longer use ssh in production anyway.
- test-fb-hgext-pushrebase-remotenames: minor output update
- test-commitcloud-sync: incompatible and irrelevant --bgssh test removed
- test-infinitepush-bundlestore: irrelevant and removed
- test-rustmanifest-t: stdout / stderr order adjusted

Reviewed By: DurhamG

Differential Revision: D34835693

fbshipit-source-id: ff71ec1cfe57ea9b00a811703b89211b1b8fc76a
2022-04-20 12:57:30 -07:00
Jun Wu
cf4c855ca6 testing: TestTmp for test environment setup
Summary:
TestTmp sets up the test environment like what run-tests.py does per test.
It does not affect global state so one can use TestTmp in multiple tests
in one single test file.

See the docstring of the added TestTmp class for examples.

Reviewed By: DurhamG

Differential Revision: D34725132

fbshipit-source-id: 422b73adb82b0373868a776cf703ca36d6cd6c52
2022-04-20 12:57:30 -07:00
Yan Soares Couto
8be546a730 snapshot: Speed up cleaning up local working copy
Summary: This is an attempt to bypass some slow code in our logic to revert so that it works fast more consistently.

Reviewed By: mrkmndz

Differential Revision: D35782843

fbshipit-source-id: 8ec956d37e8f62537ff9f8d29e0a0fadff405f00
2022-04-20 12:55:31 -07:00
svcscm svcscm
e135fcf958 Updating submodules
Summary:
GitHub commits:

a3c61adbc7
9eb4827315
12793aebdc
2ea4205a69
cd8a7ba830
3565c5425b

Reviewed By: yns88

fbshipit-source-id: bbac88feb7f29238cc6deeec8f6377e6ddae25c1
2022-04-20 12:05:43 -07:00
Jun Wu
b0a9d1faf5 pyindexedlog: add bindings for indexedlog's Log
Summary:
This makes it easier to use Python scripts to check and view contents of
indexedlog.

Reviewed By: DurhamG

Differential Revision: D35585546

fbshipit-source-id: cd2022e4d6d67a18d43052fbccfd1580721ef23c
2022-04-20 11:43:36 -07:00
Jun Wu
6ccc8a53ac bindings: add a way to update modules automatically
Summary:
Use [cog](https://nedbatchelder.com/code/cog) to generate code based on files.
This makes it easier to update the module list.

Reviewed By: DurhamG

Differential Revision: D35585547

fbshipit-source-id: 60f3c9a5bde2a1460ebe64a5701693f60f9ccd13
2022-04-20 11:43:36 -07:00
Jun Wu
4af09806fd bindings: simplify module initialization using proc macro
Summary: Make it easier to add a new module to bindings.

Reviewed By: DurhamG

Differential Revision: D35585550

fbshipit-source-id: 9aade63c586a69413f977dccced030ebddddb039
2022-04-20 11:43:36 -07:00
Jun Wu
845068d896 pyindexes: remove module
Summary: It is no longer used after D29020190 (8cc60851cb).

Reviewed By: DurhamG

Differential Revision: D35585549

fbshipit-source-id: 8640e790b1c2f3b2a7ade7ccfe2711bea98bba4b
2022-04-20 11:43:36 -07:00
svcscm svcscm
e91b29b9fd Updating submodules
Summary:
GitHub commits:

e09b69cc0f
a27422e898

Reviewed By: yns88

fbshipit-source-id: def7377cdb153c8032524d8536fc41aa82db5bc8
2022-04-20 11:30:12 -07:00
Aida Getoeva
8975eab3a9 mononoke/walker: fix --storage-id arg
Summary:
I forgot to add `#[clap(long)]` to the `--storage-id` arg and also the tw config was set to pass `--storage-id` as a main command arg while it's actually a sumbcommand arg. Because of that the walker tasks were failing with :
```
rror: Found argument '--storage-id' which wasn't expected, or isn't valid in this context
	If you tried to supply `--storage-id` as a value rather than a flag, use `-- --storage-id`
USAGE:
    walker --scuba-dataset <SCUBA_DATASET> --mysql-query-time-limit <MYSQL_QUERY_TIME_LIMIT> --fb303-thrift-port <PORT> --blobstore-read-qps <BLOBSTORE_READ_QPS> --manifold-request-priority-override <MANIFOLD_REQUEST_PRIORITY_OVERRIDE> --blobstore-scrub-grace <BLOBSTORE_SCRUB_GRACE> --blobstore-scrub-action <BLOBSTORE_SCRUB_ACTION> <--repo-id <REPO_ID>|--repo-name <REPO_NAME>> <--config-path <CONFIG_PATH>|--config-tier <CONFIG_TIER>|--prod> <SUBCOMMAND>

```

Reviewed By: markbt

Differential Revision: D35783175

fbshipit-source-id: 5efe68e78730212dfa02db3f17f071b9a4bff490
2022-04-20 10:49:54 -07:00
svcscm svcscm
805482480c Updating submodules
Summary:
GitHub commits:

242b9fa262
f81cc3dff1
25b029edba
0c061cead8

Reviewed By: yns88

fbshipit-source-id: fc961b8c8fa1d7f247de223706c8e1cdb49063e9
2022-04-20 10:47:00 -07:00