Repository: kopia/kopia
Pull request #2940 (2023-04-14 03:10:37)

build(deps-dev): bump electron from 23.1.3 to 24.1.1 in /app
Bumps [electron](https://github.com/electron/electron) from 23.1.3 to 24.1.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/electron/electron/releases">electron's releases</a>.</em></p>
<blockquote>
<h2>electron v24.1.1</h2>
<h1>Release Notes for v24.1.1</h1>
<h2>Fixes</h2>
<ul>
<li>Fixed recommended <code>node-gyp</code> version in <code>node.h</code> error. <a href="https://redirect.github.com/electron/electron/pull/37927">#37927</a> <!-- raw HTML omitted -->(Also in <a href="https://redirect.github.com/electron/electron/pull/37942">22</a>, <a href="https://redirect.github.com/electron/electron/pull/37941">23</a>, <a href="https://redirect.github.com/electron/electron/pull/37926">25</a>)<!-- raw HTML omitted --></li>
</ul>
<h2>electron v24.1.0</h2>
<h1>Release Notes for v24.1.0</h1>
<h2>Features</h2>
<ul>
<li>Introduced <code>session.resolveHost</code> for resolving hostnames with Chromium's DNS resolver. <a href="https://redirect.github.com/electron/electron/pull/37847">#37847</a></li>
</ul>
<h2>Fixes</h2>
<ul>
<li>Added about panel for menu role <code>about</code> on Linux as well. <a href="https://redirect.github.com/electron/electron/pull/37872">#37872</a> <!-- raw HTML omitted -->(Also in <a href="https://redirect.github.com/electron/electron/pull/37874">23</a>, <a href="https://redirect.github.com/electron/electron/pull/37873">25</a>)<!-- raw HTML omitted --></li>
<li>Fixed an issue on macOS where entering fullscreen with the <code>Fn+F</code> system shortcut would fail or create strange window side effects. <a href="https://redirect.github.com/electron/electron/pull/37823">#37823</a> <!-- raw HTML omitted -->(Also in <a href="https://redirect.github.com/electron/electron/pull/37822">23</a>)<!-- raw HTML omitted --></li>
<li>Fixed an issue where certain buttons in the PDF viewer didn't work. <a href="https://redirect.github.com/electron/electron/pull/37918">#37918</a> <!-- raw HTML omitted -->(Also in <a href="https://redirect.github.com/electron/electron/pull/37920">25</a>)<!-- raw HTML omitted --></li>
<li>Security: Fixed an issue with Content-Security-Policy not being correctly enforced when sandbox: false and contextIsolation: false. (CVE-2023-23623). <a href="https://redirect.github.com/electron/electron/pull/37839">#37839</a></li>
</ul>
<h2>Other Changes</h2>
<ul>
<li>Updated Chromium to 112.0.5615.50. <a href="https://redirect.github.com/electron/electron/pull/37833">#37833</a></li>
</ul>
<h2>electron v24.0.0</h2>
<h1>Release Notes for v24.0.0</h1>
<h2>Stack Upgrades</h2>
<ul>
<li>Chromium 112.0.5615.49
<ul>
<li><a href="https://developer.chrome.com/blog/new-in-chrome-112/">New in Chrome 112</a></li>
<li><a href="https://developer.chrome.com/blog/new-in-chrome-111/">New in Chrome 111</a></li>
</ul>
</li>
<li>Node.js 18.14.0
<ul>
<li><a href="https://nodejs.org/en/blog/release/v18.14.0/">Node 18.14.0 blog post</a></li>
</ul>
</li>
<li>V8 11.2</li>
</ul>
<h2>Breaking Changes</h2>
<ul>
<li><code>nativeImage.createThumbnailFromPath()</code> now takes <code>size</code> instead of <code>maxSize</code>. <a href="https://redirect.github.com/electron/electron/pull/37796">#37796</a></li>
</ul>
<h2>Features</h2>
<ul>
<li>Added <code>httpOnly</code> to the cookie filter. <a href="https://redirect.github.com/electron/electron/pull/37365">#37365</a></li>
<li>Added <code>logUsage</code> to <code>shell.openExternal()</code> options, which allows passing the <code>SEE_MASK_FLAG_LOG_USAGE</code> flag to <code>ShellExecuteEx</code> on Windows. <a href="https://redirect.github.com/electron/electron/pull/37291">#37291</a></li>
<li>Added <code>types</code> to <code>webRequest</code> filter. <a href="https://redirect.github.com/electron/electron/pull/37427">#37427</a></li>
<li>Added several standard page size options to <code>webContents.print()</code>. <a href="https://redirect.github.com/electron/electron/pull/37265">#37265</a> <!-- raw HTML omitted -->(Also in <a href="https://redirect.github.com/electron/electron/pull/37263">22</a>, <a href="https://redirect.github.com/electron/electron/pull/37264">23</a>)<!-- raw HTML omitted --></li>
<li>Added the <code>enableLocalEcho</code> flag to the session handler <code>ses.setDisplayMediaRequestHandler()</code> callback for allowing remote audio input to be echoed in the local output stream when <code>audio</code> is a <code>WebFrameMain</code>. <a href="https://redirect.github.com/electron/electron/pull/37528">#37528</a> <!-- raw HTML omitted -->(Also in <a href="https://redirect.github.com/electron/electron/pull/37529">23</a>)<!-- raw HTML omitted --></li>
</ul>
<h2>Fixes</h2>
<ul>
<li>Corrects an issue with HTML fullscreen when <code>BrowserWindow</code> fullscreening is disabled. <a href="https://redirect.github.com/electron/electron/pull/37368">#37368</a> <!-- raw HTML omitted -->(Also in <a href="https://redirect.github.com/electron/electron/pull/37367">23</a>)<!-- raw HTML omitted --></li>
<li>Fixed WebUSB on ARM64 macs. <a href="https://redirect.github.com/electron/electron/pull/37522">#37522</a> <!-- raw HTML omitted -->(Also in <a href="https://redirect.github.com/electron/electron/pull/37521">23</a>)<!-- raw HTML omitted --></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/electron/electron/commit/2e7bfb4e0d8b7ce4d55b43e9888b13cba9623d14"><code>2e7bfb4</code></a> fix: recommended <code>node-gyp</code> version in <code>node.h</code> error (<a href="https://redirect.github.com/electron/electron/issues/37927">#37927</a>)</li>
<li><a href="https://github.com/electron/electron/commit/95729e64e48468b70f9128857325bad174c7c236"><code>95729e6</code></a> fix: exceptions during function/promise result conversions live in calling wo...</li>
<li><a href="https://github.com/electron/electron/commit/6f9cc3ce323009561a687346ccc7f97fa77f8571"><code>6f9cc3c</code></a> chore: use nested namespaces (<a href="https://redirect.github.com/electron/electron/issues/37915">#37915</a>)</li>
<li><a href="https://github.com/electron/electron/commit/55df7a369ec36f8c0aac50902063ee6f1d6456ab"><code>55df7a3</code></a> fix: broken buttons in PDF viewer (<a href="https://redirect.github.com/electron/electron/issues/37918">#37918</a>)</li>
<li><a href="https://github.com/electron/electron/commit/a6d934f2a26740653941a8f947d376466182f14f"><code>a6d934f</code></a> chore: use emplace when possible (<a href="https://redirect.github.com/electron/electron/issues/37910">#37910</a>)</li>
<li><a href="https://github.com/electron/electron/commit/78404eb23f1a31095a163fa28280eea9d127e426"><code>78404eb</code></a> chore: change some for loops to range-based (<a href="https://redirect.github.com/electron/electron/issues/37913">#37913</a>)</li>
<li><a href="https://github.com/electron/electron/commit/59fe35388d44b0b338b46fedc3ac462f039c8e13"><code>59fe353</code></a> chore: enforce consistent Markdown style for strong and emphasis (<a href="https://redirect.github.com/electron/electron/issues/37845">#37845</a>)</li>
<li><a href="https://github.com/electron/electron/commit/81e3cef2940a9300293cfd04d50a9d72a4fb5683"><code>81e3cef</code></a> fix: showAboutPanel also on linux (<a href="https://redirect.github.com/electron/electron/issues/37872">#37872</a>)</li>
<li><a href="https://github.com/electron/electron/commit/ae54e3768c24c0d777522a8ea1e91f85725c5a7e"><code>ae54e37</code></a> test: support 'latest'/'latest@X' Electron version strings (<a href="https://redirect.github.com/electron/electron/issues/37867">#37867</a>)</li>
<li><a href="https://github.com/electron/electron/commit/4de542d5241100e0da4f311762942764ac6a242f"><code>4de542d</code></a> fix: exceptions in nested conversions live in the target world (<a href="https://redirect.github.com/electron/electron/issues/37897">#37897</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/electron/electron/compare/v23.1.3...v24.1.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=electron&package-manager=npm_and_yarn&previous-version=23.1.3&new-version=24.1.1)](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)


</details>


Patch:
diff --git a/app/package-lock.json b/app/package-lock.json
index 5184881c..918eb558 100644
--- a/app/package-lock.json
+++ b/app/package-lock.json
@@ -22,7 +22,7 @@
         "asar": "^3.2.0",
         "concurrently": "^7.6.0",
         "dotenv": "^16.0.3",
-        "electron": "^23.1.3",
+        "electron": "^24.1.1",
         "electron-builder": "^24.2.0",
         "electron-notarize": "^1.2.2",
         "playwright": "^1.32.1",
@@ -604,9 +604,9 @@
       "optional": true
     },
     "node_modules/@types/node": {
-      "version": "16.11.26",
-      "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.26.tgz",
-      "integrity": "sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ==",
+      "version": "18.15.11",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz",
+      "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==",
       "dev": true
     },
     "node_modules/@types/plist": {
@@ -1873,14 +1873,14 @@
       }
     },
     "node_modules/electron": {
-      "version": "23.1.3",
-      "resolved": "https://registry.npmjs.org/electron/-/electron-23.1.3.tgz",
-      "integrity": "sha512-MNjuUS2K6/OxlJ0zTC77djo1R3xM038v1kUunvNFgDMZHYKpSOzOMNsPiwM2BGp+uZbkUb0nTnYafxXrM8H16w==",
+      "version": "24.1.1",
+      "resolved": "https://registry.npmjs.org/electron/-/electron-24.1.1.tgz",
+      "integrity": "sha512-ymjUMe6Pvh9ytpM4lOvr+Qxd6NG5AELRtR6tw54bK3FXfKtTTKKAtZw/NbwHwkRAlWu8FNAGOuvCoap6/bm9LQ==",
       "dev": true,
       "hasInstallScript": true,
       "dependencies": {
         "@electron/get": "^2.0.0",
-        "@types/node": "^16.11.26",
+        "@types/node": "^18.11.18",
         "extract-zip": "^2.0.1"
       },
       "bin": {
@@ -4791,9 +4791,9 @@
       "optional": true
     },
     "@types/node": {
-      "version": "16.11.26",
-      "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.26.tgz",
-      "integrity": "sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ==",
+      "version": "18.15.11",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz",
+      "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==",
       "dev": true
     },
     "@types/plist": {
@@ -5760,13 +5760,13 @@
       }
     },
     "electron": {
-      "version": "23.1.3",
-      "resolved": "https://registry.npmjs.org/electron/-/electron-23.1.3.tgz",
-      "integrity": "sha512-MNjuUS2K6/OxlJ0zTC77djo1R3xM038v1kUunvNFgDMZHYKpSOzOMNsPiwM2BGp+uZbkUb0nTnYafxXrM8H16w==",
+      "version": "24.1.1",
+      "resolved": "https://registry.npmjs.org/electron/-/electron-24.1.1.tgz",
+      "integrity": "sha512-ymjUMe6Pvh9ytpM4lOvr+Qxd6NG5AELRtR6tw54bK3FXfKtTTKKAtZw/NbwHwkRAlWu8FNAGOuvCoap6/bm9LQ==",
       "dev": true,
       "requires": {
         "@electron/get": "^2.0.0",
-        "@types/node": "^16.11.26",
+        "@types/node": "^18.11.18",
         "extract-zip": "^2.0.1"
       }
     },
diff --git a/app/package.json b/app/package.json
index 54450223..6a6772b6 100644
--- a/app/package.json
+++ b/app/package.json
@@ -114,7 +114,7 @@
     "asar": "^3.2.0",
     "concurrently": "^7.6.0",
     "dotenv": "^16.0.3",
-    "electron": "^23.1.3",
+    "electron": "^24.1.1",
     "electron-builder": "^24.2.0",
     "electron-notarize": "^1.2.2",
     "playwright": "^1.32.1",
diff --git a/internal/cache/persistent_lru_cache.go b/internal/cache/persistent_lru_cache.go
index 5bc4c13e..99cfa2d3 100644
--- a/internal/cache/persistent_lru_cache.go
+++ b/internal/cache/persistent_lru_cache.go
@@ -203,6 +203,7 @@ func (c *PersistentCache) GetPartial(ctx context.Context, key string, offset, le
 	return false
 }
 
+// +checklocks:c.listCacheMutex
 func (c *PersistentCache) isCacheFullLocked() bool {
 	return c.listCache.DataSize() > c.sweep.MaxSizeBytes
 }
@@ -330,6 +331,7 @@ func (h *contentMetadataHeap) LookupByID(id blob.ID) (int, *blobCacheEntry) {
 
 func (h contentMetadataHeap) DataSize() int64 { return h.dataSize }
 
+// +checklocks:c.listCacheMutex
 func (c *PersistentCache) listCacheCleanupLocked(ctx context.Context) {
 	var (
 		unsuccessfulDeletes     []blob.Metadata
@@ -391,7 +393,7 @@ func (c *PersistentCache) initialScan(ctx context.Context) error {
 			tooRecentBytes += it.Length
 		}
 
-		heap.Push(&c.listCache, it)
+		heap.Push(&c.listCache, it) // +checklocksignore
 
 		return nil
 	})
diff --git a/internal/metrics/metrics_distribution.go b/internal/metrics/metrics_distribution.go
index 483c2992..24d35a9c 100644
--- a/internal/metrics/metrics_distribution.go
+++ b/internal/metrics/metrics_distribution.go
@@ -63,8 +63,8 @@ func (s *DistributionState[T]) Mean() T {
 // Distribution measures distribution/summary of values.
 type Distribution[T constraints.Integer | constraints.Float] struct {
 	mu               sync.Mutex
-	state            atomic.Pointer[DistributionState[T]]
-	bucketThresholds []T
+	state            atomic.Pointer[DistributionState[T]] // +checklocksignore
+	bucketThresholds []T                                  // +checklocksignore
 
 	prom            prometheus.Observer
 	prometheusScale float64
diff --git a/internal/metrics/prom_cache.go b/internal/metrics/prom_cache.go
index 14f65bef..0474fb37 100644
--- a/internal/metrics/prom_cache.go
+++ b/internal/metrics/prom_cache.go
@@ -16,7 +16,9 @@
 //nolint:gochecknoglobals
 var (
 	promCacheMutex sync.Mutex
-	promCounters   = map[string]*prometheus.CounterVec{}
+	// +checklocks:promCacheMutex
+	promCounters = map[string]*prometheus.CounterVec{}
+	// +checklocks:promCacheMutex
 	promHistograms = map[string]*prometheus.HistogramVec{}
 )
 
diff --git a/repo/content/committed_content_index.go b/repo/content/committed_content_index.go
index c4a872f9..902c999c 100644
--- a/repo/content/committed_content_index.go
+++ b/repo/content/committed_content_index.go
@@ -26,12 +26,13 @@
 const smallIndexEntryCountThreshold = 100
 
 type committedContentIndex struct {
-	rev                    atomic.Int64
-	cache                  committedContentIndexCache
-	permissiveCacheLoading bool
+	rev   atomic.Int64
+	cache committedContentIndexCache
 
 	mu sync.RWMutex
 	// +checklocks:mu
+	permissiveCacheLoading bool
+	// +checklocks:mu
 	deletionWatermark time.Time
 	// +checklocks:mu
 	inUse map[blob.ID]index.Index
diff --git a/repo/format/upgrade_lock.go b/repo/format/upgrade_lock.go
index a1789cae..784e3afe 100644
--- a/repo/format/upgrade_lock.go
+++ b/repo/format/upgrade_lock.go
@@ -21,7 +21,7 @@
 
 // ErrFormatUptoDate is returned whenever a lock intent is attempted to be set
 // on a repository that is already using the latest format version.
-var ErrFormatUptoDate = errors.New("repository format is up to date")
+var ErrFormatUptoDate = errors.New("repository format is up to date") // +checklocksignore
 
 // BackupBlobID gets the upgrade backu pblob-id fro mthe lock.
 func BackupBlobID(l UpgradeLockIntent) blob.ID {


Test patch:
diff --git a/repo/blob/s3/s3_versioned_test.go b/repo/blob/s3/s3_versioned_test.go
index 70548242..bc933855 100644
--- a/repo/blob/s3/s3_versioned_test.go
+++ b/repo/blob/s3/s3_versioned_test.go
@@ -649,7 +649,8 @@ func randHex(tb testing.TB, length int) string {
 // Notice that this is not a crypto RNG.
 var (
 	rMu sync.Mutex
-	r   = rand.New(rand.NewSource(clock.Now().UnixNano()))
+	// +checklocks:rMu
+	r = rand.New(rand.NewSource(clock.Now().UnixNano()))
 )
 
 func randLongHex(tb testing.TB, length int) string {
diff --git a/repo/content/content_manager_test.go b/repo/content/content_manager_test.go
index bfdefb0b..153ff830 100644
--- a/repo/content/content_manager_test.go
+++ b/repo/content/content_manager_test.go
@@ -2683,6 +2683,7 @@ func (o withDeleted) GetDeleted() bool {
 }
 
 var (
+	// +checklocks:rMu
 	r   = rand.New(rand.NewSource(rand.Int63()))
 	rMu sync.Mutex
 )
diff --git a/tests/testenv/cli_test_env.go b/tests/testenv/cli_test_env.go
index fb435d56..df001eee 100644
--- a/tests/testenv/cli_test_env.go
+++ b/tests/testenv/cli_test_env.go
@@ -47,9 +47,11 @@ type CLITest struct {
 
 	DefaultRepositoryCreateFlags []string
 
-	logMu            sync.RWMutex
+	logMu sync.RWMutex
+	// +checklocks:logMu
 	logOutputEnabled bool
-	logOutputPrefix  string
+	// +checklocks:logMu
+	logOutputPrefix string
 }
 
 // RepoFormatNotImportant chooses arbitrary format version where it's not important to the test.