Commit Graph

20294 Commits

Author SHA1 Message Date
Jun Wu
17552b4d3e pydag: expose VerLink of sets
Summary:
This makes it easier to look into the "versions" associated by the `nameset`s
from Python.

For example, to understand more about D47376881, with the temporary change like:

  --- a/fbcode/eden/scm/edenscm/localrepo.py
  +++ b/fbcode/eden/scm/edenscm/localrepo.py
  @@ -1230,7 +1230,12 @@

           # Invalidate revsets like "public()".
           if heads or remotenamechanges:
  +            r1 = self.revs("public()")
               self.invalidatevolatilesets()
  +            r2 = self.revs("public()")
  +            import IPython
  +
  +            IPython.embed()

Then we can check that the versions of `r1` and `r2` are different:

  In [3]: r1._set.hints()
  Out[3]:
  {'map_version': <VerLink 0x55655c855fb0->0x55655c875f50->12>,
   'dag_version': <VerLink 0x55655c844000->0x55655c86c7e0->13>,
   ...}

  In [4]: r2._set.hints()
  Out[4]:
  {'map_version': <VerLink 0x55655c4aa1f0->0x55655c86e740->18>,
   'dag_version': <VerLink 0x7f26200cf3e0->0x55655c3fc260->19>,
   ...}

  # None: considered as "incompatible"
  In [7]: r1._set.hints()['map_version'].cmp(r2._set.hints()['map_version']) is None
  Out[7]: True

For more context of `dag::VerLink`. Check its docstrings.

Reviewed By: zzl0

Differential Revision: D47383634

fbshipit-source-id: 84d95a5442f3901ad331e7724eeebea3419788d2
2023-07-12 08:49:15 -07:00
Jun Wu
a64ab830c1 repo: invalidate phases cache after pull
Summary:
Invalidate revsets like `public()` after pull. This resolves inefficient
lookups for commands like:

  hg log -r 'only(HASH,public())'

that triggers autopull of HASH.

Reviewed By: zzl0

Differential Revision: D47376881

fbshipit-source-id: 0be17c38d5bfb3b25c5d86a0cf990226c9bd3a0f
2023-07-12 08:49:15 -07:00
Jun Wu
f0f0592c62 tests: add a test that demonstrates sub-optimal remote lookups
Summary:
Reported by liubov-dmitrieva in P785997251. The autopull does not invalidate certain
revsets like `public()` causing suboptimal massive remote hash<->location
lookups.

Reviewed By: zzl0

Differential Revision: D47376880

fbshipit-source-id: 0383574feece99962232de36c17b686686f7b3ee
2023-07-12 08:49:15 -07:00
Rajiv Sharma
165283ce4e Refactor git object storage and error reporting code
Summary: The method responsible for storing raw git objects and all the errors associated with git methods are currently present in the `mononoke_api` crate. This diff moves it out to `git_types` crate so it can be used for git data derivation along with API endpoints in SCS.

Reviewed By: markbt

Differential Revision: D47315212

fbshipit-source-id: 79ffad807474efedc3aacd33e5438267a6d41ac2
2023-07-12 07:22:53 -07:00
Shayne Fletcher
f2f02bf804 create a -types crate for Thrift-generated types
Summary:
picking up from D37112756.

given thrift library `foo`, where before we'd generate target `foo-rust`  (containing a `types.rs` module) we now generate two targets, `foo-rust` & `foo-rust-types` where the `types.rs` module is in the latter crate which is depended upon by the former. the motivation is to enable greater build parallelism (see D37112756 for more).

## buck

### files and symlinks in buck-out/.

single-file-thrift-library-foo multi-crate {F1041073024}
multi-file-thrift-library-foo multi-crate
{F1041073062}

## autocargo

### files in target/.

single-file-thrift-library-foo multi-crate {F1041073095}
multi-file-thrift-library-foo multi-crate {F1041073125}

## deployment plan

-  diff (1) land autocargo changes (D47342888)
      - will break autocargo workflows not using `arc`
-  diff (2) initiate an autocargo bump
      - https://www.internalfb.com/intern/msdk/bump/autocargo
-  diff (3) (D46573767 - this diff) rebase all remaining changes on (2) and land it
      - thrift compiler, compiler wrapper, rust thrift build defs
      - regenerated 'Cargo.toml', 'thrift_build.rs' and 'thrift_lib.rs' files
      - will break autocargo thrift builds (bad "thrift1"; invoking incompatible thrift compiler)
-  diff (4) initiate a thrift1 bump (now (3) has landed) and land it
      - https://www.internalfb.com/intern/msdk/bump/thrift1

Reviewed By: zertosh

Differential Revision: D46573767

fbshipit-source-id: b2db8e3bf307a6498f92cdb8a64c26b8871a0a1d
2023-07-12 07:12:07 -07:00
Rajiv Sharma
cc99daddf1 Preparatory work for deriving RawGitTree
Summary:
This diff includes two changes as a preparation step for deriving `RawGitTree`s:
- Make the `upload_git_object` take a `Blobstore` argument instead of using a `impl RepoBlobstore`. This will allow the git tree derivation module to reuse this functionality
- Change the `blobstore_key` for the current Git Tree type

Note that this by itself will not make the storing git tree object reusable since currently it lives in `mononoke_api` crate and referencing it in `git` crate leads to a cycle. In the next diff I will move this logic in the `git` crate so that it can be used without cyclic dependencies.

Reviewed By: markbt

Differential Revision: D47315214

fbshipit-source-id: fbc8787633aaa38089e17f005750f8dbe4b03a15
2023-07-12 03:58:48 -07:00
Chad Austin
b7f2e6f0d0 remove a use of toAppend in ChronoParse.h
Summary: We are migrating away from `folly::to`.

Reviewed By: xavierd

Differential Revision: D45935360

fbshipit-source-id: c33f0ecb0e7b2482dd7d49a8a00f3309c17caded
2023-07-11 18:41:45 -07:00
Haitao Mei
e729e2b5ce new admin tool bulk unlinking integration test add new test case for multiple input files
Summary: This diff adds a new test case, where we have multiple input files that contains the key to delete.

Reviewed By: mitrandir77

Differential Revision: D47230796

fbshipit-source-id: c109e3028c11ca0d5ef38ef5cb0dacb0d75c80f2
2023-07-11 05:39:01 -07:00
Haitao Mei
532376d320 new admin tool bulk unlinking integration test new test case
Summary: This diff added a new test case: when the given key, which with a non-existing repo.

Reviewed By: mitrandir77

