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
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
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
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
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
Summary: We are migrating away from `folly::to`.
Reviewed By: xavierd
Differential Revision: D45935360
fbshipit-source-id: c33f0ecb0e7b2482dd7d49a8a00f3309c17caded
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
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
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
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
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
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
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
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
Summary: Mark landed diffs based on diff status
Reviewed By: quark-zju
Differential Revision: D47252120
fbshipit-source-id: ab1ccde74a091923de6764d8bcc0a4fd49164898
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
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
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
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
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
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
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
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
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
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
Summary: found this while looking at Overlay things
Reviewed By: mshroyer
Differential Revision: D47306420
fbshipit-source-id: e96ec2e4c073bd16e6b25e50a9c869a49209aaa6
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Summary: The group count will be used by the next change.
Reviewed By: zzl0
Differential Revision: D47143214
fbshipit-source-id: c791e5d4f79304a95ff568d9bd3441c2d4cb00f6
Summary: This has better compatibility with some editors, esp. on terminal resize.
Reviewed By: sggutier
Differential Revision: D47141802
fbshipit-source-id: e06e0e145c239a223c176681d3113171b49837b0
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
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
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
Summary: Forward signals, similar to what we do in chg.
Reviewed By: zzl0
Differential Revision: D47141799
fbshipit-source-id: 3a91c52487ef10058fe7170f465aa87457b2b432
Summary: When running a command via shell, we need to provide the command.
Reviewed By: zzl0
Differential Revision: D47141804
fbshipit-source-id: 96a75bf28911411f6180305ab5e7ba7c149f8350
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
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
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
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
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
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
Summary: When a path is made exclusive, remove it automatically after connection.
Reviewed By: zzl0
Differential Revision: D47117101
fbshipit-source-id: b600ca4b23a7e4d16a946049e5b58f431c63b109
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
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
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
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
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
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
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
Summary:
add consistent routing support for single file for another fetch file
api
Reviewed By: clara-9
Differential Revision: D47153813
fbshipit-source-id: 2a193c206806d2d8c74a99fd1335b8c7e28b2b7f
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
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
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
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
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
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
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
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
Summary: `with_extension` adds `.` itself. There is no need to use a `.`
Reviewed By: sggutier
Differential Revision: D47082262
fbshipit-source-id: b215a4db11e24b6503fdccba9abb7cb301c4ee3d
Summary: The ".lock" file will be used to prevent spawning too many servers.
Reviewed By: zzl0
Differential Revision: D47068005
fbshipit-source-id: 6d07c7a5b8c8133dd69d6779b0e607a91be05743
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
Summary: Add `#[ipc] ...` as an alternative to `define_ipc! { ... }`.
Reviewed By: zzl0
Differential Revision: D47065154
fbshipit-source-id: 3db98b7d2670bb183172b81743be1f416f6e1a70
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
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
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
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
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
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
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
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