Repository: knative/client (go)

Issue:
Removed hard-coded "kn" in usage/error messages
Instead use `argv[0]`, the first argument provided on the command line. If the command is called with a path, that path should be stripped off from the given argument.

See https://github.com/knative/client/pull/1175 for more context.

Pull request description:
remove hardcoded kn for usage and error
## Description

Removed hard-coded "kn" in usage/error messages

## Reference

<!-- Please add the corresponding issue number which this pull request is about to fix -->
Fixes #1191 

<!--
/lint
-->


Patch:
diff --git a/.github/workflows/knative-release-notes.yaml b/.github/workflows/knative-release-notes.yaml
index 999231ca..5b011ba2 100644
--- a/.github/workflows/knative-release-notes.yaml
+++ b/.github/workflows/knative-release-notes.yaml
@@ -21,13 +21,13 @@ on:
   workflow_dispatch:
     inputs:
       branch:
-        description: 'Branch? (main)'
+        description: 'Branch'
         required: true
         default: 'main'
-      start-sha:
-        description: 'Starting SHA? (last tag on branch)'
-      end-sha:
-        description: 'Ending SHA? (latest HEAD)'
+      start-rev:
+        description: 'Start Tag (defaults to merge-base(branch, prev-branch))'
+      end-rev:
+        description: 'End Tag (defaults to HEAD of the target branch)'
 
 jobs:
   release-notes:
@@ -44,6 +44,7 @@ jobs:
           go-version: 1.17.x
 
       - name: Install Dependencies
+        # https://github.com/kubernetes/release/tree/master/cmd/release-notes
         run: go install k8s.io/release/cmd/release-notes@latest
 
       - name: Check out code
@@ -52,38 +53,45 @@ jobs:
           # fetch-depth of 0 indicates all history for all branches and tags.
           fetch-depth: 0
 
-      # Note: Defaults needs to run after we check out the repo.
-      - name: Defaults
+      - name: Generate Notes
         run: |
-          echo ORG=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}') >> $GITHUB_ENV
-          echo REPO=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}') >> $GITHUB_ENV
-
-          echo "BRANCH=${{ github.event.inputs.branch }}" >> $GITHUB_ENV
-
-          if [[ "${{ github.event.inputs.start-sha }}" != "" ]]; then
-            echo "START_SHA=${{ github.event.inputs.start-sha }}" >> $GITHUB_ENV
-          else
-            # Default Starting SHA (thanks @dprotaso)
-            export semver=$(git describe --match "v[0-9]*" --abbrev=0)
-            echo "Using ${semver} tag for starting sha."
-            echo START_SHA=$(git rev-list -n 1 "${semver}") >> $GITHUB_ENV
+          set -x
+          # The release-notes tool access ENV vars as options
+          # https://github.com/kubernetes/release/tree/master/cmd/release-notes#options
+
+          export ORG=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}')
+          export REPO=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')
+          export BRANCH="${{ github.event.inputs.branch }}"
+
+          export START_REV=${{ github.event.inputs.start-rev }}
+          export END_REV=${{ github.event.inputs.end-rev }}
+
+          if [[ -z "$END_REV" ]]; then
+            END_REV="origin/$BRANCH"
           fi
 
-          if [[ "${{ github.event.inputs.end-sha }}" != "" ]]; then
-            echo "END_SHA=${{ github.event.inputs.end-sha }}" >> $GITHUB_ENV
-          else
-            # Default Ending SHA (thanks @dprotaso)
-            echo "END_SHA=$(git rev-list -n 1 HEAD)" >> $GITHUB_ENV
+          # If start rev isn't set find the merge base of
+          # the target branch and the previous branch
+          if [[ -z "$START_REV" ]]; then
+            BRANCHES=$(mktemp)
+            # List of branches sorted by semver descending
+            git branch -r -l "origin/release-[0-9]*\.[0-9]*" | sed 's/ //g' | sort -Vr > "$BRANCHES"
+
+            if [[ "$BRANCH" == "main" ]]; then
+              LAST_BRANCH="$(head -n1 "$BRANCHES")"
+            else
+              # use grep magic to find the next branch
+              # '-A 1' - prints the line after the match which we can parse
+              LAST_BRANCH="$(grep -A 1 "$BRANCH" "$BRANCHES" | tail -n1)"
+            fi
+
+            export START_SHA=$(git merge-base $LAST_BRANCH origin/$BRANCH)
           fi
 
-      - name: Generate Notes
-        run: |
-          # See  https://github.com/kubernetes/release/tree/master/cmd/release-notes for options.
-          # Note: we are setting env vars in the Defaults step.
           release-notes \
-            --required-author "" \
-            --repo-path       "$(pwd)" \
-            --output          release-notes.md
+           --required-author="" \
+           --output=release-notes.md \
+           --repo-path="$PWD" \
 
       - name: Display Notes
         run: |