Differential Revision: D47230657

fbshipit-source-id: 3f316a360043373bd9b42212675920f60a8fc9e4
2023-07-11 05:39:01 -07:00
Haitao Mei
179988ef89 new admin tool bulk unlinking integration test
Summary:
This diff adds a new test case for the integration test:
* A good key, and we successfully delete the key

This diff also fixes a problem of the cleanup test results, and make the test file name more reasonable.

Reviewed By: mitrandir77

Differential Revision: D47228786

fbshipit-source-id: ed0d56007f4b19412b2b26b7ae00c4c48f8721c6
2023-07-11 05:39:01 -07:00
Haitao Mei
9c29375b63 new admin tool unlink refactoring
Summary:
This diff does the follow:
* fix linter problems in the pre diffs in this stack
* remove the directory creating for error log files, to prevent typos

Reviewed By: mitrandir77

Differential Revision: D47228262

fbshipit-source-id: 5422ce01809100732070dafebf6dbda06ce5a872
2023-07-11 05:39:01 -07:00
Haitao Mei
ba203e428e new admin tool bulk unlinking integration test tests regex
Summary:
This diff adds a new case for bulk unlinking integration test: the key doesn't match the regex.

We should stop the program immediately, as a protect mechanism.

Reviewed By: mitrandir77

Differential Revision: D47228117

fbshipit-source-id: 542516488c77370e09ae94333056030515e65496
2023-07-11 05:39:01 -07:00
Haitao Mei
134a0cd481 new admin tool bulk unlinking integration test
Summary:
This diff adds a new integration test for bulk unlinking.

The integration test now only test the situation where the given key is a bad format.

Next diffs will add more cases.

Reviewed By: mitrandir77

Differential Revision: D47226110

fbshipit-source-id: 5061d6fd4f4ce6c043b37dad9f2f61df71af75eb
2023-07-11 05:39:01 -07:00
Haitao Mei
38673f25f7 add new integration test case for the new admin tool's unlinking funciton
Summary: As titled

Reviewed By: mitrandir77

Differential Revision: D47226106

fbshipit-source-id: a4319ac8c6eb38dafa6d7e80792f949380f7d8c3
2023-07-11 05:39:01 -07:00
Haitao Mei
404ce7b50c new admin tool doesn't print inner store ids when constructing a Multiplexed blobstore
Summary: This diff makes the new admin tool doesn't print inner store ids when constructing a Multiplexed blobstore

Reviewed By: mitrandir77

Differential Revision: D47226109

fbshipit-source-id: 4ff4d135102758b088497bc1719b669b5ab64561
2023-07-11 05:39:01 -07:00
Michael Cuevas
0484a46a24 introduce Filter class
Summary:
When implementing Mercurial filtering logic for the FilteredBackingStore, I realized that simply having a FilterCallback function would be insufficient for most filtering implementations.

There's global state that one may want to keep track of, validation logic, and possible caching that can be done by the filter handler.

Therefore, in this diff I'm introducing the Filter class. Each FilteredBackingStore user will implement their own Filter class to define how filtering is done. These custom Filter classes can add things like validation, caching, etc.

The next diff introduces the HgSparseFilter class and tests it.

Reviewed By: genevievehelsel

Differential Revision: D47161201

fbshipit-source-id: 2bf119ad8a2d01274b272f03ffb5b130e030a0ca
2023-07-10 19:33:04 -07:00
Zhaolong Zhu
26199dcef7 copytrace: tests the returned commit
Summary: test the returned commit

Reviewed By: sggutier

Differential Revision: D47309965

fbshipit-source-id: c60dcb9cccd19a0d99feeca328a9cf11cef0d0dd
2023-07-10 14:09:12 -07:00
Revathy Kasipandian
8f755ce048 Mark landed diffs based on diff status
Summary: Mark landed diffs based on diff status

Reviewed By: quark-zju

Differential Revision: D47252120

fbshipit-source-id: ab1ccde74a091923de6764d8bcc0a4fd49164898
2023-07-10 13:39:07 -07:00
Zhaolong Zhu
c611a35acb copytrace: use TraceResult in dag_copy_trace APIs
Summary:
use TraceResult in dag_copy_trace APIs, so the result includes the
deletion commit, we will surface it to users.

Reviewed By: quark-zju

Differential Revision: D47303774

fbshipit-source-id: 185b62d5808ca6ba061e69e9ede07c729111ce5e
2023-07-10 13:32:36 -07:00
Zhaolong Zhu
a0528e6dd6 copytrace: add TraceResult enum for returning the deletion commit
Summary:
this is for returning the deletion commit to users when did not find
the renamed-to file of a given source file

Reviewed By: quark-zju

Differential Revision: D47302011

fbshipit-source-id: e833d3189df9c7475dae03d67e3487886c85cb34
2023-07-10 13:32:36 -07:00
Zhaolong Zhu
c105206ef4 dag: remove unneeded macro code
Summary:
Below code causes many `warning: using .deref() on a double reference` warnings. Seems
the code that caused it is not needed anymore, let's remove it.

```
delegate!(DagAlgorithm, Arc<dyn DagAlgorithm + Send + Sync> => self.deref());
```

```
warning: using `.deref()` on a double reference, which returns `&dyn DagAlgorithm + std::marker::Send + Sync` instead of dereferencing the inner type
   --> /data/users/zhaolong/fbsource/fbcode/eden/scm/lib/dag/src/delegate.rs:126:21
    |
126 |                 self.$($t)*.sort(set)
    |                     ^
...
357 |     delegate!(DagAlgorithm, &(dyn DagAlgorithm + Send + Sync) => self.deref());
    |     -------------------------------------------------------------------------- in this macro invocation
    |
    = note: `#[warn(suspicious_double_ref_op)]` on by default
    = note: this warning originates in the macro `delegate` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: using `.deref()` on a double reference, which returns `&dyn DagAlgorithm + std::marker::Send + Sync` instead of dereferencing the inner type
   --> /data/users/zhaolong/fbsource/fbcode/eden/scm/lib/dag/src/delegate.rs:133:21
    |
133 |                 self.$($t)*.parent_names(name)
    |                     ^
...
357 |     delegate!(DagAlgorithm, &(dyn DagAlgorithm + Send + Sync) => self.deref());
    |     -------------------------------------------------------------------------- in this macro invocation
    |
    = note: this warning originates in the macro `delegate` (in Nightly builds, run with -Z macro-backtrace for more info)
