Commit Graph

79929 Commits

Author SHA1 Message Date
Liubov Dmitrieva
3924172259 remove unused code
Summary: remove unused code

Differential Revision: D42497990

fbshipit-source-id: 84b0507dad2513630e4dafc2f32012782e1c84d4
2023-01-20 08:02:58 -08:00
Liubov Dmitrieva
6e6c17e7ce fix test broken due to unstable ordering
Summary: fix test broken due to unstable ordering

Reviewed By: yancouto

Differential Revision: D42634862

fbshipit-source-id: b47a97f6ffc35018f6d64f137aba4ea8c48a72c2
2023-01-20 05:03:22 -08:00
Rajiv Sharma
229a42e1a5 Use ShardingModeConfig to determine deep-sharded status
Summary:
In D38786500, I introduced `deep-sharded` flag that controls whether a repo needs to execute in deep-sharded mode or shallow-sharded mode. However, the flag was universal (i.e. it was applicable to all services). Since we currently have a situation where certain services need to execute repos in deep sharded (e.g. `SCS`) while others need to execute in shallow-sharded mode (e.g. `Eden API`). This diff introduces `ShardingModeConfig` which determines if a repo is deep sharded for a particular service.

For now, the `deep_sharded` flag is kept as is. Once the config + code changes to use this new property are landed, I will delete the old `deep_sharded` flag.

Corresponding configerator diff: D4250164

Reviewed By: mitrandir77

Differential Revision: D42531443

fbshipit-source-id: 697496cc8351f0d9e686312fd8fff8d4e2fa010b
2023-01-20 01:08:27 -08:00
Rajiv Sharma
db4b735b06 Add Deep Sharding Config to support service level sharding mode
Summary:
In D38786500, I introduced `deep-sharded` flag that controls whether a repo needs to execute in deep-sharded mode or shallow-sharded mode. However, the flag was universal (i.e. it was applicable to all services). Since we currently have a situation where certain services need to execute repos in deep sharded (e.g. `SCS`) while others need to execute in shallow-sharded mode (e.g. `Eden API`). This diff introduces `ShardingModeConfig` which determines if a repo is deep sharded for a particular service.

For now, the `deep_sharded` flag is kept as is. Once the config + code changes to use this new property are landed, I will delete the old `deep_sharded` flag.

Corresponding configerator diff: D42501648

Differential Revision: D42530372

fbshipit-source-id: 1bd46533ad18939da4465239dab1340a0e8219d2
2023-01-20 01:08:27 -08:00
Jun Wu
9f33493110 treestate: use real threads for check_concurrent_writes
Summary: This makes the test a bit stronger.

Reviewed By: zzl0

Differential Revision: D42493269

fbshipit-source-id: d51ef1f6c0e9c5d7d72dd2e27c1800f0e62c16e9
2023-01-19 21:38:51 -08:00
Jun Wu
29a5c93a00 dirstate: remove treedirstate support
Summary: We only use treestate now.

Reviewed By: zzl0

Differential Revision: D42493091

fbshipit-source-id: 42a7d8d45f7e21810112a454596c730ed3b6c32f
2023-01-19 21:38:51 -08:00
Jun Wu
67e2145dd2 treestate: use internal locking to support concurrent writes
Summary:
Use locking internally to avoid racy concurrent writes that could cause
unrecoverable data corruption.

Previously:

  Timeline:  -------------------------->
  Process 1: open(), append, append, ...
  Process 2: open(), append, append, ...

Now:

  Process 1: open(), lock { append, append }, ...
  Process 2: open(),                          lock { append, append } ...

`append()` to the same file is exclusive to one instance.

Note we need to update `position` after obtaining the lock to pick changes from
other instances.

Reviewed By: zzl0

Differential Revision: D42492667

fbshipit-source-id: 6a6184c945d23e16eb1619458abdb18afc64868c
2023-01-19 21:38:51 -08:00
Jun Wu
5b5354b6e6 treestate: add Store.locked API
Summary: It'll be used by the next change.

Reviewed By: zzl0

Differential Revision: D42492670

fbshipit-source-id: 676320fc4fd14411a6feca450b53a0b67e82f6ec
2023-01-19 21:38:51 -08:00
Jun Wu
73c8fa0fef treestate: wrap FileStore.file with Arc<Mutex>
Summary:
It'll be used by the next change. Note `Rc<RefCell>` or `Arc<RefCell>` won't
compile for the rest of the project.

Reviewed By: zzl0

Differential Revision: D42492672