diff --git a/.github/workflows/knative-style.yaml b/.github/workflows/knative-style.yaml
index ae84f7d3..e34df932 100644
--- a/.github/workflows/knative-style.yaml
+++ b/.github/workflows/knative-style.yaml
@@ -246,6 +246,7 @@ jobs:
             cat > .wokeignore <<EOF
             vendor/*
             third_party/*
+            *.svg
           EOF
           fi
 
diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES
index b10726b6..c3a35b71 100644
--- a/OWNERS_ALIASES
+++ b/OWNERS_ALIASES
@@ -69,7 +69,6 @@ aliases:
   - carlisia
   - csantanapr
   - dprotaso
-  - duglin
   - evankanderson
   - itsmurugappan
   - julz
@@ -80,6 +79,7 @@ aliases:
   - lance
   - pmorie
   - rhuss
+  - smoser-ibm
   - spencerdillard
   - thisisnotapril
   - vaikas
@@ -152,6 +152,7 @@ aliases:
   - evankanderson
   - gerardo-lc
   - kvmware
+  - mgencur
   - shinigambit
   productivity-wg-leads:
   - chizhg
@@ -200,8 +201,8 @@ aliases:
   - julz
   - rhuss
   trademark-committee:
-  - duglin
   - evankanderson
+  - smoser-ibm
   - spencerdillard
   ux-wg-leads:
   - csantanapr
diff --git a/cmd/kn/main.go b/cmd/kn/main.go
index 5eac2913..c130d1df 100644
--- a/cmd/kn/main.go
+++ b/cmd/kn/main.go
@@ -185,7 +185,7 @@ func printError(err error) {
 		// Sending `os.Args[0]` instead, may result in panics while compiling the regexp, as it
 		// may expand to the absolute path of the kn binary and the path may collide with regexp expressions.
 		// see https://github.com/knative/client/issues/1172
-		fmt.Fprintf(os.Stderr, "Run '%s --help' for usage\n", extractCommandPathFromErrorMessage(err.Error(), "kn"))
+		fmt.Fprintf(os.Stderr, "Run '%s --help' for usage\n", extractCommandPathFromErrorMessage(err.Error(), root.GetBinaryName()))
 	}
 }
 
diff --git a/docs/cmd/kn.md b/docs/cmd/kn.md
index 4184ce8c..fa5b1f0b 100644
--- a/docs/cmd/kn.md
+++ b/docs/cmd/kn.md
@@ -6,7 +6,7 @@ kn manages Knative Serving and Eventing resources
 
 kn is the command line interface for managing Knative Serving and Eventing resources
 
- Find more information about Knative at: https://knative.dev
+Find more information about Knative at: https://knative.dev
 
 ### Options
 
diff --git a/go.mod b/go.mod
index 0160726f..d8dacfce 100644
--- a/go.mod
+++ b/go.mod
@@ -18,10 +18,10 @@ require (
 	k8s.io/cli-runtime v0.22.5
 	k8s.io/client-go v0.22.5
 	k8s.io/code-generator v0.22.5
-	knative.dev/eventing v0.29.1-0.20220203222422-fb092415eb36
-	knative.dev/hack v0.0.0-20220203160821-9b303d690fc9
-	knative.dev/networking v0.0.0-20220203170321-9ce389cb574b
-	knative.dev/pkg v0.0.0-20220203020920-51be315ed160
-	knative.dev/serving v0.29.1-0.20220204002619-fe023e3ac57d
+	knative.dev/eventing v0.29.1-0.20220216064840-13c0ce85277b
+	knative.dev/hack v0.0.0-20220216040439-0456e8bf6547
+	knative.dev/networking v0.0.0-20220216014839-4337f034f4ca
+	knative.dev/pkg v0.0.0-20220215153400-3c00bb0157b9
+	knative.dev/serving v0.29.1-0.20220216160340-a1a728763819
 	sigs.k8s.io/yaml v1.3.0
 )
diff --git a/go.sum b/go.sum
index f572c640..72da1375 100644
--- a/go.sum
+++ b/go.sum
@@ -372,6 +372,7 @@ github.com/docker/cli v20.10.12+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hH
 github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
 github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
 github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
+github.com/docker/distribution v2.8.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
 github.com/docker/docker v20.10.12+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
 github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y=
 github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c=
@@ -1810,27 +1811,27 @@ k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
 k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 h1:ZKMMxTvduyf5WUtREOqg5LiXaN1KO/+0oOQPRFrClpo=
 k8s.io/utils v0.0.0-20211208161948-7d6a63dca704/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
-knative.dev/caching v0.0.0-20220202132833-33800d337f17/go.mod h1:kWv5fckKHd9e/OSe6tUHKjUtJryWjytea9mnZxJoPLA=
-knative.dev/eventing v0.29.1-0.20220203222422-fb092415eb36 h1:x5ScuH42jlrfFrHta2kinhOeWKo8EjCAuT6QACFH/WU=
-knative.dev/eventing v0.29.1-0.20220203222422-fb092415eb36/go.mod h1:jsc5u3aC+BYmfUR2cRz9jb77krfULStxXkR1EgMUWp0=
+knative.dev/caching v0.0.0-20220210201907-0f9d7ce342fd/go.mod h1:BjBFTZc6CSCxC3FnMOW7RfuN2znfOFLVtGyuV8O9ygs=
+knative.dev/eventing v0.29.1-0.20220216064840-13c0ce85277b h1:zxXqiRAI0P6VGUYLiBarfhzV9l9HTR1fkMs9BQkCasc=
+knative.dev/eventing v0.29.1-0.20220216064840-13c0ce85277b/go.mod h1:Q6l5svQIhulsqkTQco38HKGCM54Imx7GSIRBASXINAM=
 knative.dev/hack v0.0.0-20220118141833-9b2ed8471e30/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
 knative.dev/hack v0.0.0-20220128200847-51a42b2eb63e/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
-knative.dev/hack v0.0.0-20220201013531-82bfca153560/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
-knative.dev/hack v0.0.0-20220203160821-9b303d690fc9 h1:5BoabmjdxeFOICdkJyMn1n8/ny3kNkVMH/2Iel7/mmI=
-knative.dev/hack v0.0.0-20220203160821-9b303d690fc9/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
-knative.dev/hack/schema v0.0.0-20220128200847-51a42b2eb63e/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
-knative.dev/networking v0.0.0-20220202023132-8ea30455281d/go.mod h1:RzkiJ/LyijMaMUa6tOerhI9lGvQYpfDY0VttqQIX0yk=
-knative.dev/networking v0.0.0-20220203170321-9ce389cb574b h1:z4MMkQxwftOmkItUzKCkg8XhF45oDys08VE08M8nVtM=
-knative.dev/networking v0.0.0-20220203170321-9ce389cb574b/go.mod h1:RzkiJ/LyijMaMUa6tOerhI9lGvQYpfDY0VttqQIX0yk=
+knative.dev/hack v0.0.0-20220209225905-7331bb16ba00/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
+knative.dev/hack v0.0.0-20220215185059-b9cb1983b600/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
+knative.dev/hack v0.0.0-20220216040439-0456e8bf6547 h1:lEWsaG/yMLLp3onNushrawsHFXD4LXCXTo5FUUa2GiU=
+knative.dev/hack v0.0.0-20220216040439-0456e8bf6547/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
+knative.dev/hack/schema v0.0.0-20220215185059-b9cb1983b600/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
+knative.dev/networking v0.0.0-20220215054657-a70f23cc46a5/go.mod h1:2eVOiwcJEuVV6ejtLEhLEpx92veKYthrt+15BN+Cl2w=
+knative.dev/networking v0.0.0-20220216014839-4337f034f4ca h1:1uIKIvGtVIXZD5Om5F78vF6QSD8W7eNLYpSeiwrD5eo=
+knative.dev/networking v0.0.0-20220216014839-4337f034f4ca/go.mod h1:3/iXbjjHxxHyo5F0oBo4NDcKMbbsXADFBnLHMSxqD/o=
 knative.dev/pkg v0.0.0-20220118160532-77555ea48cd4/go.mod h1:etVT7Tm8pSDf4RKhGk4r7j/hj3dNBpvT7bO6a6wpahs=
-knative.dev/pkg v0.0.0-20220129160148-ca64d3b3ea8c/go.mod h1:BML2uvSEBhY/cpEsAyWv1+vLy2fxNk8VDJ9fT+D0tj4=
-knative.dev/pkg v0.0.0-20220131144930-f4b57aef0006/go.mod h1:bZMFTPDPHV3wXuiQ09UJuEGYYQnfpe81MCxNvsMAiJk=
-knative.dev/pkg v0.0.0-20220202132633-b619c92456b9/go.mod h1:bZMFTPDPHV3wXuiQ09UJuEGYYQnfpe81MCxNvsMAiJk=
-knative.dev/pkg v0.0.0-20220203020920-51be315ed160 h1:usHculW2JbADkFNQS8LN3e+sQo2xdJfBaP6/XSvHxQ4=
 knative.dev/pkg v0.0.0-20220203020920-51be315ed160/go.mod h1:bZMFTPDPHV3wXuiQ09UJuEGYYQnfpe81MCxNvsMAiJk=
-knative.dev/reconciler-test v0.0.0-20220126171745-740e77ebaace/go.mod h1:XV4cghzCtdASkfUsfMYSnGfGRyd/naDjy9h7Tnae22g=
-knative.dev/serving v0.29.1-0.20220204002619-fe023e3ac57d h1:3jOex6SPy9x9LCLabo20CGi3wSiKrKpFtux3un7iBb8=
-knative.dev/serving v0.29.1-0.20220204002619-fe023e3ac57d/go.mod h1:Ghcve0KJr4vo+9GkZQaWy2BjhVs4qmwxZW81UxgYaWM=
+knative.dev/pkg v0.0.0-20220210201907-fc93ac76d0b6/go.mod h1:6ZoCgi60jSUn/WrwTGNAZbsz5/kmwiZZD8EovSLzYZ4=
+knative.dev/pkg v0.0.0-20220215153400-3c00bb0157b9 h1:u0vYuNe0BTFvbqN8euaauL/kN3jR7mjmxMc+QRnWsUw=
+knative.dev/pkg v0.0.0-20220215153400-3c00bb0157b9/go.mod h1:6ZoCgi60jSUn/WrwTGNAZbsz5/kmwiZZD8EovSLzYZ4=
+knative.dev/reconciler-test v0.0.0-20220215020657-3f8092fb8739/go.mod h1:m2q6+mGqlPsJ6qP0ssMv3x2UBwIgTdTxgxJ6GK5kgu4=
+knative.dev/serving v0.29.1-0.20220216160340-a1a728763819 h1:PwAQne5EcryvaYLc/I6GqeD045eLibOcEKwmkfX8x+k=
+knative.dev/serving v0.29.1-0.20220216160340-a1a728763819/go.mod h1:Yg+5htyZekyj3HHPUAzl5vaRM8O7ufuiVNugLwd2OoY=
 pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
 rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
diff --git a/hack/generate-docs.go b/hack/generate-docs.go
index fc173d71..ffa2f37b 100644
--- a/hack/generate-docs.go
+++ b/hack/generate-docs.go
@@ -24,6 +24,7 @@ import (
 )
 
 func main() {
+	os.Args = []string{"kn"}
 	rootCmd, err := root.NewRootCommand(nil)
 	if err != nil {
 		log.Panicf("can not create root command: %v", err)
diff --git a/pkg/kn/root/root.go b/pkg/kn/root/root.go
index b1cbcc16..a9147e66 100644
--- a/pkg/kn/root/root.go
+++ b/pkg/kn/root/root.go
@@ -17,6 +17,8 @@ package root
 import (
 	"flag"
 	"fmt"
+	"os"
+	"path/filepath"
 	"strings"
 	"text/template"
 
@@ -51,12 +53,14 @@ func NewRootCommand(helpFuncs *template.FuncMap) (*cobra.Command, error) {
 	p := &commands.KnParams{}
 	p.Initialize()
 
+	rootName := GetBinaryName()
+
 	rootCmd := &cobra.Command{
-		Use:   "kn",
-		Short: "kn manages Knative Serving and Eventing resources",
-		Long: `kn is the command line interface for managing Knative Serving and Eventing resources
+		Use:   rootName,
+		Short: fmt.Sprintf("%s manages Knative Serving and Eventing resources", rootName),
+		Long: fmt.Sprintf(`%s is the command line interface for managing Knative Serving and Eventing resources
 
- Find more information about Knative at: https://knative.dev`,
+Find more information about Knative at: https://knative.dev`, rootName),
 
 		// Disable docs header
 		DisableAutoGenTag: true,
@@ -142,6 +146,7 @@ func NewRootCommand(helpFuncs *template.FuncMap) (*cobra.Command, error) {
 
 // Verify that command groups are not executable and that leaf commands have a run function
 func validateCommandStructure(cmd *cobra.Command) error {
+	rootName := GetBinaryName()
 	for _, childCmd := range cmd.Commands() {
 		if childCmd.HasSubCommands() {
 			if childCmd.RunE != nil || childCmd.Run != nil {
@@ -153,9 +158,9 @@ func validateCommandStructure(cmd *cobra.Command) error {
 			childCmd.RunE = func(aCmd *cobra.Command, args []string) error {
 				subText := fmt.Sprintf("Available sub-commands: %s", strings.Join(ExtractSubCommandNames(subCommands), ", "))
 				if len(args) == 0 {
-					return fmt.Errorf("no sub-command given for 'kn %s'. %s", name, subText)
+					return fmt.Errorf("no sub-command given for '%s %s'. %s", rootName, name, subText)
 				}
-				return fmt.Errorf("unknown sub-command '%s' for 'kn %s'. %s", args[0], aCmd.Name(), subText)
+				return fmt.Errorf("unknown sub-command '%s' for '%s %s'. %s", args[0], rootName, aCmd.Name(), subText)
 			}
 		}
 
@@ -176,3 +181,13 @@ func ExtractSubCommandNames(cmds []*cobra.Command) []string {
 	}
 	return ret
 }
+
+// GetBinaryName returns the actual binary name of the kn cli
+// for example
+// /usr/bin/kn1 service list would return kn1
+// kn service list would return kn
+// mykn service list would return mykn
+func GetBinaryName() string {
+	_, name := filepath.Split(os.Args[0])
+	return name
+}
diff --git a/vendor/knative.dev/eventing/pkg/apis/eventing/v1/trigger_validation.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1/trigger_validation.go
index ac033c1d..65917e9b 100644
--- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1/trigger_validation.go
+++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1/trigger_validation.go
@@ -23,9 +23,11 @@ import (
 	"regexp"
 
 	cesqlparser "github.com/cloudevents/sdk-go/sql/v2/parser"
+	"go.uber.org/zap"
 	corev1 "k8s.io/api/core/v1"
 	"knative.dev/pkg/apis"
 	"knative.dev/pkg/kmp"
+	"knative.dev/pkg/logging"
 
 	"knative.dev/eventing/pkg/apis/feature"
 )
@@ -198,6 +200,14 @@ func ValidateCESQLExpression(ctx context.Context, expression string) (errs *apis
 	if expression == "" {
 		return nil
 	}
+	// Need to recover in case Parse panics
+	defer func() {
+		if r := recover(); r != nil {
+			logging.FromContext(ctx).Debug("Warning! Calling CESQL Parser panicked. Treating expression as invalid.", zap.Any("recovered value", r), zap.String("CESQL", expression))
+			errs = apis.ErrInvalidValue(expression, apis.CurrentField)
+		}
+	}()
+
 	if _, err := cesqlparser.Parse(expression); err != nil {
 		return apis.ErrInvalidValue(expression, apis.CurrentField, err.Error())
 	}
diff --git a/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_validation.go b/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_validation.go
index 7b1b82a0..a29363ca 100644
--- a/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_validation.go
+++ b/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_validation.go
@@ -99,7 +99,7 @@ func (s *Subscription) CheckImmutableFields(ctx context.Context, original *Subsc
 	}
 
 	// Only Subscriber and Reply are mutable.
-	ignoreArguments := cmpopts.IgnoreFields(SubscriptionSpec{}, "Subscriber", "Reply")
+	ignoreArguments := cmpopts.IgnoreFields(SubscriptionSpec{}, "Subscriber", "Reply", "Delivery")
 	if diff, err := kmp.ShortDiff(original.Spec, s.Spec, ignoreArguments); err != nil {
 		return &apis.FieldError{
 			Message: "Failed to diff Subscription",
diff --git a/vendor/knative.dev/hack/README.md b/vendor/knative.dev/hack/README.md
index 570f3709..de565f7c 100644
--- a/vendor/knative.dev/hack/README.md
+++ b/vendor/knative.dev/hack/README.md
@@ -111,7 +111,7 @@ main "$@"
 This is a helper script for Knative E2E test scripts. To use it:
 
 1. [optional] Customize the test cluster. Pass the flags as described
-   [here](../kntest/pkg/kubetest2/gke/README.md) to the `initialize` function
+   [here](../tools/kntest/pkg/kubetest2/gke/README.md) to the `initialize` function
    call if the default values don't fit your needs.
 
 1. Source the script.
diff --git a/vendor/knative.dev/hack/library.sh b/vendor/knative.dev/hack/library.sh
index 17ce662e..8f7b3997 100644
--- a/vendor/knative.dev/hack/library.sh
+++ b/vendor/knative.dev/hack/library.sh
@@ -695,7 +695,7 @@ function go_mod_gopath_hack() {
 # Parameters: $1..$n - parameters passed to the tool.
 function run_kntest() {
   if [[ ! -x "$(command -v kntest)" ]]; then
-    echo "--- FAIL: kntest not installed, please clone knative test-infra repo and run \`go install ./kntest/cmd/kntest\` to install it"; return 1;
+    echo "--- FAIL: kntest not installed, please clone knative test-infra repo and run \`go install ./tools/kntest/cmd/kntest\` to install it"; return 1;
   fi
   kntest "$@"
 }
diff --git a/vendor/knative.dev/hack/release.sh b/vendor/knative.dev/hack/release.sh
index 6eb23299..915a1303 100644
--- a/vendor/knative.dev/hack/release.sh
+++ b/vendor/knative.dev/hack/release.sh
@@ -122,10 +122,10 @@ function git_push() {
    git push "${repo_url}" ${git_args} )
 }
 
-# Return the master version of a release.
+# Return the major+minor version of a release.
 # For example, "v0.2.1" returns "0.2"
 # Parameters: $1 - release version label.
-function master_version() {
+function major_minor_version() {
   local release="${1//v/}"
   local tokens=(${release//\./ })
   echo "${tokens[0]}.${tokens[1]}"
@@ -141,8 +141,7 @@ function hash_from_tag() {
 # Setup the repository upstream, if not set.
 function setup_upstream() {
   # hub and checkout need the upstream URL to be set
-  # TODO(adrcunha): Use "git remote get-url" once available on Prow.
-  local upstream="$(git config --get remote.upstream.url)"
+  local upstream="$(git remote get-url upstream)"
   echo "Remote upstream URL is '${upstream}'"
   if [[ -z "${upstream}" ]]; then
     echo "Setting remote upstream URL to '${REPO_UPSTREAM}'"
@@ -223,7 +222,7 @@ function prepare_dot_release() {
   if [[ -z "${RELEASE_BRANCH}" ]]; then
     echo "Last release is ${last_version}"
     # Determine branch
-    major_minor_version="$(master_version "${last_version}")"
+    major_minor_version="$(major_minor_version "${last_version}")"
     RELEASE_BRANCH="release-${major_minor_version}"
     echo "Last release branch is ${RELEASE_BRANCH}"
   else
@@ -428,7 +427,7 @@ function parse_flags() {
     # TODO(adrcunha): "dot" releases from release branches require releasing nightlies
     # for such branches, which we don't do yet.
     [[ "${RELEASE_VERSION}" =~ ^[0-9]+\.[0-9]+\.0$ ]] || abort "version format must be 'X.Y.0'"
-    RELEASE_BRANCH="release-$(master_version "${RELEASE_VERSION}")"
+    RELEASE_BRANCH="release-$(major_minor_version "${RELEASE_VERSION}")"
     prepare_from_nightly_release
     setup_upstream
   fi
diff --git a/vendor/knative.dev/networking/pkg/network.go b/vendor/knative.dev/networking/pkg/network.go
index aba0902e..522b437f 100644
--- a/vendor/knative.dev/networking/pkg/network.go
+++ b/vendor/knative.dev/networking/pkg/network.go
@@ -189,6 +189,13 @@ const (
 
 	// DefaultExternalSchemeKey is the config for defining the scheme of external URLs.
 	DefaultExternalSchemeKey = "default-external-scheme"
+
+	// ActivatorCAKey is the config for the secret name, which stores CA public certificate used
+	// to sign the activator TLS certificate.
+	ActivatorCAKey = "activator-ca"
+
+	// ActivatorSANKey is the config for the SAN used to validate the activator TLS certificate.
+	ActivatorSANKey = "activator-san"
 )
 
 // DomainTemplateValues are the available properties people can choose from
@@ -287,6 +294,14 @@ type Config struct {
 	// DefaultExternalScheme defines the scheme used in external URLs if AutoTLS is
 	// not enabled. Defaults to "http".
 	DefaultExternalScheme string
+
+	// ActivatorCA defines the secret name of the CA public certificate used to sign the activator TLS certificate.
+	// The traffic is not encrypted if ActivatorCA is empty.
+	ActivatorCA string
+
+	// ActivatorSAN defines the SAN (Subject Alt Name) used to validate the activator TLS certificate.
+	// It is used only when ActivatorCA is specified.
+	ActivatorSAN string
 }
 
 // HTTPProtocol indicates a type of HTTP endpoint behavior
@@ -342,6 +357,8 @@ func defaultConfig() *Config {
 		AutocreateClusterDomainClaims: false,
 		DefaultExternalScheme:         "http",
 		MeshCompatibilityMode:         MeshCompatibilityModeAuto,
+		ActivatorCA:                   "",
+		ActivatorSAN:                  "",
 	}
 }
 
@@ -373,6 +390,8 @@ func NewConfigFromMap(data map[string]string) (*Config, error) {
 		cm.AsBool(AutocreateClusterDomainClaimsKey, &nc.AutocreateClusterDomainClaims),
 		cm.AsBool(EnableMeshPodAddressabilityKey, &nc.EnableMeshPodAddressability),
 		cm.AsString(DefaultExternalSchemeKey, &nc.DefaultExternalScheme),
+		cm.AsString(ActivatorCAKey, &nc.ActivatorCA),
+		cm.AsString(ActivatorSANKey, &nc.ActivatorSAN),
 		asMode(MeshCompatibilityModeKey, &nc.MeshCompatibilityMode),
 		asLabelSelector(NamespaceWildcardCertSelectorKey, &nc.NamespaceWildcardCertSelector),
 	); err != nil {
diff --git a/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_types.go b/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_types.go
index f5427311..959d5e97 100644
--- a/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_types.go
+++ b/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_types.go
@@ -88,11 +88,6 @@ type RevisionSpec struct {
 	// (send network traffic). If unspecified, a system default will be provided.
 	// +optional
 	TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty"`
-
-	// MaxDurationSeconds is the maximum duration in seconds a request will be allowed
-	// to stay open.
-	// +optional
-	MaxDurationSeconds *int64 `json:"maxDurationSeconds,omitempty"`
 }
 
 const (
diff --git a/vendor/knative.dev/serving/pkg/apis/serving/v1/zz_generated.deepcopy.go b/vendor/knative.dev/serving/pkg/apis/serving/v1/zz_generated.deepcopy.go
index 230f6f98..d249e4ff 100644
--- a/vendor/knative.dev/serving/pkg/apis/serving/v1/zz_generated.deepcopy.go
+++ b/vendor/knative.dev/serving/pkg/apis/serving/v1/zz_generated.deepcopy.go
@@ -230,11 +230,6 @@ func (in *RevisionSpec) DeepCopyInto(out *RevisionSpec) {
 		*out = new(int64)
 		**out = **in
 	}
-	if in.MaxDurationSeconds != nil {
-		in, out := &in.MaxDurationSeconds, &out.MaxDurationSeconds
-		*out = new(int64)
-		**out = **in
-	}
 	return
 }
 
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 66f50067..694017b1 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -745,7 +745,7 @@ k8s.io/utils/buffer
 k8s.io/utils/integer
 k8s.io/utils/pointer
 k8s.io/utils/trace
-# knative.dev/eventing v0.29.1-0.20220203222422-fb092415eb36
+# knative.dev/eventing v0.29.1-0.20220216064840-13c0ce85277b
 ## explicit
 knative.dev/eventing/pkg/apis/config
 knative.dev/eventing/pkg/apis/duck
@@ -771,10 +771,10 @@ knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1
 knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake
 knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2
 knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2/fake
-# knative.dev/hack v0.0.0-20220203160821-9b303d690fc9
+# knative.dev/hack v0.0.0-20220216040439-0456e8bf6547
 ## explicit
 knative.dev/hack
-# knative.dev/networking v0.0.0-20220203170321-9ce389cb574b
+# knative.dev/networking v0.0.0-20220216014839-4337f034f4ca
 ## explicit
 knative.dev/networking/pkg
 knative.dev/networking/pkg/apis/networking
@@ -782,7 +782,7 @@ knative.dev/networking/pkg/apis/networking/v1alpha1
 knative.dev/networking/pkg/client/clientset/versioned
 knative.dev/networking/pkg/client/clientset/versioned/scheme
 knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1
-# knative.dev/pkg v0.0.0-20220203020920-51be315ed160
+# knative.dev/pkg v0.0.0-20220215153400-3c00bb0157b9
 ## explicit
 knative.dev/pkg/apis
 knative.dev/pkg/apis/duck
@@ -832,7 +832,7 @@ knative.dev/pkg/tracing/config
 knative.dev/pkg/tracing/propagation
 knative.dev/pkg/tracing/propagation/tracecontextb3
 knative.dev/pkg/tracker
-# knative.dev/serving v0.29.1-0.20220204002619-fe023e3ac57d
+# knative.dev/serving v0.29.1-0.20220216160340-a1a728763819
 ## explicit
 knative.dev/serving/pkg/apis/autoscaling
 knative.dev/serving/pkg/apis/autoscaling/v1alpha1


Test patch:
diff --git a/cmd/kn/main_test.go b/cmd/kn/main_test.go
index 2395bd7d..3435196c 100644
--- a/cmd/kn/main_test.go
+++ b/cmd/kn/main_test.go
@@ -333,6 +333,7 @@ func TestRunWithExit(t *testing.T) {
 func TestExtractCommandPathFromErrorMessage(t *testing.T) {
 	for _, d := range []struct{ arg0, errMsg, expected string }{
 		{"kn", "Invalid argument for 'kn service'", "kn service"},
+		{"kn1", "Invalid argument for 'kn1 service'", "kn1 service"},
 		{"C:\\Users\\hudson.DESKTOP-T61GB27\\Documents\\foo-with-revisions", "Invalid argument for 'C:\\Users\\hudson.DESKTOP-T61GB27\\Documents\\foo-with-revisions test'", "C:\\Users\\hudson.DESKTOP-T61GB27\\Documents\\foo-with-revisions test"},
 	} {
 		assert.Equal(t, extractCommandPathFromErrorMessage(d.errMsg, d.arg0), d.expected)
diff --git a/pkg/kn/root/root_test.go b/pkg/kn/root/root_test.go
index 0ae26266..2fa3a23b 100644
--- a/pkg/kn/root/root_test.go
+++ b/pkg/kn/root/root_test.go
@@ -16,6 +16,7 @@ package root
 
 import (
 	"errors"
+	"os"
 	"strings"
 	"testing"
 
@@ -26,6 +27,7 @@ import (
 )
 
 func TestNewRootCommand(t *testing.T) {
+	os.Args = []string{"kn"}
 	rootCmd, err := NewRootCommand(nil)
 	assert.NilError(t, err)
 	if rootCmd == nil {
@@ -143,3 +145,24 @@ func checkCommandGroup(t *testing.T, commands []string, rootCmd *cobra.Command)
 	assert.Assert(t, err != nil)
 	assert.Assert(t, util.ContainsAll(err.Error(), "deeper", "unknown", "sub-command", cmd.Name()))
 }
+
+func TestRootCommandForBinaryNames(t *testing.T) {
+	for _, test := range []struct {
+		arg        string
+		binaryName string
+	}{
+		{"kn", "kn"},
+		{"kn1", "kn1"},
+		{"/usr/bin/mykn", "mykn"},
+	} {
+		os.Args = []string{test.arg}
+		rootCmd, err := NewRootCommand(nil)
+		assert.NilError(t, err)
+		if rootCmd == nil {
+			t.Fatal("rootCmd = nil, want not nil")
+		}
+
+		assert.Equal(t, rootCmd.Name(), test.binaryName)
+	}
+
+}
diff --git a/vendor/knative.dev/serving/pkg/testing/v1/service.go b/vendor/knative.dev/serving/pkg/testing/v1/service.go
index 1f3aae83..589b90bf 100644
--- a/vendor/knative.dev/serving/pkg/testing/v1/service.go
+++ b/vendor/knative.dev/serving/pkg/testing/v1/service.go
@@ -182,13 +182,6 @@ func WithRevisionTimeoutSeconds(revisionTimeoutSeconds int64) ServiceOption {
 	}
 }
 
-// WithMaxDurationSeconds sets revision max duration timeout
-func WithMaxDurationSeconds(maxDurationSeconds int64) ServiceOption {
-	return func(service *v1.Service) {
-		service.Spec.Template.Spec.MaxDurationSeconds = ptr.Int64(maxDurationSeconds)
-	}
-}
-
 // WithServiceAccountName sets revision service account name
 func WithServiceAccountName(serviceAccountName string) ServiceOption {
 	return func(service *v1.Service) {
diff --git a/vendor/knative.dev/serving/test/README.md b/vendor/knative.dev/serving/test/README.md
index 7c11be23..0086aeb1 100644
--- a/vendor/knative.dev/serving/test/README.md
+++ b/vendor/knative.dev/serving/test/README.md
@@ -100,13 +100,10 @@ go test -tags=e2e -count=1 ./test/conformance/... \
 
 ## Running performance tests
 
-Each performance test case in Knative serving is a benchmark, to run these
-benchmarks, please follow
-[dev.md](https://github.com/knative/serving/blob/main/test/performance/dev.md).
+Performance tests using [kperf](https://github.com/knative-sandbox/kperf) can be run in
+a pull request using the optional test job `/test pull-knative-serving-performance-tests-kperf`
 
-> As of now, only Googlers can run these benchmarks due to one issue of
-> [Mako](https://github.com/google/mako) - the benchmarking tool we use. Details
-> can be found in the [issue report](https://github.com/google/mako/issues/2).
+A report will be generated in the artifacts folder of the test run.
 
 ### Running a single test case
 
diff --git a/vendor/knative.dev/serving/test/conformance.go b/vendor/knative.dev/serving/test/conformance.go
index 57782de5..526d57e6 100644
--- a/vendor/knative.dev/serving/test/conformance.go
+++ b/vendor/knative.dev/serving/test/conformance.go
@@ -36,7 +36,6 @@ import (
 const (
 	// Test image names
 	Autoscale           = "autoscale"
-	EmptyDir            = "emptydir"
 	Failing             = "failing"
 	GRPCPing            = "grpc-ping"
 	HelloHTTP2          = "hellohttp2"
@@ -53,6 +52,7 @@ const (
 	SidecarContainer    = "sidecarcontainer"
 	SingleThreadedImage = "singlethreaded"
 	Timeout             = "timeout"
+	Volumes             = "volumes"
 	WorkingDir          = "workingdir"
 
 	// Constants for test image output.
diff --git a/vendor/knative.dev/serving/test/e2e-common.sh b/vendor/knative.dev/serving/test/e2e-common.sh
index 5648fe56..e2e2902d 100644
--- a/vendor/knative.dev/serving/test/e2e-common.sh
+++ b/vendor/knative.dev/serving/test/e2e-common.sh
@@ -56,6 +56,8 @@ export SYSTEM_NAMESPACE="${SYSTEM_NAMESPACE:-$(uuidgen | tr 'A-Z' 'a-z')}"
 readonly REPLICAS=3
 readonly BUCKETS=10
 
+export PVC=${PVC:-1}
+
 # Receives the latest serving version and searches for the same version with major and minor and searches for the latest patch
 function latest_net_istio_version() {
   local serving_version=$1
@@ -295,6 +297,10 @@ function install() {
     YTT_FILES+=("${REPO_ROOT_DIR}/test/config/ytt/kind/ingress/${ingress}-kind.yaml")
   fi
 
+  if (( PVC )); then
+    YTT_FILES+=("${REPO_ROOT_DIR}/test/config/pvc/pvc.yaml")
+  fi
+
   local ytt_result=$(mktemp)
   local ytt_post_install_result=$(mktemp)
   local ytt_flags=""
diff --git a/vendor/knative.dev/serving/test/e2e-networking-library.sh b/vendor/knative.dev/serving/test/e2e-networking-library.sh
index f2b83c64..b849dbcd 100644
--- a/vendor/knative.dev/serving/test/e2e-networking-library.sh
+++ b/vendor/knative.dev/serving/test/e2e-networking-library.sh
@@ -26,7 +26,7 @@ function stage_gateway_api_resources() {
   mkdir -p "${gateway_dir}"
 
   # TODO: if we switch to istio 1.12 we can reuse stage_istio_head
-  curl -sL https://istio.io/downloadIstioctl | ISTIO_VERSION=1.11.4 sh -
+  curl -sL https://istio.io/downloadIstioctl | ISTIO_VERSION=1.12.2 sh -
 
   local params="--set values.global.proxy.clusterDomain=${CLUSTER_DOMAIN}"
   if (( KIND )); then
diff --git a/vendor/knative.dev/serving/test/e2e-tests.sh b/vendor/knative.dev/serving/test/e2e-tests.sh
index 4fc6f283..8b6a415e 100644
--- a/vendor/knative.dev/serving/test/e2e-tests.sh
+++ b/vendor/knative.dev/serving/test/e2e-tests.sh
@@ -121,6 +121,15 @@ go_test_e2e -timeout=2m ./test/e2e/initcontainers ${TEST_OPTIONS} || failed=1
 toggle_feature kubernetes.podspec-init-containers Disabled
 toggle_feature kubernetes.podspec-volumes-emptydir Disabled
 
+# RUN PVC tests with default storage class.
+toggle_feature kubernetes.podspec-persistent-volume-claim Enabled
+toggle_feature kubernetes.podspec-persistent-volume-write Enabled
+toggle_feature kubernetes.podspec-securitycontext Enabled
+go_test_e2e -timeout=5m ./test/e2e/pvc ${TEST_OPTIONS} || failed=1
+toggle_feature kubernetes.podspec-securitycontext Disabled
+toggle_feature kubernetes.podspec-persistent-volume-write Disabled
+toggle_feature kubernetes.podspec-persistent-volume-claim Disabled
+
 # Run HA tests separately as they're stopping core Knative Serving pods.
 # Define short -spoofinterval to ensure frequent probing while stopping pods.
 toggle_feature autocreateClusterDomainClaims true config-network || fail_test
diff --git a/vendor/knative.dev/serving/test/e2e-upgrade-tests.sh b/vendor/knative.dev/serving/test/e2e-upgrade-tests.sh
index 396c821f..e3daf63a 100644
--- a/vendor/knative.dev/serving/test/e2e-upgrade-tests.sh
+++ b/vendor/knative.dev/serving/test/e2e-upgrade-tests.sh
@@ -40,7 +40,8 @@ function stage_test_resources() {
 # Script entry point.
 
 # Skip installing istio as an add-on.
-initialize "$@" --skip-istio-addon  --min-nodes=4 --max-nodes=4 --cluster-version=1.21 \
+# Skip installing a pvc as it is not used in upgrade tests
+PVC=0 initialize "$@" --skip-istio-addon  --min-nodes=4 --max-nodes=4 --cluster-version=1.21 \
   --install-latest-release
 
 # TODO(#2656): Reduce the timeout after we get this test to consistently passing.