```

Reviewed By: quark-zju

Differential Revision: D47302012

fbshipit-source-id: 8d5aa37bcfa65c43e4e24ff9cc65e4c58c120ae9
2023-07-10 13:32:36 -07:00
Michael Cuevas
dfe8e163b7 add FilteredBackingStore skeleton
Summary:
We are adding a feature that allows users to exclude or "filter" certain paths from appearing in their checkout.

This diff starts prototyping what this may look like by introducing the concept of a FilteredBackingStore. The FilteredBackingStore (FBS for short) will wrap around existing BackingStores and handle filtering out certain trees/blobs from the checkout. It achieves this by avoiding loading any paths that are children of "filtered" paths listed in the filter file.

It's TBD how filter files will be defined and where they will live. We will simply mock them in tests for now to ensure that the filtering logic works.

Reviewed By: kmancini

Differential Revision: D46495637

fbshipit-source-id: cd48ef18b5a94a438a4c1c9ea3e5696e68c62995
2023-07-10 09:41:17 -07:00
Michael Cuevas
a40ea03a16 add FilteredObjectId skeleton
Summary:
Initial design of a FilteredObjectId. This will be used by the FilteredBackingStore to wrap ObjectIds used by other BackingStores.

** this is just an initial implementation. It will probably evolve as I start implementing FilteredBackingStore and start uncovering issues with the design **

Reviewed By: kmancini

Differential Revision: D46010041

fbshipit-source-id: a85ea448af0033278b0e9b4ac7208fec1f33d0d6
2023-07-10 09:41:17 -07:00
Clara Rull
961446fb87 Get network utilisation percent
Summary: In D46837027 I attempted to throttle based on relative bandwidth utilisation, howver it's not grat to try to fetch an ODS counter for every single request, so here I create a new counter for % bandwith util.

Reviewed By: mzr

Differential Revision: D46865298

fbshipit-source-id: 0e20094165f24bc40f47e9c38997be354283810a
2023-07-10 02:45:09 -07:00
Mark Juggurnauth-Thomas
68aa9d7ed1 treemanifest: dedup root tree parents when diffing
Summary:
When asked to diff a tree against two identical parents, we must dedup the parents list at the root.

We already dedup subdirectories, we just need to dedup the root, too.

Reviewed By: zzl0

Differential Revision: D47295036

fbshipit-source-id: ac5d7e838a991f4c787941ca0dce6a685b1486cd
2023-07-10 00:54:02 -07:00
Mark Juggurnauth-Thomas
cd213e1d53 treemanifest: deduplicate merge parents
Summary: When merging parents that were identical, any changes should be treated as if there was a single parent.  There shouldn't ever be two parents with the same id.

Reviewed By: zzl0

Differential Revision: D47289697

fbshipit-source-id: 1ce76795f8797762a13497c296cfdc7b64458fb4
2023-07-10 00:54:02 -07:00
Mark Juggurnauth-Thomas
e8513461e7 add a test demonstrating merge change treemanifest issues
Summary: Add a test which demonstrates that treemanifest differs from filelogs when it comes to handling changes during otherwise clean merges.

Reviewed By: zzl0

Differential Revision: D47289696

fbshipit-source-id: 35c65092891a66cff0523b003e856a8f6ae06c1b
2023-07-10 00:54:02 -07:00
David Tolnay
c2d61e116e Update proc-macro2 from 1.0.63 to 1.0.64
Summary:
This fixes a bug related to bare carriage returns that caused D47318798 to fail in `third-party-rust-verification`. The `schemafy_core` crate contains a file that uses carriage returns which are not followed by newlines 🤮. When that file fails to parse, Reindeer falls back to using non-precise srcs, which produced the following difference to the generated output.

```
 diff --git a/third-party/rust/BUCK b/third-party/rust/BUCK
 --- a/third-party/rust/BUCK
+++ b/third-party/rust/BUCK
@@ -77047,6 +77047,7 @@
     name = "schemafy_core-0.5.1",
     srcs = [
         "vendor/schemafy_core-0.5.1/src/lib.rs",
+        "vendor/schemafy_core-0.5.1/src/main.rs",
         "vendor/schemafy_core-0.5.1/src/one_or_many.rs",
     ],
     crate = "schemafy_core",
