Repository: linkerd/linkerd2
Pull request #6110 (2021-05-12 17:40:18)

Add changes for stable-2.10.2
## stable-2.10.2

This stable release fixes a proxy task leak that could be triggered when clients
disconnect when a service is in failfast. It also includes fixes for the fuzz
testing that was performed on the proxy and its dependencies; check out the
[Introducing fuzz testing for Linkerd](https://linkerd.io/2021/05/07/fuzz-testing-for-linkerd/) blog post for a summary of that work!

The `check` command also prints versioned hint URLs now. After the 2.10 release,
enough changed from previous stable releases that the documentation had to be
separated by stable versions.

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>



Patch:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 951116263..f67470371 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -103,10 +103,10 @@ jobs:
         - external-prometheus-deep
         - external-resources
         - helm-deep
-        - helm-upgrade
+        # - helm-upgrade
         - uninstall
-        - upgrade-edge
-        - upgrade-stable
+        # - upgrade-edge
+        # - upgrade-stable
         - cni-calico-deep
     needs: [docker_build]
     name: Integration tests (${{ matrix.integration_test }})
diff --git a/.proxy-version b/.proxy-version
index 89d46b221..e2d4912bb 100644
--- a/.proxy-version
+++ b/.proxy-version
@@ -1,1 +1,1 @@
-v2.141.0
+v2.141.1
diff --git a/CHANGES.md b/CHANGES.md
index 3cdb9ccdf..fad985b5b 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,18 @@
 # Changes
 
+## stable-2.10.2
+
+This stable release fixes a proxy task leak that could be triggered when clients
+disconnect when a service is in failfast. It also includes fixes for the fuzz
+testing that was performed on the proxy and its dependencies; check out the
+[Introducing fuzz testing for
+Linkerd](https://linkerd.io/2021/05/07/fuzz-testing-for-linkerd/) blog post for
+a summary of that work!
+
+The `check` command also prints versioned hint URLs now. After the 2.10 release,
+enough changed from previous stable releases that the documentation had to be
+separated by stable versions.
+
 ## stable-2.10.1
 
 This stable release adds CLI support for Apple Silicon M1 chips and support for
diff --git a/EXTENSIONS.md b/EXTENSIONS.md
index 333b04221..f1ebd07bc 100644
--- a/EXTENSIONS.md
+++ b/EXTENSIONS.md
@@ -106,7 +106,7 @@ instead of the output format described above.  E.g.
         },
         {
           "description": "linkerd-viz Namespace exists",
-          "hint": "https://linkerd.io/checks/#l5d-viz-ns-exists",
+          "hint": "https://linkerd.io/2/checks/#l5d-viz-ns-exists",
           "error": "could not find the linkerd-viz extension",
           "result": "error"
         }
diff --git a/cli/cmd/check.go b/cli/cmd/check.go
index bc88921be..bd62467db 100644
--- a/cli/cmd/check.go
+++ b/cli/cmd/check.go
@@ -288,7 +288,7 @@ func runExtensionChecks(cmd *cobra.Command, wout io.Writer, werr io.Writer, opts
 					Category:    healthcheck.CategoryID(extensionCmd),
 					Description: fmt.Sprintf("Linkerd extension command %s exists", extensionCmd),
 					Err:         err,
-					HintURL:     healthcheck.DefaultHintBaseURL + "extensions",
+					HintURL:     healthcheck.HintBaseURL(version.Version) + "extensions",
 					Warning:     true,
 				},
 			}