fbshipit-source-id: 28b167b1d1e61a715f86911ea1d314fc2420eafd
2023-01-19 21:38:51 -08:00
Jun Wu
8633a5ed41 treestate: add locking methods to trait FileReadWrite
Summary:
trait FileReadWrite is used for both on-disk and in-memory files. Add locking
so the next change can use it to avoid races on the physical filesystem.

Reviewed By: zzl0

Differential Revision: D42492668

fbshipit-source-id: 06c02ea4fb52213c3a64fc17a336a5edba385dc4
2023-01-19 21:38:51 -08:00
Manikandan Somasundaram
b0fb46ebfd Enable building specific cmake targets (#3759)
Summary: Pull Request resolved: https://github.com/facebookincubator/velox/pull/3759

Reviewed By: chadaustin

Differential Revision: D42551680

fbshipit-source-id: 4e5c5bef2ad2997e04ab8fb8db4ef7fbeda0bcab
2023-01-19 18:03:58 -08:00
Zhaolong Zhu
bcafa0fb5c shelve: ignore the extended attribute files created by MacOS
Summary:
Fix below error when doing `hg shelve --clean`

```
Traceback (most recent call last):
  File "/xxx/hg/bin/edenscm/ext/shelve.py", line 1222, in shelvecmd
    return cleanupcmd(ui, repo)
  File "/xxx/hg/bin/edenscm/ext/shelve.py", line 568, in cleanupcmd
    shelvedfile(repo, name).movetobackup()
    # name = '._default.oshelve'
  File "/xxx/hg/bin/edenscm/ext/shelve.py", line 117, in movetobackup
    util.rename(self.filename(), self.backupfilename())
FileNotFoundError: [Errno 2] No such file or directory: '/Users/xxx/fbsource/.hg/shelved/._default.oshelve' -> '/Users/xxx/fbsource/.hg/shelve-backup/._default-3.oshelve'
```

Reviewed By: quark-zju

Differential Revision: D42594463

fbshipit-source-id: 97d418066397cc0fb2babfadd0f99c6c745828bc
2023-01-19 14:44:24 -08:00
Zhaolong Zhu
ed1a55cf28 rebase: fix a bug of rebasing hidden commits
Summary: Currently, 'hg rebase' is rebasing hidden commits and making them visible to users, this is a regression caused by D42087621 (96b767efde).

Reviewed By: quark-zju

Differential Revision: D42608733

fbshipit-source-id: de4b7b231d42a45844174e4a417d3c07a6869b97
2023-01-19 14:25:02 -08:00
Evan Krause
5f7ce86712 Log version + platform name on startup
Summary:
Now that we have a notion of version, we should log it during startup. This makes our logs easier to read through.

I think including the platform name would also be worth doing.

A little bit unfortunately, we have the platform name in the client platform, but we really want to log it on the server. So here I also just duplicate the platform name into the server platform definition.

We only have 3 implementations right now:
- browser
- vscode
- android studio

Reviewed By: bolinfest

Differential Revision: D42589867

fbshipit-source-id: be2f3783b4d471fa9d503a9ff3d4464f7e5954ab
2023-01-19 13:16:50 -08:00
Evan Krause
f7bcbdfa6a Pass version string to onClientConnection
Summary:
We need in our analytics&bug reporting to know the version number of a given instance of ISL.

The idea here is that we'll have a version number set on startup, which we'll keep constant. This was not a given before this stack!

(There may be situations where reloading an `sl web` page could load newer client javascript from disk than the server side was started with—we'll need to address this in the future for the assumption of a constant version number to really fit)

Version numbers depend on the platform/embedding we're working with:
- `sl web` is basically just the `sl` version, since it's built and deployed alongside `sl`
- for the VS Code extension, we want to use the vscode extension version (from the package.json), because it's updated separately from sl itself.
- Both of these may differ for internal versions vs external versions. Though analytics only happen on internal builds, so it shouldn't matter much (should be clear from context if internal/OSS).

Note that these version numbers may be different from the version number of `sl` that we shell out to, even for `sl web`. Imagine spawning `sl web`, then some time passes, and the `sl` binary is updated on disk. Running `sl version` would give a different version than what ISL calls its version. But that's OK, since the API layer between ISL and `sl` is just command running, and we will need to be weary of backwards compatibility there at all times—we don't assume these versions match.

To start with, we won't log the actual `sl` version for commands we spawn in our analytics. We'll correlate ISL analytics with our other `sl` analytics instead, which should give that info.

Reviewed By: bolinfest

Differential Revision: D42589825

fbshipit-source-id: e51c9eac84a9825720885654854a2d773aa03a19
2023-01-19 13:16:50 -08:00
Evan Krause
5c161c93d6 isl: Add --slversion argument
Summary: Add arguments to isl.py so that each ISL server is spawned with --slversion as expected

Reviewed By: bolinfest

Differential Revision: D42563631

fbshipit-source-id: 9a493c4ddf3f7529f032bc130cbd164fb9d4a668
2023-01-19 13:16:50 -08:00
Mark Juggurnauth-Thomas
5c361938ca add abomonation as a patch dependency
Summary: The patched abomonation is required to build because of the transitive dependency on the new smallvec feature.  We are separately working on removing this dependency, but for now we need to include the patch.

Reviewed By: bolinfest

Differential Revision: D42612033

fbshipit-source-id: 7991db74946cce8640795104623841f23abf82c6
2023-01-19 12:59:37 -08:00
Xavier Deguillard
aaecd3369f inodes: always lay placeholders on directories
Summary:
EdenFS assumes in several places that even materialized directories will
receive readdir requests. This assumption is slightly wrong on Windows in the
case where a directory hierarchy is completely removed, and then reconstructed
at the identical, with say a filesystem revert operation. In that case, EdenFS
will not participate in any readdir requests in this directory hierarchy as no
directories are placeholder.

During checkout, this assumption is used to dematerialize directories in
saveOverlayPostCheckout, in some cases however, this can lead to dematerialized
directories being contained in a non-placeholder directory on Windows.  This
case in particular is fraught with issues. For instance,
invalidateChildrenNotMaterialized may invalidate these dematerialized
directories but doing so would make these disappear entirely due to EdenFS not
participating in non-placeholder directories! I believe a similar issue may
also be possible with future checkout operations, although the exact steps
elude me.

To solve the above, one easy way is to simply force directories traversed by
checkout to always have a placeholder added to them. This is achieved by
invalidating the directory. Since it's unclear if we could also always
invalidate the directory on Linux and macOS, let's add a config so we can roll
this out slowly.

Reviewed By: kmancini

Differential Revision: D42483525

fbshipit-source-id: 9d8c9fe3db8914ca2a46a77f10cf77f2ff871ad9
2023-01-19 12:21:06 -08:00
Open Source Bot
7793085106 Updating submodules
Summary:
GitHub commits:

ab1112009f
d99a2227e8
78f3f7a39b
1758969ef6
3f9033e249
e1fe3ce469

Reviewed By: jurajh-fb

fbshipit-source-id: fa2268e9c9d8a33641d752551a45f9bc2f4b022e
2023-01-19 12:17:55 -08:00
Max Coplan
5bb56fc6a2 (build): Support sapling in tag-name.sh (#439)
Summary:
(build): Support sapling in tag-name.sh

 Currently, tag-name.sh only works with git.  This is fine, because
it's only used in GitHub CI, but I also want to use this script for local
builds (which will be in a future commit).  This commit will use either sl or
git for creating tag names.

Test-Plan: Automated testing blocked on https://github.com/facebook/sapling/issues/447

```sh
❯ ./ci/tag-name.sh
0.2.20230107-190233-hc1336fcb
```

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/439).
* https://github.com/facebook/sapling/issues/440
* __->__ https://github.com/facebook/sapling/issues/439

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

Reviewed By: quark-zju

Differential Revision: D42611397

Pulled By: bolinfest

fbshipit-source-id: d182ae3027ca72933aa2f4118e12d3e04453dec1
2023-01-19 11:55:00 -08:00
Liubov Dmitrieva
d0a9bf5e93 enable test test-edenapi-mutation.t for commitgraph v2
Summary: enable test test-edenapi-mutation.t for commitgraph v2

Reviewed By: quark-zju

Differential Revision: D42545168

fbshipit-source-id: 7bab20a6f8d9ae3beb6c8a02b5ce6a42c395b5b3
2023-01-19 11:48:48 -08:00
Zhaolong Zhu
4a8e6b8fa6 util: delete unused puredirs
Summary: When reading copytrace related code, I found we deprecated puredirs in favor of Rust 'dirs' in D19634699 (8e673a1de0).

Reviewed By: markbt

Differential Revision: D42539556

fbshipit-source-id: 59ae23e5d92626cac11cc9ea4c41d196940796b0
2023-01-19 11:12:24 -08:00
Zhaolong Zhu
2ab1a0931d doctor: skip None remotenames
Summary:
We met an issue that `oldml["remotenames"]` can be None.

```
    with progress.bar(ui, _("reading repo history"), "", len(roots)) as prog:
        for rootid in reversed(roots):
            prog.value += 1
            oldml = ml.checkout(rootid)
            node = bookmod.decoderemotenames(oldml["remotenames"]).get(mainfullname)
            if node and node in repo:
                found = node
                break
```
And it will cause below TypeError.

```
│ `hg doctor` stderr:
│ segments/v1: repaired
│ remote/master points to an unknown commit - trying to move it to a known commit
│ exception TypeError('Expected type that converts to PyBytes but received NoneType') ignored during checkmissingmaster
```

Reviewed By: quark-zju

Differential Revision: D42588709

fbshipit-source-id: 79013cc311cfdb4ab033c20cdd7c508d3341c88d
2023-01-19 11:05:58 -08:00
dependabot[bot]
12768908eb build(deps): bump json5 from 1.0.1 to 1.0.2 in /addons (#380)
Summary:
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/json5/json5/releases">json5's releases</a>.</em></p>
<blockquote>
<h2>v1.0.2</h2>
<ul>
<li>Fix: Properties with the name <code>__proto__</code> are added to objects and arrays. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/199">https://github.com/facebook/sapling/issues/199</a>) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (<a href="https://github-redirect.dependabot.com/json5/json5/issues/295">https://github.com/facebook/sapling/issues/295</a>). This has been backported to v1. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/298">https://github.com/facebook/sapling/issues/298</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/json5/json5/blob/main/CHANGELOG.md">json5's changelog</a>.</em></p>
<blockquote>
<h3>Unreleased [<a href="https://github.com/json5/json5/tree/main">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.3...HEAD">diff</a>]</h3>
<h3>v2.2.3 [<a href="https://github.com/json5/json5/tree/v2.2.3">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.2...v2.2.3">diff</a>]</h3>
<ul>
<li>Fix: json5@2.2.3 is now the 'latest' release according to npm instead of
v1.0.2. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/299">https://github.com/facebook/sapling/issues/299</a>)</li>
</ul>
<h3>v2.2.2 [<a href="https://github.com/json5/json5/tree/v2.2.2">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.1...v2.2.2">diff</a>]</h3>
<ul>
<li>Fix: Properties with the name <code>__proto__</code> are added to objects and arrays.
(<a href="https://github-redirect.dependabot.com/json5/json5/issues/199">https://github.com/facebook/sapling/issues/199</a>) This also fixes a prototype pollution vulnerability reported by
Jonathan Gregson! (<a href="https://github-redirect.dependabot.com/json5/json5/issues/295">https://github.com/facebook/sapling/issues/295</a>).</li>
</ul>
<h3>v2.2.1 [<a href="https://github.com/json5/json5/tree/v2.2.1">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.0...v2.2.1">diff</a>]</h3>
<ul>
<li>Fix: Removed dependence on minimist to patch CVE-2021-44906. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/266">https://github.com/facebook/sapling/issues/266</a>)</li>
</ul>
<h3>v2.2.0 [<a href="https://github.com/json5/json5/tree/v2.2.0">code</a>, <a href="https://github.com/json5/json5/compare/v2.1.3...v2.2.0">diff</a>]</h3>
<ul>
<li>New: Accurate and documented TypeScript declarations are now included. There
is no need to install <code>types/json5</code>. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/236">https://github.com/facebook/sapling/issues/236</a>, <a href="https://github-redirect.dependabot.com/json5/json5/issues/244">https://github.com/facebook/sapling/issues/244</a>)</li>
</ul>
<h3>v2.1.3 [<a href="https://github.com/json5/json5/tree/v2.1.3">code</a>, <a href="https://github.com/json5/json5/compare/v2.1.2...v2.1.3">diff</a>]</h3>
<ul>
<li>Fix: An out of memory bug when parsing numbers has been fixed. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/228">https://github.com/facebook/sapling/issues/228</a>,
<a href="https://github-redirect.dependabot.com/json5/json5/issues/229">https://github.com/facebook/sapling/issues/229</a>)</li>
</ul>
<h3>v2.1.2 [<a href="https://github.com/json5/json5/tree/v2.1.2">code</a>, <a href="https://github.com/json5/json5/compare/v2.1.1...v2.1.2">diff</a>]</h3>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a62db1e51e"><code>a62db1e</code></a> 1.0.2</li>
<li><a href="e0c23fe458"><code>e0c23fe</code></a> docs: update CHANGELOG for v1.0.2</li>
<li><a href="62a6540840"><code>62a6540</code></a> fix: add <strong>proto</strong> to objects and arrays</li>
<li>See full diff in <a href="https://github.com/json5/json5/compare/v1.0.1...v1.0.2">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=json5&package-manager=npm_and_yarn&previous-version=1.0.1&new-version=1.0.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/sapling/network/alerts).

</details>

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

Reviewed By: evangrayk

Differential Revision: D42596278

Pulled By: bolinfest

fbshipit-source-id: cc056b3704dc7f8f71eaf427fa0fc892d1dce9a3
2023-01-19 11:01:47 -08:00
Liubov Dmitrieva
0fbb99d133 use phases information returned from the server to speed up
Summary:
use phases information returned from the server to speed up
retrieval of mutations

if we keep phases calculation client side, it often makes few single "commit_hash_to_location" requests and then a huge batched request with few hundred of hashes

Reviewed By: quark-zju

Differential Revision: D42453084

fbshipit-source-id: bec211c41da61332ba324b6b934540d5a48bc65d
2023-01-19 11:00:32 -08:00
Matthew strager Glazar
d837936837 config: delete unused convert.* settings (#462)
Summary:
config: delete unused convert.* settings
A bunch of configuration settings are defined, but don't seem to be referenced
anywhere. Delete them.

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

Test Plan:
I did not test this change.

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/462).
* __->__ https://github.com/facebook/sapling/issues/462

Reviewed By: genevievehelsel

Differential Revision: D42608651

Pulled By: bolinfest

fbshipit-source-id: c0c17ed11d470d02287c8f0a7c3591e9d31db48a
2023-01-19 10:59:18 -08:00
Matthew strager Glazar
32691f46b7 phases: Delete dead code (#461)
Summary:
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/461).
* __->__ https://github.com/facebook/sapling/issues/461

phases: Delete dead code
We check self._headbased twice, and the second time, we know that
self._headbased is true. Don't check twice; delete the dead code.

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

Test Plan: Untested.

Reviewed By: genevievehelsel

Differential Revision: D42608659

Pulled By: bolinfest

fbshipit-source-id: 2a15be95eac31c4f7e7993cf0fd433c43f64cbb7
2023-01-19 10:52:53 -08:00
dependabot[bot]
b3ec160c11 build(deps): bump json5 from 1.0.1 to 1.0.2 in /website (#381)
Summary:
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/json5/json5/releases">json5's releases</a>.</em></p>
<blockquote>
<h2>v1.0.2</h2>
<ul>
<li>Fix: Properties with the name <code>__proto__</code> are added to objects and arrays. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/199">https://github.com/facebook/sapling/issues/199</a>) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (<a href="https://github-redirect.dependabot.com/json5/json5/issues/295">https://github.com/facebook/sapling/issues/295</a>). This has been backported to v1. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/298">https://github.com/facebook/sapling/issues/298</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/json5/json5/blob/main/CHANGELOG.md">json5's changelog</a>.</em></p>
<blockquote>
<h3>Unreleased [<a href="https://github.com/json5/json5/tree/main">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.3...HEAD">diff</a>]</h3>
<h3>v2.2.3 [<a href="https://github.com/json5/json5/tree/v2.2.3">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.2...v2.2.3">diff</a>]</h3>
<ul>
<li>Fix: json5@2.2.3 is now the 'latest' release according to npm instead of
v1.0.2. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/299">https://github.com/facebook/sapling/issues/299</a>)</li>
</ul>
<h3>v2.2.2 [<a href="https://github.com/json5/json5/tree/v2.2.2">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.1...v2.2.2">diff</a>]</h3>
<ul>
<li>Fix: Properties with the name <code>__proto__</code> are added to objects and arrays.
(<a href="https://github-redirect.dependabot.com/json5/json5/issues/199">https://github.com/facebook/sapling/issues/199</a>) This also fixes a prototype pollution vulnerability reported by
Jonathan Gregson! (<a href="https://github-redirect.dependabot.com/json5/json5/issues/295">https://github.com/facebook/sapling/issues/295</a>).</li>
</ul>
<h3>v2.2.1 [<a href="https://github.com/json5/json5/tree/v2.2.1">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.0...v2.2.1">diff</a>]</h3>
<ul>
<li>Fix: Removed dependence on minimist to patch CVE-2021-44906. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/266">https://github.com/facebook/sapling/issues/266</a>)</li>
</ul>
<h3>v2.2.0 [<a href="https://github.com/json5/json5/tree/v2.2.0">code</a>, <a href="https://github.com/json5/json5/compare/v2.1.3...v2.2.0">diff</a>]</h3>
<ul>
<li>New: Accurate and documented TypeScript declarations are now included. There
is no need to install <code>types/json5</code>. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/236">https://github.com/facebook/sapling/issues/236</a>, <a href="https://github-redirect.dependabot.com/json5/json5/issues/244">https://github.com/facebook/sapling/issues/244</a>)</li>
</ul>
<h3>v2.1.3 [<a href="https://github.com/json5/json5/tree/v2.1.3">code</a>, <a href="https://github.com/json5/json5/compare/v2.1.2...v2.1.3">diff</a>]</h3>
<ul>
<li>Fix: An out of memory bug when parsing numbers has been fixed. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/228">https://github.com/facebook/sapling/issues/228</a>,
<a href="https://github-redirect.dependabot.com/json5/json5/issues/229">https://github.com/facebook/sapling/issues/229</a>)</li>
</ul>
<h3>v2.1.2 [<a href="https://github.com/json5/json5/tree/v2.1.2">code</a>, <a href="https://github.com/json5/json5/compare/v2.1.1...v2.1.2">diff</a>]</h3>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a62db1e51e"><code>a62db1e</code></a> 1.0.2</li>
<li><a href="e0c23fe458"><code>e0c23fe</code></a> docs: update CHANGELOG for v1.0.2</li>
<li><a href="62a6540840"><code>62a6540</code></a> fix: add <strong>proto</strong> to objects and arrays</li>
<li>See full diff in <a href="https://github.com/json5/json5/compare/v1.0.1...v1.0.2">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=json5&package-manager=npm_and_yarn&previous-version=1.0.1&new-version=1.0.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/sapling/network/alerts).

</details>

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

Reviewed By: evangrayk

Differential Revision: D42596265

Pulled By: bolinfest

fbshipit-source-id: 3060a9a9a05954dc7bfe5cacfabebaccf19abff8
2023-01-19 10:21:42 -08:00
kurtz.brandon@gmail.com
c0bcb6561e fix windows install codeblocks (#454)
Summary:
This removes the `ps>` prefix in the windows installation instructions. With `ps>` included, you can't directly copy and past the commands into powershell

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

Reviewed By: evangrayk

Differential Revision: D42594922

Pulled By: bolinfest

fbshipit-source-id: f798d9d74fdccfd088be9efb869857cfee8dead4
2023-01-19 10:11:59 -08:00
Open Source Bot
1a5756ce21 Updating submodules
Summary:
GitHub commits:

f31c77b8ae
e614e2af17
c4f848af36
0237a8ac38

Reviewed By: jurajh-fb

fbshipit-source-id: f80088cd3b731431e00e772ac0e19c5836103e29
2023-01-19 09:10:43 -08:00
Mateusz Kwapich
15a18d5b71 pretty-print hashes in async-requests show
Summary:
Printing raw thrift params has one big drawback - commit hashes are unreadable.
This diff is adding function that prints the requests in a nicer way.

Differential Revision: D42501626

fbshipit-source-id: a20d39ab7bf431b8242fec3fe8001ce6ef532fdd
2023-01-19 06:02:05 -08:00
Mateusz Kwapich
37c67750a5 integration tests for async-request CLI
Summary:
That CLI had 0 test coverage so far. This adds very basic integration
test that will catch some of the regressions.

I've had to modify the query to not filter by query status because I couldn't
get that to work with sqlite backend.

Differential Revision: D42501627

fbshipit-source-id: 90d326045d7e262d6ca1eadd5c33965e0d7fba3c
2023-01-19 06:02:05 -08:00
Open Source Bot
e07ebd3397 Updating submodules
Summary:
GitHub commits:

ab3b22cdbf
f999dd2cee
f1fb89ad9d

Reviewed By: jurajh-fb

fbshipit-source-id: 40d8115aba2abb7a8a3f74d21b8957f8d90c15fb
2023-01-19 02:08:52 -08:00
Open Source Bot
131285acba Updating submodules
Summary:
GitHub commits:

cd483612a2
ebfc8ec28d

Reviewed By: jurajh-fb

fbshipit-source-id: 111f35c68319e32542bbd32aec698873f3962d4a
2023-01-18 21:48:39 -08:00
Chad Austin
07a1caa93c add throughput numbers to the random_writes benchmark
Summary:
Before adding a random_reads benchmark, this diff enables the
random_writes benchmark on Windows and adds throughput numbers.

Reviewed By: kmancini

Differential Revision: D42461465

fbshipit-source-id: 165de212e061f9e2ad58222178422592f3bc688d
2023-01-18 20:46:42 -08:00
Open Source Bot
1c2aaa23c3 Updating submodules
Summary:
GitHub commits:

732cadb412
c0a4e11b31
eca27429a4
cb1947a99c
667afa9699

Reviewed By: jurajh-fb

fbshipit-source-id: 40ab708204396dc08008721e0f5a7b6bf35ee9e1
2023-01-18 20:28:21 -08:00
brandon.kurtz@airbnb.com
64e324b266 fix CONTRIBUTING.md to reference main instead of master (#436)
Summary:
fix CONTRIBUTING.md to reference main instead of master

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/436).
* __->__ https://github.com/facebook/sapling/issues/436

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

Reviewed By: evangrayk

Differential Revision: D42594731

Pulled By: bolinfest

fbshipit-source-id: 2928c6669f948e66181429d6124dfcd3692b7e01
2023-01-18 19:58:13 -08:00
Open Source Bot
cb931d6c7d Updating submodules
Summary:
GitHub commits:

ff488542f1
2eae57bb72
483ab0e77d

Reviewed By: jurajh-fb

fbshipit-source-id: 42f66e22dc002575deaf27a2d644ed3cab61d092
2023-01-18 19:47:50 -08:00
kurtz.brandon@gmail.com
117e4dca50 add status err if linked PR was closed when submitting (#356)
Summary:
add status err if linked PR was closed when submitting

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/356).
* __->__ https://github.com/facebook/sapling/issues/356

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

Reviewed By: akushner

Differential Revision: D42299786

Pulled By: bolinfest

fbshipit-source-id: dfc2e0b95bca998f3fdb2e87cf6649f622d0621b
2023-01-18 18:51:11 -08:00
Open Source Bot
f1f7d1b6a7 Updating submodules
Summary:
GitHub commits:

52ffa2233e
10cdefa78b
79666d9959
0586dcae53

Reviewed By: jurajh-fb

fbshipit-source-id: d81cc3eb68fa87d42f56f9763cbc1a072e95b850
2023-01-18 18:28:09 -08:00
Open Source Bot
18940237fa Updating submodules
Summary:
GitHub commits:

202c9212f7
c3d9e8541f

Reviewed By: jurajh-fb

fbshipit-source-id: 16ebb9ce0d0e4c93f0f9bac0803af06026cd0e45
2023-01-18 16:55:20 -08:00
Evan Krause
debccaa055 Add tests for run-proxy
Summary:
Add tests for run-proxy. This whole area was previously not tested, despite  being the main entry point for `sl web` and having quite complicated stuff going on.

These tests aren't even perfect, there's some stuff that's not getting tested by this, and there's lots of code paths that are uncovered. But it's better than nothing and lets us add more later.

I also had to move some bits and pieces around to make the tests happy (notably for mocking I needed to import some functions differently, which is annoying)

Reviewed By: bolinfest

Differential Revision: D42561949

fbshipit-source-id: e5830038a502f84cd87bc436a7c1064c564de338
2023-01-18 16:46:53 -08:00
Evan Krause
576ae3aa2a Separate runProxy implementation from main
Summary: Refactoring run-proxy so that the implementation is a different file from the main entry point. This allows us to write tests where we require the implementation of main(), without actually running it during the require

Reviewed By: bolinfest

Differential Revision: D42561950

fbshipit-source-id: 81f95eab232de3ef5e99771c2fae48911908d330
2023-01-18 16:46:53 -08:00
Evan Krause
9c58868374 Start new server if sl version mismatches
Summary:
Right now, our server re-use is a bit aggressive. A spawned ISL server will stick around until you close all ISL windows or kill the server yourself or use --force.

But if we updated sl in the background, then there's room for incompatibilities. The server you're already running would be using the old javascript, but it would server the newer javascript for the client, which could easily cause bugs.

In such a situation, we should pretend the user passed `--force`.

The implementation of this is slightly annoying. We're not currently set up to check for the previous server information before we try spawning the server. So we won't be able to add `--force` directly. Instead, if we fail to spawn, then see the existing instance uses a different version, we'll have to kill it and then restart the entire process. This seems to work well in practice.

Even though we're recursively calling `main`, I don't see a way for it to loop forever, though it is worth making sure that's the case. Even if you had a pathological case of multiple ISL servers trying to spawn at the same time.

TODO: we need to update the isl wrapper inside the python sl launcher to pass the version string in

Reviewed By: bolinfest

Differential Revision: D42561951

fbshipit-source-id: bdd0a6e0fb9065ee5fb7cb3110a5a937fc40d9ce
2023-01-18 16:46:53 -08:00
Michael Bolin
98245071ef add integration for new sl pr submit default behavior
Summary:
Change `test-ext-github-pr-submit.t` so it tests the
new `sl pr submit` behavior introduced in D42550052
while introducing `test-ext-github-pr-submit-placeholder-issue.t`
to verify the old behavior.

Reviewed By: sggutier

Differential Revision: D42554648

fbshipit-source-id: 79f4a876993ad3d85bb2a11be1460de55d5530c0
2023-01-18 16:43:53 -08:00
Michael Bolin
18c5c2569a use PR# in body param in expect_update_pr_request()
Summary:
The entry in the bulleted list in the pull request body
should match the pull request number argument
rather than hardcoding it to `1`.

Reviewed By: sggutier

Differential Revision: D42554647

fbshipit-source-id: d5ec178ad8981d92214300f8663e5bc13981357d
2023-01-18 16:43:53 -08:00
Michael Bolin
7ce516dfac revert behavior that uses placeholder GitHub issues for PRs
Summary:
D42050143 (e77e67bba7) / e77e67bba7
changed the default behavior for `sl pr submit` in hopes of
being more performant [by rearchitecting things so that more
work could be done in parallel], but ended up causing the following
issues:

- could not be used with repos that disabled GitHub issues: https://github.com/facebook/sapling/issues/371
- unexpected failures when trying to convert a placeholder issue
  to a pull request (such as https://github.com/facebook/sapling/issues/384)
  meant that users often found themselves with stale placeholder issues
- third-party tools, such as Slack apps, that have triggers based on the creation
  of new GitHub issues, find this noisy: https://github.com/facebook/sapling/issues/383

This diff changes `sl pr submit` such that it defaults to the previous
behavior (in which pull requests are created in series, rather than in
parallel, and is subject to a race condition where pull request numbers
may not match branch numbers), though for now, it still makes the
old behavior available behind a boolean config, `github.placeholder-strategy`.

Because quite a few changes were made to
`eden/scm/edenscm/ext/github/submit.py` since D42050143 (e77e67bba7)
was committed, this diff is not a straight revert of the
original diff.

Reviewed By: muirdm

Differential Revision: D42550052

fbshipit-source-id: 68d6d1e00b5af2d166b7e3aab2dda959fae5de82
2023-01-18 16:43:53 -08:00
Zeyi (Rice) Fan
8618070891 glob: use SerialExecutor to avoid fan-out
Summary:
To address the Thrift QueueTimeout issue we have been seeing in EdenFS Thrift server.

The underlying issue is that, `globFiles` Thrift method in EdenFS is causing too much fanouts, overloading the Thrift CPU worker. As a result, all the new incoming requests are waiting in the Thrift queue too long to get picked, resulting as QueueTimeout exceptions on the client side.

This diff adds `folly::SerialExecutor` for the `globFiles` method to limit concurrency when processing glob requests.

Reviewed By: chadaustin

Differential Revision: D41390586

fbshipit-source-id: 54d834bb370d4ae693089051f200b7103de2f85b
2023-01-18 16:41:25 -08:00
Zeyi (Rice) Fan
0b7baa9025 telemetry: add hasSubscription to TraceBus and optimize TaskTraceBlock
Summary: This diff adds a `TraceBus::hasSubscription` method so we can quickly check if a TraceBus has any subscriber. This way we can avoid paying the cost of constructing tracing events if there is no subscriber.

Reviewed By: chadaustin

Differential Revision: D41526562

fbshipit-source-id: f89f43ee7739149d51c6a483bd582c7c93e9fcd9
2023-01-18 16:41:25 -08:00
Zeyi (Rice) Fan
b31f6e3369 inodes: trace globbing related code
Summary: This diff adds `TaskTraceBlock` to globbing code so we can understand which thread are these code being executed on.

Reviewed By: chadaustin

Differential Revision: D41527107

fbshipit-source-id: a001f473795e413d2bf4a8125389867a1629515b
2023-01-18 16:41:25 -08:00