```

Reviewed By: zertosh

Differential Revision: D47318928

fbshipit-source-id: 086b96393cc43371b724ac95e841990385576432
2023-07-09 08:54:33 -07:00
Genevieve (Genna) Helsel
3283fb8308 delete unused variable in RocksDbLocalStore
Summary: found this while looking at Overlay things

Reviewed By: mshroyer

Differential Revision: D47306420

fbshipit-source-id: e96ec2e4c073bd16e6b25e50a9c869a49209aaa6
2023-07-08 16:46:06 -07:00
David Tolnay
4d0b498e21 Updates of dtolnay crate-o-matic universe
Reviewed By: zertosh

Differential Revision: D47316925

fbshipit-source-id: d6d374466693cff397a0358bb38c790575998a21
2023-07-08 14:36:37 -07:00
David Tolnay
c93c3b3ef8 Update serde and serde_json
Reviewed By: zertosh

Differential Revision: D47316922

fbshipit-source-id: bc9c0b407d27fee3d590e456d4ddba34e0228f34
2023-07-08 14:34:39 -07:00
David Tolnay
ea7950393c Update syn from 2.0.16 to 2.0.23
Summary: This supports new syntax added in the past months, including `c"..."` CStr literals.

Reviewed By: shayne-fletcher

Differential Revision: D47316927

fbshipit-source-id: ac0e514ca89dad282e64decd01d3a94b3bff8490
2023-07-08 14:32:40 -07:00
Adam Miskiewicz
b6e46427a3 zsh: add "goto" zsh completion (#666)
Summary:
Adds ZSH completion for the "goto" command, mimicking the approach for other similar commands.

I use this command all the time. Some ZSH completion is great! Makes it much faster to use.

Pull Request resolved: https://github.com/facebook/sapling/pull/666

Test Plan:
Tested locally

![image](https://github.com/facebook/sapling/assets/131916/a8f099b1-e1bb-4ed7-adff-6c5043630bf6)
![image](https://github.com/facebook/sapling/assets/131916/6316445a-62b3-4a57-89f9-71acfe8a8ccf)

Reviewed By: genevievehelsel

Differential Revision: D47282430

Pulled By: quark-zju

fbshipit-source-id: 947cd874ef4d407d531311b5325225e86ef8b79d
2023-07-07 21:01:53 -07:00
John Elliott
b243092784 Log NFS crawling process information to structured logger (scuba)
Summary:
* Added new LogEvent - NfsCrawlDetected
* Refactored code to produce a single string output for logging
* Refactored some improperly named local variables (too much Rust recently)

Reviewed By: mshroyer

Differential Revision: D47280602

fbshipit-source-id: 3254eff3f4be417d969fb41116484e350b249530
2023-07-07 19:48:02 -07:00
John Elliott
53d7ac31cf Add process name exclsuion and log reporting for NFS crawling detection
Summary:
* Added new helper readProcessIdsForPath to common/utils to obtain a list of pids that have open files/paths in the specified path.
* Integrated readProcessIdsForPath into the NFS heavy fetch detection logic - enumerating over mount points and collecting the pids for each that have open files therein.

Reviewed By: MichaelCuevas

Differential Revision: D47276991

fbshipit-source-id: bfee34718a23ab5aca7ebff32577374dadd35af9
2023-07-07 19:48:02 -07:00
John Elliott
21893e2149 Added support to enumerate list of processes with open files in Eden mounts
Summary:
* Added new helper readProcessIdsForPath to common/utils to obtain a list of pids that have open files/paths in the specified path.
* Integrated readProcessIdsForPath into the NFS heavy fetch detection logic - enumerating over mount points and collecting the pids for each that have open files therein.

Reviewed By: genevievehelsel

Differential Revision: D47202675

fbshipit-source-id: c00c0cf95822678769a01701981c725360107c99
2023-07-07 19:48:02 -07:00
John Elliott
7ae55e4c22 Added NFS heavy fetch detection
Summary:
* Added experimental config settings to control NFS heavy fetch detection
* Added periodic task to fire and detect for NFS heavy fetching based on controllable threshold

Reviewed By: mshroyer

Differential Revision: D47172825

fbshipit-source-id: 2b4f3da0df52e67288bcb8a874989500e50d2bb4
2023-07-07 19:48:02 -07:00
Andriy Yurchuk
25ca0768fd migrate copy_blobstore_keys to new CLI framework
Summary: A copy_blobstore_keys is a small utility binary that can be used to restore lost blobs from backup repositories. This diff migrates copy_blobstore_keys from dated framework to a new command-line argument parsing and initialisation framework.

Reviewed By: mitrandir77

Differential Revision: D47247626

fbshipit-source-id: f64f1cabdb314e91fcd89b3934f0fd79a55f5642
2023-07-07 09:34:02 -07:00
Juan Cruz Lepore
a3910b896e Add "ulimit -a" to eden rage
Summary:
EdenFS has a command eden rage which users run before posting to our Workplace user group. This command collects debugging diagnostics and puts them in a paste. Sometimes, users can have a broken EdenFS instance if their open file limit is misconfigured. Adding the machine's file limit will help our team identify these issues.  Right now, we might have to ask a user to run ulimit -a after we look at their post. This back and forth causes some friction. Adding this information to the rage would remove the need for this back and forth.

The Linux version of the "System load" section was missing a blank line at the end, so I added that.

Reviewed By: xavierd

Differential Revision: D47228835

fbshipit-source-id: 418a224d6277d86e6200ee69d771cf55eb10d4e1
2023-07-07 07:41:30 -07:00
Liubov Dmitrieva
9cc8936f49 remove deprecated code
Summary:
remove deprecated code

I have verified in mononoke test perf the api is not used.

Also, deprecated client side.

Reviewed By: markbt

Differential Revision: D47292080

fbshipit-source-id: 644b79e44aa898f0a6f8aafb1924ceb4c1c7ccca
2023-07-07 07:13:38 -07:00
Mark Juggurnauth-Thomas
6aaa43ac30 bookmarks_movement: improve error messages
Summary: These are not just used for hooks, so make that clear in the error message, and make it clear which variant we hit.

Reviewed By: clara-9

Differential Revision: D47214878

fbshipit-source-id: 94d1b78df782d53f07807e8faac95c15d84e11e6
2023-07-07 02:47:19 -07:00
Saul Gutierrez
a31e074773 symlinks: separate configs for enabling symlinks
Summary: When rolling out the symlinks feature, it will be better if we had different options for enabling it on EdenFS or other places. This allows the `experimental.windows-symlinks` option to specifically set a list, pontentially including`edenfs`, `watchman`, or `no-fsmonitor` alongside boolean values to achieve this.

Reviewed By: quark-zju

Differential Revision: D47239158

fbshipit-source-id: 7b5b567d34369f0a51613a39802974701d4663d6
2023-07-06 19:47:44 -07:00
Astrid Yu
04e094d14d third-party/rust: Bump tokio-util to v0.7.8
Summary: Seems that [the changelog doesn't list any excessively breaking changes](https://github.com/tokio-rs/tokio/blob/master/tokio-util/CHANGELOG.md), and it's needed to add http/3 support for reqwest.

Reviewed By: zertosh

Differential Revision: D47246722

fbshipit-source-id: 260f8b82bd63725f4c70a48271146dfe4dc1dce8
2023-07-06 18:10:00 -07:00
Andres Suarez
a9e2956534 Update openssl from 0.10.54 to 0.10.55
Reviewed By: shayne-fletcher

Differential Revision: D47272712

fbshipit-source-id: 9b76b421bc20b4dff5b16699e88a0f7a14ca59a7
2023-07-06 16:07:24 -07:00
Andres Suarez
2160bdd790 Apply RUSTFIX
Reviewed By: shayne-fletcher

Differential Revision: D47263740

fbshipit-source-id: 35f08e7645e32526d5424a1260f7bcfdeeb285fb
2023-07-06 12:00:06 -07:00
Jun Wu
1420d8a92f commandserver: fix ui.system on Windows
Summary:
The `cmd.exe` does not use the "common" argv[] parsing [1] [2]. For example, the Rust code:

  Command::new("cmd.exe").arg("/c").arg(r#"notepad "a b.txt"#)

will execute (Windows OS command line, as a single string):

  cmd.exe /c "notepad \"a b.txt\""

which will execute:

  notepad \"a b.txt\"

and notepad will complain that the file cannot be found.

To fix it we need to pass the unquoted command and execute either:

  cmd.exe /c "notepad "a b.txt""
  cmd.exe /c notepad "a b.txt"

which will execute:

  notepad "a b.txt"

See also https://github.com/rust-lang/rust/issues/29494.

[1]: https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-commandlinetoargvw
[2]: https://learn.microsoft.com/en-us/cpp/c-language/parsing-c-command-line-arguments

Reviewed By: zzl0

Differential Revision: D47242639

fbshipit-source-id: c75aa83430520c29002a095333546cc48695244e
2023-07-06 08:52:08 -07:00
Haitao Mei
5d17a04d42 new admin tool bulk unlinking log errors into a file
Summary: This diff allows the new admin tool to log errors into a given file

Reviewed By: mitrandir77

Differential Revision: D47226107

fbshipit-source-id: 1b51f0f0635ce2b0163a837e4770d742cfe84f87
2023-07-06 05:24:58 -07:00
Haitao Mei
e45a58ac86 New admin tool bulk unlinking adding a new error logging funciton
Summary:
New admin tool bulk unlinking adding a new error logging funciton.

Next diff is going to implement the error logging function, so that we can write the error into a given file

Reviewed By: mitrandir77

Differential Revision: D47226108

fbshipit-source-id: ce6de8a1ca92855414a933099e29b3f33ba8ddbb
2023-07-06 02:09:52 -07:00
Saul Gutierrez
3ce780d2f2 symlinks: remove several magic numbers from DirType.h
Summary:
There are [some places in our codebase](https://www.internalfb.com/code/fbsource/[b4c1becb3f0d5c9df5c8ba2ac1f029ef3ba71bf9]/fbcode/eden/fs/model/TreeEntry.cpp?lines=84) that check for the mode of a TreeEntry using the macros defined at `DirType.h` on Windows.

Before the changes made in this commit, symlinks would get classified as regular files since we only used to check if the bits in one type matched another. The mode for regular files is `0x8000`, and the one for symlinks is `0xA000`. `0x8000 & 0xA000` is `0x8000`.

It seems like we are only using the first byte for determining the TreeEntry type, and then using the remaining three bytes for Unix-style filesystem permissions, so this change should be fine.

Reviewed By: xavierd

Differential Revision: D46860406

fbshipit-source-id: e00ade0c597d856ccba05a372264e6a5532e08f4
2023-07-05 17:44:47 -07:00
Zhaolong Zhu
4e8c6171e4 merge: log file merge conflicts
Summary: Log file merge conflicts, so we can reproduce conflicts locally and analyze them

Reviewed By: quark-zju

Differential Revision: D47230778

fbshipit-source-id: 1ab4dd10929788d9caed6df899762e5ad2ccf570
2023-07-05 14:22:10 -07:00
Jan Mazur
95968d199f put tasks_per_content in http query
Summary:
In the previous diff's summary I conclude that it's not possible to infer tasks_per_content for a blob just based on the `routing=` http query param.

I'm adding tasks per content so we can better measure consistent routing in action.

Reviewed By: mitrandir77

Differential Revision: D47210174

fbshipit-source-id: 826bfe9d65261d2e0a3960c4f942e06952f29d3d
2023-07-04 09:41:09 -07:00
Jan Mazur
2c842e896f log popularity metric errors
Summary:
We started seeing lots of these errors recently. This cripples the consistent routing.

I think this is the reason we still route many blobs 1-1 even though with config we should be routing all of them to at least 2 tasks: https://fburl.com/scuba/mononoke_lfs/unjp8uue.

EDIT: well actually I think it might not be as big of an issue as I originally though. Seems like the scuba query is wrong because of the way we generate keys: https://www.internalfb.com/code/fbsource/[4b326f5dff7b0d223bdaf91f6f5649f2bc464ed6]/fbcode/eden/mononoke/lfs_server/src/batch.rs?lines=295-305. The base case, when we route 1-1, we generate routing key of form $hash. When we enable consistent routing we generate urls of the form $hash-$n (where $n is random num from [1-N)). Notice it's not 0, because if we randomly choose 0 then we just have $hash. This is not to rehash objects that are transitioning from being routed to one host to many hosts.

Might be worth to fix the errors anyway.

Reviewed By: clara-9

Differential Revision: D47209095

fbshipit-source-id: 0af315e532ffca5f6b5df08e1d89e4e214661c71
2023-07-04 04:14:21 -07:00
Jun Wu
37cb2b0fe8 commandserver: include group count in uds prefix
Summary:
This makes long running processes (ex. terminal started by vscode, or et) and
new processes co-exist with different servers, without invalidating each other.

I found that chg always immediately gets invalidated on my devserver. It seems
vscode might be running hg using different groups from my terminal groups. They
invalidate each other and defeat the purpose of command server.

Fix it by making the groups part of the uds prefix so different groups connect
to different servers.

Reviewed By: zzl0

Differential Revision: D47143213

fbshipit-source-id: ab4f53afbc935c82e3a596586a8bf91a76c95873
2023-07-03 22:36:01 -07:00
Jun Wu
f1d8abe62d commandserver: extract group count from groups()
Summary: The group count will be used by the next change.

Reviewed By: zzl0

Differential Revision: D47143214

fbshipit-source-id: c791e5d4f79304a95ff568d9bd3441c2d4cb00f6
2023-07-03 22:36:01 -07:00
Jun Wu
7e27390f0e hgcommands: forward ui.system to commandserver client
Summary: This has better compatibility with some editors, esp. on terminal resize.

Reviewed By: sggutier

Differential Revision: D47141802

fbshipit-source-id: e06e0e145c239a223c176681d3113171b49837b0
2023-07-03 22:36:01 -07:00
Jun Wu
3da8867200 commandserver: provide Weak<NodeIpc> from Server
Summary:
This makes it easier for the client to implement a Python binding communicating
through the IPC. Lifetimes don't work well in Python bindings.

Reviewed By: sggutier

Differential Revision: D47141800

fbshipit-source-id: 839b9b8b4de09c1a22c0bad9f43c45a4a0f0e88f
2023-07-03 22:36:01 -07:00
Jun Wu
4fc890d4ba nodeipc: impl HasIpc and Call on NodeIpc
Summary: This makes it easier to use as the "one direction" IPC in upcoming changes.

Reviewed By: sggutier

Differential Revision: D47141805

fbshipit-source-id: a86a898cc0715925f047210f67f7c3c7dad7da61
2023-07-03 22:36:01 -07:00
Jun Wu
51f85b326d commandserver: expose server in run_func
Summary:
This allows the callsite to refer to the server IPC, for customizing
`ui.system` behavior.

Reviewed By: sggutier

Differential Revision: D47141801

fbshipit-source-id: f89e28f8084faa146f4c03d1cf81daa59f11f55d
2023-07-03 22:36:01 -07:00
Jun Wu
64fae5b644 commandserver: forward POSIX signals
Summary: Forward signals, similar to what we do in chg.

Reviewed By: zzl0

Differential Revision: D47141799

fbshipit-source-id: 3a91c52487ef10058fe7170f465aa87457b2b432
2023-07-03 22:36:01 -07:00
Jun Wu
c9f23a5eed commandserver: fix shell command
Summary: When running a command via shell, we need to provide the command.

Reviewed By: zzl0

Differential Revision: D47141804

fbshipit-source-id: 96a75bf28911411f6180305ab5e7ba7c149f8350
2023-07-03 22:36:01 -07:00
Jun Wu
3961fb041e commandserver: use constant directory name under AppData\Local
Summary:
It seems the "local" directory AppData\Local (or ~/.local/share) want a
constant top-level application name. Previously we use a dynamic name
`hg-cmdserver` or `sl-cmdserver`. Switch to a constant name to better
fit other programs.

Reviewed By: zzl0

Differential Revision: D47141803

fbshipit-source-id: f82d79bd1581a655ce5291b2545e6dd60c538dcf
2023-07-03 22:36:01 -07:00
Jun Wu
7ae8a24e49 nodeipc: make stdio constants include richer information
Summary:
Now there are a few other concepts, like `CONIN$`, etc. Let's make
`stdio_constants` include them so they are not defined elsewhere.

Reviewed By: zzl0

Differential Revision: D47141806

fbshipit-source-id: c9ff8ea585d94a2ef6dbea72e3a23a06d0553c1b
2023-07-03 22:36:01 -07:00
Jun Wu
8379c7c099 commandserver: change uds path from sl-cmdserver-$version/server-$pid to sl-cmdserver/$version-$pid
Summary:
Previously we create multiple directories, one per version in the "runtime" dir:

  sl-cmdserver-v1
  sl-cmdserver-v2
  sl-cmdserver-v3
  ...

and there are no auto cleanup of the directories. This diff changes them to:

  sl-cmdserver/v1
  sl-cmdserver/v2
  sl-cmdserver/v3
  ...

so there are only O(1) directories and we can auto clean up the contents.

Reviewed By: zzl0

Differential Revision: D47134271

fbshipit-source-id: 147bf90b0aa70dbdc5b397aba55a24805f1c6c13
2023-07-03 22:36:01 -07:00
Jun Wu
ff9a3d1f14 hgcommands: integrate with commandserver client
Summary:
With `commandserver.enabled` turned on, the Python command fallback can
now connect to a command server to complete the command.

Note this is different from chg in a few ways:
- chg runs early, this runs late.
  - This currently does not run for native commands. Although eventually it
    might make sense to "warm up" native servers to speed up things too.
  - This sets up a bunch of things like HTTP, progress, blackbox, runlog,
    metrics, tracing, etc. twice. Some of them would ideally be skipped.
- This can fail if the server is not ready. Then it will fallback to the
  original path.
  - chg does not fallback.

Reviewed By: zzl0

Differential Revision: D47074706

fbshipit-source-id: bc7041f89ed1963e229eddfb9614eac67ec9859a
2023-07-03 22:36:01 -07:00
Jun Wu
ad3baf259b hgcommands: integrate with commandserver server
Summary:
Make `start-commandserver` actually starts a server, similar to chgserver.
Unlike chgserver, this server is implemented in Rust and only serves one
client (for now).

Reviewed By: zzl0

Differential Revision: D47071254

fbshipit-source-id: 259ef08f2f72f4c22311e0b3bc9dbbee43fd5298
2023-07-03 22:36:01 -07:00
Jun Wu
1c28a3c13f nodeipc: re-create console handles on receiving
Summary:
If the receiving process has stdio redirected to `NUL`, then they need
re-creating the console handlers to write to the console.

Reviewed By: zzl0

Differential Revision: D47110326

fbshipit-source-id: 28b51e76169539300e66f174572535c01ec1a163
2023-07-03 22:36:01 -07:00
Jun Wu
3a57fabab7 udsipc: remove exclusive path automatically
Summary: When a path is made exclusive, remove it automatically after connection.

Reviewed By: zzl0

Differential Revision: D47117101

fbshipit-source-id: b600ca4b23a7e4d16a946049e5b58f431c63b109
2023-07-03 22:36:01 -07:00
Jun Wu
cf7405aead debugstack: support parents: ["."] to refer to the "working parent"
Summary:
In ISL, the "." commit is nullable... To make it "sound" let's add support for
using "." as the parent.

Reviewed By: muirdm

Differential Revision: D46504676

fbshipit-source-id: 2fd7f5993b1bb98ebf7dd5d46aaf386488c5a69a
2023-07-03 16:39:36 -07:00
Jun Wu
7dcb31dabe debugstack: support updating files in working copy
Summary:
Make it possible to use debugimportstack to update file contents in the working
copy. This can be interesting for the "discard" (revert -i) operation from ISL.

Reviewed By: muirdm

Differential Revision: D46503341

fbshipit-source-id: 4b3b4180aafc2da33cc44dd49b00b4847ec63970
2023-07-03 16:39:36 -07:00
Jun Wu
d9136bc471 debugstack: support referring to working copy flags and renames
Summary:
Similar to D45739627, support using the existing working copy "copyFrom" and
"flags" information. This makes it easier to integrate with the chunk editor.

Reviewed By: zzl0

Differential Revision: D46503346

fbshipit-source-id: 18d68ec82d8b72a28956741b6f611229c082d269
2023-07-03 16:39:36 -07:00
Jun Wu
7fbb0449e9 test-debugstack: test that user and date can be empty
Summary:
When the user or the date is empty, `debugimportstack` would use the configured
user. This already works because `memctx` handles `user=None`. Update the test
to verify that.

Reviewed By: zzl0

Differential Revision: D46503342

fbshipit-source-id: 2fc0d795eff137ffad9496457e9855827c86726b
2023-07-03 16:39:36 -07:00
Zhaolong Zhu
fee6d94bed eden_dirstate: remove unused import module
Summary: as title

Reviewed By: quark-zju

Differential Revision: D47195398

fbshipit-source-id: e3c0153818a627cc14b45f1d08d50caebc362deb
2023-07-03 13:49:20 -07:00
Zhaolong Zhu
2bac1957bd eden_update: raise error when there is conflict error
Summary: When Mononoke is throttling, eden can generate conflict errors, which causes wrong data problem. Adding logic to abort on those conflict types.

Reviewed By: quark-zju

Differential Revision: D47099273

fbshipit-source-id: e649a985e474c16b90b391814ecab373cb578515
2023-07-03 13:49:20 -07:00
Alex Coleman
e78cb4f2ce Allow config for custom ISL commit message template (#633)
Summary:
Allow config for custom ISL commit message template

Regarding https://github.com/facebook/sapling/issues/632, allows a sapling config to be set which gives a default template for ISL title/description.

Currently namespaced under `committemplate.isl` (with other committemplate configs), but could flip this to `isl.committemplate` (with other isl configs).

Also could see this being set by a version controlled file in the repo to standardize by repo instead of sapling config (ex. `<root>/.sapling-isl-committemplate`), open to thoughts on that

This is necessary because debugcommitmessage isn't a public command, so this could potentially be fixed by adding that to sapling CLI instead.

Pull Request resolved: https://github.com/facebook/sapling/pull/633

Test Plan: Templated this commit using it, after running `sl config -l committemplate.isl "<title># Summary\n\n# Test Plan\n\n"`

Reviewed By: sggutier

Differential Revision: D47035997

Pulled By: quark-zju

fbshipit-source-id: f84c6bd934c875e3453feb54e2bc83e4618464bc
2023-07-01 08:17:16 -07:00
Jason Fried
00ffd2b688 fix ssl usage for 3.10
Summary:
```
   $ hgmn push -q --to main --create
   +  /data/users/fried/fbsource/buck-out/v2/gen/fbcode/67e0758f7bdffa6c/eden/scm/__hg__/resources/eden/scm/hg_unpacked_link_tree/edenscm/sslutil.py:388: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
   +    sslcontext = SSLContext(settings["protocol"])
   +  /data/users/fried/fbsource/buck-out/v2/gen/fbcode/67e0758f7bdffa6c/eden/scm/__hg__/resources/eden/scm/hg_unpacked_link_tree/edenscm/sslutil.py:391: DeprecationWarning: ssl.OP_NO_SSL*/ssl.OP_NO_TLS* options are deprecated
   +    sslcontext.options |= settings["ctxoptions"]