@@ -316,7 +316,7 @@ func runExtensionChecks(cmd *cobra.Command, wout io.Writer, werr io.Writer, opts
 					Category:    healthcheck.CategoryID(extensionCmd),
 					Description: fmt.Sprintf("Running: %s", command),
 					Err:         err,
-					HintURL:     healthcheck.DefaultHintBaseURL + "extensions",
+					HintURL:     healthcheck.HintBaseURL(version.Version) + "extensions",
 				})
 				success = false
 			} else {
diff --git a/pkg/healthcheck/healthcheck.go b/pkg/healthcheck/healthcheck.go
index 46af8a73a..c5b8a5f40 100644
--- a/pkg/healthcheck/healthcheck.go
+++ b/pkg/healthcheck/healthcheck.go
@@ -160,11 +160,6 @@ const (
 	keyKeyName                    = "tls.key"
 )
 
-// DefaultHintBaseURL is the base URL on the linkerd.io website that all check hints
-// point to. Each check adds its own `hintAnchor` to specify a location on the
-// page.
-const DefaultHintBaseURL = "https://linkerd.io/checks/#"
-
 // AllowedClockSkew sets the allowed skew in clock synchronization
 // between the system running inject command and the node(s), being
 // based on assumed node's heartbeat interval (5 minutes) plus default TLS
@@ -375,13 +370,12 @@ type Category struct {
 }
 
 // NewCategory returns an instance of Category with the specified data
-// and the DefaultHintBaseURL
 func NewCategory(id CategoryID, checkers []Checker, enabled bool) *Category {
 	return &Category{
 		ID:          id,
 		checkers:    checkers,
 		enabled:     enabled,
-		hintBaseURL: DefaultHintBaseURL,
+		hintBaseURL: HintBaseURL(version.Version),
 	}
 }
 
@@ -505,7 +499,7 @@ func (hc *HealthChecker) GetCategories() []*Category {
 //
 // Note that all checks should include a `hintAnchor` with a corresponding section
 // in the linkerd check faq:
-// https://linkerd.io/checks/#
+// https://linkerd.io/{major-version}/checks/#
 func (hc *HealthChecker) allCategories() []*Category {
 	return []*Category{
 		NewCategory(
diff --git a/pkg/healthcheck/healthcheck_output.go b/pkg/healthcheck/healthcheck_output.go
index 050a94a14..f5c5d6749 100644
--- a/pkg/healthcheck/healthcheck_output.go
+++ b/pkg/healthcheck/healthcheck_output.go
@@ -6,6 +6,7 @@ import (
 	"fmt"
 	"io"
 	"os"
+	"regexp"
 	"strings"
 	"time"
 
@@ -21,12 +22,19 @@ const (
 	TableOutput = "table"
 	// WideOutput is used to specify the wide output format
 	WideOutput = "wide"
+
+	// DefaultHintBaseURL is the default base URL on the linkerd.io website
+	// that all check hints for the latest linkerd version point to. Each
+	// check adds its own `hintAnchor` to specify a location on the page.
+	DefaultHintBaseURL = "https://linkerd.io/2/checks/#"
 )
 
 var (
 	okStatus   = color.New(color.FgGreen, color.Bold).SprintFunc()("\u221A")  // √
 	warnStatus = color.New(color.FgYellow, color.Bold).SprintFunc()("\u203C") // ‼
 	failStatus = color.New(color.FgRed, color.Bold).SprintFunc()("\u00D7")    // ×
+
+	reStableVersion = regexp.MustCompile(`stable-(\d\.\d+)\.`)
 )
 
 // CheckResults contains a slice of CheckResult structs.
@@ -222,3 +230,13 @@ func ParseJSONCheckOutput(data []byte) (CheckResults, error) {
 	}
 	return CheckResults{results}, nil
 }
+
+// HintBaseURL returns the base URL on the linkerd.io website that check hints
+// point to, depending on the version
+func HintBaseURL(ver string) string {
+	stableVersion := reStableVersion.FindStringSubmatch(ver)
+	if stableVersion == nil {
+		return DefaultHintBaseURL
+	}
+	return fmt.Sprintf("https://linkerd.io/%s/checks/#", stableVersion[1])
+}


Test patch:
diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml
index 2096eb970..ec7771a02 100644
--- a/.github/workflows/integration_tests.yml
+++ b/.github/workflows/integration_tests.yml
@@ -103,11 +103,11 @@ jobs:
         - external-prometheus-deep
         - external-resources
         - helm-deep
-        - helm-upgrade
+        # - helm-upgrade
         - multicluster
         - uninstall
-        - upgrade-edge
-        - upgrade-stable
+        # - upgrade-edge
+        # - upgrade-stable
         - cni-calico-deep
     needs: [docker_build]
     name: Integration tests (${{ matrix.integration_test }})
diff --git a/cli/cmd/testdata/check_output.golden b/cli/cmd/testdata/check_output.golden
index 39c9efb0b..db4ea9a1a 100644
--- a/cli/cmd/testdata/check_output.golden
+++ b/cli/cmd/testdata/check_output.golden
@@ -3,6 +3,6 @@ category
 √ check1
 × check2
     This should contain instructions for fail
-    see https://linkerd.io/checks/#hint-anchor for hints
+    see https://linkerd.io/2/checks/#hint-anchor for hints
 
 Status check results are ×
diff --git a/cli/cmd/testdata/check_output_json.golden b/cli/cmd/testdata/check_output_json.golden
index b87ac212e..38cc72a72 100644
--- a/cli/cmd/testdata/check_output_json.golden
+++ b/cli/cmd/testdata/check_output_json.golden
@@ -10,7 +10,7 @@
         },
         {
           "description": "check2",
-          "hint": "https://linkerd.io/checks/#hint-anchor",
+          "hint": "https://linkerd.io/2/checks/#hint-anchor",
           "error": "This should contain instructions for fail",
           "result": "error"
         }
diff --git a/web/srv/testdata/api_check_output.json b/web/srv/testdata/api_check_output.json
index b7539ed8c..70f331e50 100644
--- a/web/srv/testdata/api_check_output.json
+++ b/web/srv/testdata/api_check_output.json
@@ -13,7 +13,7 @@
             "Warning": true,
             "Err": {},
             "ErrMsg": "check2-error",
-            "HintURL": "https://linkerd.io/checks/#check2-hint-anchor"
+            "HintURL": "https://linkerd.io/2/checks/#check2-hint-anchor"
         }],
         "linkerd-config": [{
             "Category": "linkerd-config",
@@ -24,4 +24,4 @@
         }]
     },
     "success": true
-}
\ No newline at end of file
+}