Repository: linkerd/linkerd2
Pull request #7249 (2021-11-09 17:02:59)

build(deps-dev): bump webpack from 5.62.1 to 5.62.2 in /web/app
Bumps [webpack](https://github.com/webpack/webpack) from 5.62.1 to 5.62.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/webpack/webpack/releases">webpack's releases</a>.</em></p>
<blockquote>
<h2>v5.62.2</h2>
<h1>Bugfixes</h1>
<ul>
<li>fix <code>__system_context__</code> injection when using the <code>library</code> option on entrypoint</li>
<li>enable <code>exportsPresence: &quot;error&quot;</code> by default in <code>futureDefaults</code></li>
<li>fix bad performance for a RegExp in Stats printing (with large error messages)</li>
<li>fix <code>exportPresence</code> -&gt; <code>exportsPresence</code> typo</li>
<li>fix a bug with module invalidation when only module id changes with <code>experiments.cacheUnaffected</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/webpack/webpack/commit/3aed1fe0249f8730a35fab62e3cdc3b399b0b6e9"><code>3aed1fe</code></a> 5.62.2</li>
<li><a href="https://github.com/webpack/webpack/commit/14582fc41504595b04f01561ea19d27391d6b9ac"><code>14582fc</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/webpack/issues/14684">#14684</a> from webpack/bugfix/cache-unaffected-module-id</li>
<li><a href="https://github.com/webpack/webpack/commit/393fb6e22c27cae0c6cffe19ba1a5ae710c0f9b5"><code>393fb6e</code></a> fix a bug with experiments.cacheUnaffected</li>
<li><a href="https://github.com/webpack/webpack/commit/86e3eb289f6ea9baf4bdc22748b9a9d8dff187b8"><code>86e3eb2</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/webpack/issues/14665">#14665</a> from markjm/markjm/option-names</li>
<li><a href="https://github.com/webpack/webpack/commit/12e028518a726c4ebf336ecfe823d27f51776b13"><code>12e0285</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/webpack/issues/14679">#14679</a> from webpack/fix-regexp</li>
<li><a href="https://github.com/webpack/webpack/commit/eeb8e890e61f67870028ed08e759abf58562ee7a"><code>eeb8e89</code></a> fix regexp in DefaultStatsPrinterPlugin.js</li>
<li><a href="https://github.com/webpack/webpack/commit/0f22db981dc615d76be1c7dd74fc840fae41827c"><code>0f22db9</code></a> Fix names of options to match the exported types</li>
<li><a href="https://github.com/webpack/webpack/commit/14dd4f912c013f060bf7843a3d5462a51ff3051b"><code>14dd4f9</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/webpack/issues/14660">#14660</a> from webpack/defaults/export-presence</li>
<li><a href="https://github.com/webpack/webpack/commit/e96c1b563503782d7eaaa61cbae160d1652ba45a"><code>e96c1b5</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/webpack/issues/13654">#13654</a> from cjpearson/system-context-fix</li>
<li><a href="https://github.com/webpack/webpack/commit/f9e6b682aba059d13aa3e170ac42b7a797a0ef3f"><code>f9e6b68</code></a> make exportsPresence strict by default in future</li>
<li>See full diff in <a href="https://github.com/webpack/webpack/compare/v5.62.1...v5.62.2">compare view</a></li>
</ul>
</details>
<br />


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


</details>


Patch:
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 5905a18b5..db6d79110 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -19,4 +19,10 @@ updates:
     directory: "/web/app"
     schedule:
       interval: "daily"
+    ignore:
+      # v6 is backwards-incompatible and requires lots of changes.
+      # A compatibility layer should come out at some point
+      # see https://reactrouter.com/docs/en/v6/upgrading/v5
+      - dependency-name: "react-router-dom"
+        update-type: "semver-major"
 
diff --git a/controller/api/destination/watcher/endpoints_watcher.go b/controller/api/destination/watcher/endpoints_watcher.go
index de686b0cf..7c6cfe4fe 100644
--- a/controller/api/destination/watcher/endpoints_watcher.go
+++ b/controller/api/destination/watcher/endpoints_watcher.go
@@ -712,7 +712,7 @@ func (pp *portPublisher) endpointSliceToAddresses(es *discovery.EndpointSlice) A
 
 				identity := es.Annotations[consts.RemoteGatewayIdentity]
 				address, id := pp.newServiceRefAddress(resolvedPort, IPAddr, serviceID.Name, es.Namespace)
-				address.Identity, address.AuthorityOverride = authorityOverride, identity
+				address.Identity, address.AuthorityOverride = identity, authorityOverride
 
 				if endpoint.Hints != nil {
 					zones := make([]discovery.ForZone, len(endpoint.Hints.ForZones))
@@ -838,7 +838,11 @@ func (pp *portPublisher) resolveESTargetPort(slicePorts []discovery.EndpointPort
 		return Port(pp.targetPort.IntVal)
 	case intstr.String:
 		for _, p := range slicePorts {
-			if *p.Name == pp.targetPort.StrVal {
+			name := ""
+			if p.Name != nil {
+				name = *p.Name
+			}
+			if name == pp.targetPort.StrVal {
 				return Port(*p.Port)
 			}
 		}
diff --git a/web/app/package.json b/web/app/package.json
index 5894e6066..bdf041662 100644
--- a/web/app/package.json
+++ b/web/app/package.json
@@ -77,7 +77,7 @@
     "sinon-stub-promise": "4.0.0",
     "style-loader": "^3.3.1",
     "url-loader": "^4.1.1",
-    "webpack": "^5.62.1",
+    "webpack": "^5.62.2",
     "webpack-bundle-analyzer": "4.5.0",
     "webpack-cli": "4.9.1",
     "webpack-dev-server": "4.4.0"
diff --git a/web/app/yarn.lock b/web/app/yarn.lock
index 1f517f39d..dcd145c78 100644
--- a/web/app/yarn.lock
+++ b/web/app/yarn.lock
@@ -7894,10 +7894,10 @@ webpack-sources@^3.2.0:
   resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.1.tgz#251a7d9720d75ada1469ca07dbb62f3641a05b6d"
   integrity sha512-t6BMVLQ0AkjBOoRTZgqrWm7xbXMBzD+XDq2EZ96+vMfn3qKgsvdXZhbPZ4ElUOpdv4u+iiGe+w3+J75iy/bYGA==
 
-webpack@^5.62.1:
-  version "5.62.1"
-  resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.62.1.tgz#06f09b56a7b1bb13ed5137ad4b118358a90c9505"
-  integrity sha512-jNLtnWChS2CMZ7vqWtztv0G6fYB5hz11Zsadp5tE7e4/66zVDj7/KUeQZOsOl8Hz5KrLJH1h2eIDl6AnlyE12Q==
+webpack@^5.62.2:
+  version "5.62.2"
+  resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.62.2.tgz#9a352423396a3d434f8c3aef19dcfd79b58fe88a"
+  integrity sha512-GDJymz2MEpfcLoLHQFtV72raCVsuQtlUHeeNixbYh5DkFombEhoLyto3GU8xA42VfRXR7pxrYQ75Sd+YelFe5A==
   dependencies:
     "@types/eslint-scope" "^3.7.0"
     "@types/estree" "^0.0.50"


Test patch:
diff --git a/controller/api/destination/watcher/endpoints_watcher_test.go b/controller/api/destination/watcher/endpoints_watcher_test.go
index 992bef815..4dc7453f5 100644
--- a/controller/api/destination/watcher/endpoints_watcher_test.go
+++ b/controller/api/destination/watcher/endpoints_watcher_test.go
@@ -1544,6 +1544,7 @@ func TestEndpointsWatcherServiceMirrors(t *testing.T) {
 		expectedAddresses                []string
 		expectedNoEndpoints              bool
 		expectedNoEndpointsServiceExists bool
+		enableEndpointSlices             bool
 	}{
 		{
 			k8sConfigs: []string{`
@@ -1586,6 +1587,45 @@ subsets:
 			k8sConfigs: []string{`
 apiVersion: v1
 kind: Service
+metadata:
+  name: name1-remote
+  namespace: ns
+spec:
+  type: LoadBalancer
+  ports:
+  - port: 8989`,
+				`
+apiVersion: discovery.k8s.io/v1beta1
+kind: EndpointSlice
+metadata:
+  name: name1-remote-xxxx
+  namespace: ns
+  annotations:
+    mirror.linkerd.io/remote-gateway-identity: "gateway-identity-1"
+    mirror.linkerd.io/remote-svc-fq-name: "name1-remote-fq"
+  labels:
+    mirror.linkerd.io/mirrored-service: "true"
+    kubernetes.io/service-name: name1-remote
+endpoints:
+- addresses:
+  - 172.17.0.12
+ports:
+- port: 8989`,
+			},
+			serviceType: "mirrored service with identity and endpoint slices",
+			id:          ServiceID{Name: "name1-remote", Namespace: "ns"},
+			port:        8989,
+			expectedAddresses: []string{
+				"172.17.0.12:8989/gateway-identity-1/name1-remote-fq:8989",
+			},
+			expectedNoEndpoints:              false,
+			expectedNoEndpointsServiceExists: false,
+			enableEndpointSlices:             true,
+		},
+		{
+			k8sConfigs: []string{`
+apiVersion: v1
+kind: Service
 metadata:
   name: name1-remote
   namespace: ns
@@ -1701,7 +1741,7 @@ subsets:
 				t.Fatalf("NewFakeAPI returned an error: %s", err)
 			}
 
-			watcher := NewEndpointsWatcher(k8sAPI, logging.WithField("test", t.Name()), false)
+			watcher := NewEndpointsWatcher(k8sAPI, logging.WithField("test", t.Name()), tt.enableEndpointSlices)
 
 			k8sAPI.Sync(nil)