```
Seems the way we do ssl has been depricated since 3.6.  Someone should probably clean up
this code but this will unbreak us as far as test fixtures and behavior

Reviewed By: quark-zju

Differential Revision: D47076162

fbshipit-source-id: 332cad24335d68b588dacc9e7a8b7b4b973a7d6f
2023-06-30 12:52:53 -07:00
Liubov Dmitrieva
1b2ed4e1fe add consistent routing support for single file for another fetch file
Summary:
add consistent routing support for single file for another fetch file
api

Reviewed By: clara-9

Differential Revision: D47153813

fbshipit-source-id: 2a193c206806d2d8c74a99fd1335b8c7e28b2b7f
2023-06-30 09:12:05 -07:00
Jan Mazur
c3cf284765 add hostname of the server that generated URI to URIs returned in response to batch endpoint
Summary:
This shows how basic interaction with LFS server works (it's git-lfs protocol pretty much): https://www.internalfb.com/intern/wiki/Source_Control/Mononoke/Production/LFS_Server/#sending-requests-to-lfs

Pretty much client asks: "Hey, where can I get objects (a,b,c,d)?"
Server responds with urls where objects can be fetched from.
Those urls are for LFS server again.
When client eventually fetches the objects, we would like to know which server (particularly which region) generated the URLs for it.
In order to do that I'm adding hostname of the server that respond to /batch endpoint in http query param. We'll be able to log it to scuba in /download and /upload endpoints.

Differential Revision: D46964214

fbshipit-source-id: aa6b3594391a66b9bd931fb393cf5d672fbac4d8
2023-06-30 06:03:09 -07:00
Jan Mazur
165cc08b36 arc rust-clippy after rustc and clippy update
Summary: clippy_systems

Differential Revision: D47150748

fbshipit-source-id: 8ff854ea18c9c75b952f0aa15a76f7b0d83a091e
2023-06-30 05:26:44 -07:00
generatedunixname89002005287564
e34fb142c8 Reviewed By: sggutier
Differential Revision: D47119973

fbshipit-source-id: bcbf5a95392738b399ddc3750b6b0a64e8ff7228
2023-06-29 08:48:14 -07:00
David Tolnay
bd9d056d5a Patch dachshund to work with Rust 1.71
Reviewed By: diliop

Differential Revision: D47115314

fbshipit-source-id: 3d238196e14b32b7c922d7aee18514191a2f8655
2023-06-29 03:50:11 -07:00
Jun Wu
5ba17d20b7 hgcommands: split the IO part of setup_tracing out
Summary:
`setup_tracing` contains 2 parts:
- Setup the Python tracing data integration.
- Make tracing messages write to IO.

The second part can be useful standalone.

Reviewed By: sggutier

Differential Revision: D47105286

fbshipit-source-id: 90e4fb95c305247f8aff6bfd0711350e2965c339
2023-06-28 22:22:02 -07:00
Jun Wu
8f6d38eb58 commandserver: add top-level client and server entry points
Summary:
Those are top-level entry points for the client and server to connect to each
other and do the actual work.

Reviewed By: sggutier

Differential Revision: D47068007

fbshipit-source-id: 9a88d4c190599b40afc8063b3cc8611141b79b0a
2023-06-28 22:22:02 -07:00
Jun Wu
0b6d762be1 commandserver: add utilities about spawning servers
Summary:
Make it possible to spawn one or more servers, and avoid race conditions
spawning too many servers.

Reviewed By: sggutier

Differential Revision: D47068006

fbshipit-source-id: 71d9daf8d47f04b0e22dd9e2adf18aa059d1a2ed
2023-06-28 22:22:02 -07:00
Jun Wu
59324a5ffc commandserver: define main IPC APIs
Summary: Similar to chg/chgserver, define main APIs used by the client and the server.

Reviewed By: zzl0

Differential Revision: D47068010

fbshipit-source-id: f6627e003a18e30d0d95f2d8a97a7d82fd2ab0ec
2023-06-28 22:22:02 -07:00
Jun Wu
c199ddd02d commandserver: add utils
Summary: Those are somewhat low-level features that is going to be used by upcoming changes.

Reviewed By: zzl0

Differential Revision: D47068009

fbshipit-source-id: 757730764a8b97e78f62ae685db1178271e329e0
2023-06-28 22:22:02 -07:00
Jun Wu
4540ea9ea7 commandserver: initial crate
Summary: Initial crate for the commandserver.

Reviewed By: sggutier

Differential Revision: D47068008

fbshipit-source-id: 3a6a88bc7f18139b7725b979e18e6a488017f93f
2023-06-28 22:22:02 -07:00
Jun Wu
f6ca634a0f grpcheck: do nothing on Windows
Summary:
`import grp` will fail on Windows. Teach the extension to do nothing if the
system is Windows.

Reviewed By: zzl0

Differential Revision: D47105287

fbshipit-source-id: 3cfd771e424bf5db6d49c1234c8df8fbae6dec62
2023-06-28 22:22:02 -07:00
Jun Wu
13895976de dispatch: do not preimport scmposix
Summary:
`scmposix` cannot import on Windows.
It will be imported by `scmutil` so there is no need to import it separately.

Reviewed By: sggutier

Differential Revision: D47105288

fbshipit-source-id: 7aedea649a87feb1228963bed4844f3d0f9eca0e
2023-06-28 22:22:02 -07:00
Jun Wu
11fec26a58 udsipc: fix with_extension usage
Summary: `with_extension` adds `.` itself. There is no need to use a `.`

Reviewed By: sggutier

Differential Revision: D47082262

fbshipit-source-id: b215a4db11e24b6503fdccba9abb7cb301c4ee3d
2023-06-28 22:22:02 -07:00
Jun Wu
0e3656920c udsipc: treat ".lock" files as not uds files
Summary: The ".lock" file will be used to prevent spawning too many servers.

Reviewed By: zzl0

Differential Revision: D47068005

fbshipit-source-id: 6d07c7a5b8c8133dd69d6779b0e607a91be05743
2023-06-28 22:22:02 -07:00
Jun Wu
e5f4f39e92 udsipc: is_alive -> get_is_alive_func
Summary:
This makes it possible for the "is_alive" check to not require "&self" so it
does not conflict with "self.next()".

Reviewed By: zzl0

Differential Revision: D47065152

fbshipit-source-id: a5923439f153f8ea72b33831a30c06c848737f4f
2023-06-28 22:22:02 -07:00
Jun Wu
dd9ba613bc nodeipc: add proc macro attribute for defining IPC
Summary: Add `#[ipc] ...` as an alternative to `define_ipc! { ... }`.

Reviewed By: zzl0

Differential Revision: D47065154

fbshipit-source-id: 3db98b7d2670bb183172b81743be1f416f6e1a70
2023-06-28 22:22:02 -07:00
Jun Wu
cb4555a8ab nodeipc: add macros to generate IPC methods
Summary:
While NodeIpc provides structured message passing, it'd be nicer to generate
IPC methods based on function signature, without manually defining the message
types. This diff implements it.

The bi-directional IPC design is to meet the chg/chgserver-like needs:
- Client sends the main command to run to the server.
- Server sends "ui.system" request back to client to execute during executing
  the command got from the client.

Reviewed By: zzl0

Differential Revision: D47065153

fbshipit-source-id: 6279118e50d8aeba55d3fb8969f6ac85f0de6a8d
2023-06-28 22:22:02 -07:00
Muir Manders
aeb6ccb125 config: support outputting all sources
Summary: Now if you specify --debug and --verbose, it outputs all sources for each config item. This is useful, sometimes. Previously it was only available via the debug shell.

Reviewed By: zzl0

Differential Revision: D47012144

fbshipit-source-id: c42d8c38b6ff2547d938106e493fa907598e6212
2023-06-28 18:39:53 -07:00
Muir Manders
f3a51f0cb0 config: show unset config items with --debug
Summary: Previously there was no way to use the "config" command to see a config entry was %unset. Now, the --debug flag will give positive indication a config is <%unset> (and tell you where it was unset).

Reviewed By: zzl0

Differential Revision: D47012143

fbshipit-source-id: 611eba126fbdd13593aa64dff23ff7e53eca726b
2023-06-28 18:39:53 -07:00
Jason Fried
78efa42b36 fix up threading.currentThread for 3.10
Summary: currentThread was deprecated and long time ago in favor of current_thread.  3.10 complains loudly about this

Reviewed By: quark-zju

Differential Revision: D47079216

fbshipit-source-id: d69cf101ec13b2c0bd90319dbcd44cd3da01a733
2023-06-28 13:01:50 -07:00
Jan Mazur
5a3e0ed567 log revproxy_region
Summary: This logs which region the revproxy was in. Will be useful especially for clients that come from region X, to region Y (revproxy_region), and eventually land in Z.

Reviewed By: HarveyHunt

Differential Revision: D47023586

fbshipit-source-id: 06568ff7505891eadd003149d4b995e03375466f
2023-06-28 05:41:37 -07:00
Rajiv Sharma
59332db1d2 Avoid printing new config during dynamic reload
Summary: Whenever `RepoConfig` gets updated, the change gets picked up by Mononoke services and jobs and the updated config is applied immediately. Before applying the change, we print the entire raw config in our logs which can take up way too much space and add unnecessary noise which hinders debugging efforts. P773015734 is an example of such noisy logs. This diff removes that unnecessary logging.

Differential Revision: D47053210

fbshipit-source-id: 969aabe2403029078100421f1b78b05dff94fb30
2023-06-28 05:37:29 -07:00
Jim Meyering
7c4534b9b3 eden/scm/hgcache_size_logger/packman.yml: switch targets from buck1 to buck2
Summary:
All targets in this .yml file were still building with deprecated buck1, yet they build just fine with buck2.
I induced thic change by running the following:
```
perl -pi -e 's{\bbuck:}{buck2:}g' eden/scm/hgcache_size_logger/packman.yml
```
# FYI: build-time/size changes:
- build size delta: **-6.33%** of 51M (combined size (bytes) of all RPMs)
- **Nice speedup:** build time delta: **-53.00%** of 200 seconds (wallclock)

Reviewed By: StanislavGlebik

Differential Revision: D47084675

fbshipit-source-id: d8e21afeb3a2372803d529299b84e187d4f22d14
2023-06-28 00:15:04 -07:00
Alexey Spiridonov
95ae23ef3d Fix use-after-move issue in RocketClientChannel
Summary:
In D46850228, I made the 🤡 mistake of inlining the construction of `payload` to the point where `metadata.name_ref` might already be in a moved-out (empty) state.

This returns the data flow to the original state.

Thanks to `eden.integration.debug_subscribe_test.DebugSubscribeTestHg` and Windows reordering compilation for catching the error early. The drive-by `stderr` change is intended to make more logs available for future debugging in this test.

Reviewed By: xavierd

Differential Revision: D47073456

fbshipit-source-id: 7567e5baf1d3688108594ae650ccd679ae2e3844
2023-06-27 20:10:08 -07:00