Repository: knative/client
Pull request #1500 (2021-11-01 13:17:20)

Mark deprecated options as 'hidden'
so that they do not appear in the help messages

codecov[bot]: # [Codecov](https://codecov.io/gh/knative/client/pull/1500?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative) Report
> Merging [#1500](https://codecov.io/gh/knative/client/pull/1500?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative) (0f6e459) into [main](https://codecov.io/gh/knative/client/commit/d8d0ee1e6e1013a9ed69b9328fc3c5fcf27a5dc6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative) (d8d0ee1) will **increase** coverage by `0.01%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/knative/client/pull/1500/graphs/tree.svg?width=650&height=150&src=pr&token=bkTp6BzJiV&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative)](https://codecov.io/gh/knative/client/pull/1500?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative)

```diff
@@            Coverage Diff             @@
##             main    #1500      +/-   ##
==========================================
+ Coverage   79.32%   79.33%   +0.01%     
==========================================
  Files         162      162              
  Lines        8501     8508       +7     
==========================================
+ Hits         6743     6750       +7     
  Misses       1076     1076              
  Partials      682      682              
```


| [Impacted Files](https://codecov.io/gh/knative/client/pull/1500?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative) | Coverage Δ | |
|---|---|---|
| [pkg/kn/commands/container/add.go](https://codecov.io/gh/knative/client/pull/1500/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative#diff-cGtnL2tuL2NvbW1hbmRzL2NvbnRhaW5lci9hZGQuZ28=) | `94.73% <100.00%> (ø)` | |
| [...kg/kn/commands/service/configuration\_edit\_flags.go](https://codecov.io/gh/knative/client/pull/1500/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative#diff-cGtnL2tuL2NvbW1hbmRzL3NlcnZpY2UvY29uZmlndXJhdGlvbl9lZGl0X2ZsYWdzLmdv) | `80.47% <100.00%> (+0.23%)` | :arrow_up: |
| [pkg/kn/flags/podspec.go](https://codecov.io/gh/knative/client/pull/1500/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative#diff-cGtnL2tuL2ZsYWdzL3BvZHNwZWMuZ28=) | `77.05% <100.00%> (+0.55%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/knative/client/pull/1500?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/knative/client/pull/1500?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative). Last update [db3bcbc...0f6e459](https://codecov.io/gh/knative/client/pull/1500?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=knative).


Patch:
diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc
index 3ca11e2f..3ea22c68 100644
--- a/CHANGELOG.adoc
+++ b/CHANGELOG.adoc
@@ -18,12 +18,17 @@
 | | Description | PR
 
 | ✨
-| Deprecate `--autoscale-window` in favor of `--scale-window`
-| https://github.com/knative/client/pull/1454[#1454]
+| Add more explanation to missing API error message
+| https://github.com/knative/client/pull/1497[#1497]
 
 | ✨
 | Deprecate `--concurrency-target` and `--concurrency-utilization` in favor of `--scale-target` and `--scale-utilization`, respectively
-| https://github.com/knative/client/pull/1454[#1454]
+| https://github.com/knative/client/pull/1490[#1490]
+
+| ✨
+| Deprecate `--autoscale-window` in favor of `--scale-window`
+| https://github.com/knative/client/pull/1489[#1489]
+
 |===
 
 ## v0.26.0 (2021-09-22)
diff --git a/docs/cmd/kn_container_add.md b/docs/cmd/kn_container_add.md
index 36e33a11..9dcc71be 100644
--- a/docs/cmd/kn_container_add.md
+++ b/docs/cmd/kn_container_add.md
@@ -35,7 +35,6 @@ kn container add NAME
       --env-file string              Path to a file containing environment variables (e.g. --env-file=/home/knative/service1/env).
       --env-from stringArray         Add environment variables from a ConfigMap (prefix cm: or config-map:) or a Secret (prefix secret:). Example: --env-from cm:myconfigmap or --env-from secret:mysecret. You can use this flag multiple times. To unset a ConfigMap/Secret reference, append "-" to the name, e.g. --env-from cm:myconfigmap-.
       --env-value-from stringArray   Add environment variable from a value of key in ConfigMap (prefix cm: or config-map:) or a Secret (prefix sc: or secret:). Example: --env-value-from NAME=cm:myconfigmap:key or --env-value-from NAME=secret:mysecret:key. You can use this flag multiple times. To unset a value from a ConfigMap/Secret key reference, append "-" to the key, e.g. --env-value-from ENV-.
-      --extra-containers string      Deprecated, use --containers instead.
   -h, --help                         help for add
       --image string                 Image to run.
       --limit strings                The resource requirement limits for this Service. For example, 'cpu=100m,memory=256Mi'. You can use this flag multiple times. To unset a resource limit, append "-" to the resource name, e.g. '--limit memory-'.
diff --git a/docs/cmd/kn_service_apply.md b/docs/cmd/kn_service_apply.md
index a1187a58..064ffaa4 100644
--- a/docs/cmd/kn_service_apply.md
+++ b/docs/cmd/kn_service_apply.md
@@ -33,18 +33,14 @@ kn service apply s0 --filename my-svc.yml
       --annotation-revision stringArray   Revision annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). This flag takes precedence over the "annotation" flag.
       --annotation-service stringArray    Service annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). This flag takes precedence over the "annotation" flag.
       --arg stringArray                   Add argument to the container command. Example: --arg myArg1 --arg --myArg2 --arg myArg3=3. You can use this flag multiple times.
-      --autoscale-window string           Deprecated option, please use --scale-window
       --cluster-local                     Specify that the service be private. (--no-cluster-local will make the service publicly available)
       --cmd stringArray                   Specify command to be used as entrypoint instead of default one. Example: --cmd /app/start or --cmd sh --cmd /app/start.sh or --cmd /app/start --arg myArg to pass additional arguments.
       --concurrency-limit int             Hard Limit of concurrent requests to be processed by a single replica.
-      --concurrency-target int            Deprecated, use --scale-target instead.
-      --concurrency-utilization int       Deprecated, use --scale-utilization instead. (default 70)
       --containers string                 Specify path to file including definition for additional containers, alternatively use '-' to read from stdin. Example: --containers ./containers.yaml or --containers -.
   -e, --env stringArray                   Environment variable to set. NAME=value; you may provide this flag any number of times to set multiple environment variables. To unset, specify the environment variable name followed by a "-" (e.g., NAME-).
       --env-file string                   Path to a file containing environment variables (e.g. --env-file=/home/knative/service1/env).
       --env-from stringArray              Add environment variables from a ConfigMap (prefix cm: or config-map:) or a Secret (prefix secret:). Example: --env-from cm:myconfigmap or --env-from secret:mysecret. You can use this flag multiple times. To unset a ConfigMap/Secret reference, append "-" to the name, e.g. --env-from cm:myconfigmap-.
       --env-value-from stringArray        Add environment variable from a value of key in ConfigMap (prefix cm: or config-map:) or a Secret (prefix sc: or secret:). Example: --env-value-from NAME=cm:myconfigmap:key or --env-value-from NAME=secret:mysecret:key. You can use this flag multiple times. To unset a value from a ConfigMap/Secret key reference, append "-" to the key, e.g. --env-value-from ENV-.
-      --extra-containers string           Deprecated, use --containers instead.
   -f, --filename string                   Create a service from file. The created service can be further modified by combining with other options. For example, -f /path/to/file --env NAME=value adds also an environment variable.
       --force                             Create service forcefully, replaces existing service if any.
   -h, --help                              help for apply
diff --git a/docs/cmd/kn_service_create.md b/docs/cmd/kn_service_create.md
index 596e5dde..af2e7cbb 100644
--- a/docs/cmd/kn_service_create.md
+++ b/docs/cmd/kn_service_create.md
@@ -58,18 +58,14 @@ kn service create NAME --image IMAGE
       --annotation-revision stringArray   Revision annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). This flag takes precedence over the "annotation" flag.
       --annotation-service stringArray    Service annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). This flag takes precedence over the "annotation" flag.
       --arg stringArray                   Add argument to the container command. Example: --arg myArg1 --arg --myArg2 --arg myArg3=3. You can use this flag multiple times.
-      --autoscale-window string           Deprecated option, please use --scale-window
       --cluster-local                     Specify that the service be private. (--no-cluster-local will make the service publicly available)
       --cmd stringArray                   Specify command to be used as entrypoint instead of default one. Example: --cmd /app/start or --cmd sh --cmd /app/start.sh or --cmd /app/start --arg myArg to pass additional arguments.
       --concurrency-limit int             Hard Limit of concurrent requests to be processed by a single replica.
-      --concurrency-target int            Deprecated, use --scale-target instead.
-      --concurrency-utilization int       Deprecated, use --scale-utilization instead. (default 70)
       --containers string                 Specify path to file including definition for additional containers, alternatively use '-' to read from stdin. Example: --containers ./containers.yaml or --containers -.
   -e, --env stringArray                   Environment variable to set. NAME=value; you may provide this flag any number of times to set multiple environment variables. To unset, specify the environment variable name followed by a "-" (e.g., NAME-).
       --env-file string                   Path to a file containing environment variables (e.g. --env-file=/home/knative/service1/env).
       --env-from stringArray              Add environment variables from a ConfigMap (prefix cm: or config-map:) or a Secret (prefix secret:). Example: --env-from cm:myconfigmap or --env-from secret:mysecret. You can use this flag multiple times. To unset a ConfigMap/Secret reference, append "-" to the name, e.g. --env-from cm:myconfigmap-.
       --env-value-from stringArray        Add environment variable from a value of key in ConfigMap (prefix cm: or config-map:) or a Secret (prefix sc: or secret:). Example: --env-value-from NAME=cm:myconfigmap:key or --env-value-from NAME=secret:mysecret:key. You can use this flag multiple times. To unset a value from a ConfigMap/Secret key reference, append "-" to the key, e.g. --env-value-from ENV-.
-      --extra-containers string           Deprecated, use --containers instead.
   -f, --filename string                   Create a service from file. The created service can be further modified by combining with other options. For example, -f /path/to/file --env NAME=value adds also an environment variable.
       --force                             Create service forcefully, replaces existing service if any.
   -h, --help                              help for create
diff --git a/docs/cmd/kn_service_update.md b/docs/cmd/kn_service_update.md
index 07313c1d..5e0c6787 100644
--- a/docs/cmd/kn_service_update.md
+++ b/docs/cmd/kn_service_update.md
@@ -47,18 +47,14 @@ kn service update NAME
       --annotation-revision stringArray   Revision annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). This flag takes precedence over the "annotation" flag.
       --annotation-service stringArray    Service annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). This flag takes precedence over the "annotation" flag.
       --arg stringArray                   Add argument to the container command. Example: --arg myArg1 --arg --myArg2 --arg myArg3=3. You can use this flag multiple times.
-      --autoscale-window string           Deprecated option, please use --scale-window
       --cluster-local                     Specify that the service be private. (--no-cluster-local will make the service publicly available)
       --cmd stringArray                   Specify command to be used as entrypoint instead of default one. Example: --cmd /app/start or --cmd sh --cmd /app/start.sh or --cmd /app/start --arg myArg to pass additional arguments.
       --concurrency-limit int             Hard Limit of concurrent requests to be processed by a single replica.
-      --concurrency-target int            Deprecated, use --scale-target instead.
-      --concurrency-utilization int       Deprecated, use --scale-utilization instead. (default 70)
       --containers string                 Specify path to file including definition for additional containers, alternatively use '-' to read from stdin. Example: --containers ./containers.yaml or --containers -.
   -e, --env stringArray                   Environment variable to set. NAME=value; you may provide this flag any number of times to set multiple environment variables. To unset, specify the environment variable name followed by a "-" (e.g., NAME-).
       --env-file string                   Path to a file containing environment variables (e.g. --env-file=/home/knative/service1/env).
       --env-from stringArray              Add environment variables from a ConfigMap (prefix cm: or config-map:) or a Secret (prefix secret:). Example: --env-from cm:myconfigmap or --env-from secret:mysecret. You can use this flag multiple times. To unset a ConfigMap/Secret reference, append "-" to the name, e.g. --env-from cm:myconfigmap-.
       --env-value-from stringArray        Add environment variable from a value of key in ConfigMap (prefix cm: or config-map:) or a Secret (prefix sc: or secret:). Example: --env-value-from NAME=cm:myconfigmap:key or --env-value-from NAME=secret:mysecret:key. You can use this flag multiple times. To unset a value from a ConfigMap/Secret key reference, append "-" to the key, e.g. --env-value-from ENV-.
-      --extra-containers string           Deprecated, use --containers instead.
   -h, --help                              help for update
       --image string                      Image to run.
   -l, --label stringArray                 Labels to set for both Service and Revision. name=value; you may provide this flag any number of times to set multiple labels. To unset, specify the label name followed by a "-" (e.g., name-).
diff --git a/docs/cmd/kn_source_container_create.md b/docs/cmd/kn_source_container_create.md
index a7cd5ac5..f2c730ea 100644
--- a/docs/cmd/kn_source_container_create.md
+++ b/docs/cmd/kn_source_container_create.md
@@ -24,7 +24,6 @@ kn source container create NAME --image IMAGE --sink SINK
       --env-file string              Path to a file containing environment variables (e.g. --env-file=/home/knative/service1/env).
       --env-from stringArray         Add environment variables from a ConfigMap (prefix cm: or config-map:) or a Secret (prefix secret:). Example: --env-from cm:myconfigmap or --env-from secret:mysecret. You can use this flag multiple times. To unset a ConfigMap/Secret reference, append "-" to the name, e.g. --env-from cm:myconfigmap-.
       --env-value-from stringArray   Add environment variable from a value of key in ConfigMap (prefix cm: or config-map:) or a Secret (prefix sc: or secret:). Example: --env-value-from NAME=cm:myconfigmap:key or --env-value-from NAME=secret:mysecret:key. You can use this flag multiple times. To unset a value from a ConfigMap/Secret key reference, append "-" to the key, e.g. --env-value-from ENV-.
-      --extra-containers string      Deprecated, use --containers instead.
   -h, --help                         help for create
       --image string                 Image to run.
       --limit strings                The resource requirement limits for this Service. For example, 'cpu=100m,memory=256Mi'. You can use this flag multiple times. To unset a resource limit, append "-" to the resource name, e.g. '--limit memory-'.
diff --git a/docs/cmd/kn_source_container_update.md b/docs/cmd/kn_source_container_update.md
index 672eb5a3..cff08abc 100644
--- a/docs/cmd/kn_source_container_update.md
+++ b/docs/cmd/kn_source_container_update.md
@@ -24,7 +24,6 @@ kn source container update NAME --image IMAGE
       --env-file string              Path to a file containing environment variables (e.g. --env-file=/home/knative/service1/env).
       --env-from stringArray         Add environment variables from a ConfigMap (prefix cm: or config-map:) or a Secret (prefix secret:). Example: --env-from cm:myconfigmap or --env-from secret:mysecret. You can use this flag multiple times. To unset a ConfigMap/Secret reference, append "-" to the name, e.g. --env-from cm:myconfigmap-.
       --env-value-from stringArray   Add environment variable from a value of key in ConfigMap (prefix cm: or config-map:) or a Secret (prefix sc: or secret:). Example: --env-value-from NAME=cm:myconfigmap:key or --env-value-from NAME=secret:mysecret:key. You can use this flag multiple times. To unset a value from a ConfigMap/Secret key reference, append "-" to the key, e.g. --env-value-from ENV-.
-      --extra-containers string      Deprecated, use --containers instead.
   -h, --help                         help for update
       --image string                 Image to run.
       --limit strings                The resource requirement limits for this Service. For example, 'cpu=100m,memory=256Mi'. You can use this flag multiple times. To unset a resource limit, append "-" to the resource name, e.g. '--limit memory-'.
diff --git a/pkg/errors/errors.go b/pkg/errors/errors.go
index e58f3b4c..fba16e25 100644
--- a/pkg/errors/errors.go
+++ b/pkg/errors/errors.go
@@ -17,12 +17,15 @@ package errors
 import (
 	"fmt"
 	"strings"
+	"unicode"
+	"unicode/utf8"
 )
 
-func newInvalidCRD(apiGroup string) *KNError {
+func NewInvalidCRD(apiGroup string) *KNError {
 	parts := strings.Split(apiGroup, ".")
 	name := parts[0]
-	msg := fmt.Sprintf("no Knative %s API found on the backend, please verify the installation", name)
+	msg := fmt.Sprintf("no or newer Knative %s API found on the backend, please verify the installation or "+
+		"update the 'kn' client", firstCharToUpper(name))
 	return NewKNError(msg)
 }
 
@@ -37,3 +40,11 @@ func newNoRouteToHost(errString string) *KNError {
 func newNoKubeConfig(errString string) *KNError {
 	return NewKNError("no kubeconfig has been provided, please use a valid configuration to connect to the cluster")
 }
+
+func firstCharToUpper(s string) string {
+	if len(s) == 0 {
+		return s
+	}
+	r, n := utf8.DecodeRuneInString(s)
+	return string(unicode.ToUpper(r)) + s[n:]
+}
diff --git a/pkg/errors/factory.go b/pkg/errors/factory.go
index 0c8428f8..279e1912 100644
--- a/pkg/errors/factory.go
+++ b/pkg/errors/factory.go
@@ -54,7 +54,7 @@ func newStatusError(err error) error {
 	}
 	var knerr *KNError
 	if isCRDError(errAPIStatus) {
-		knerr = newInvalidCRD(errAPIStatus.Status().Details.Group)
+		knerr = NewInvalidCRD(errAPIStatus.Status().Details.Group)
 		knerr.Status = errAPIStatus
 		return knerr
 	}
diff --git a/pkg/kn/commands/channel/list_types.go b/pkg/kn/commands/channel/list_types.go
index aa75f9ff..94450422 100644
--- a/pkg/kn/commands/channel/list_types.go
+++ b/pkg/kn/commands/channel/list_types.go
@@ -17,7 +17,6 @@ package channel
 
 import (
 	"context"
-	"fmt"
 
 	"github.com/spf13/cobra"
 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
@@ -66,7 +65,7 @@ func NewChannelListTypesCommand(p *commands.KnParams) *cobra.Command {
 				channelListTypes = &unstructured.UnstructuredList{}
 			}
 			if !listTypesFlags.GenericPrintFlags.OutputFlagSpecified() && len(channelListTypes.Items) == 0 {
-				return fmt.Errorf("no channels found on the backend, please verify the installation")
+				return knerrors.NewInvalidCRD("Channels")
 			}
 
 			if channelListTypes.GroupVersionKind().Empty() {
diff --git a/pkg/kn/commands/service/configuration_edit_flags.go b/pkg/kn/commands/service/configuration_edit_flags.go
index c54add5b..52461481 100644
--- a/pkg/kn/commands/service/configuration_edit_flags.go
+++ b/pkg/kn/commands/service/configuration_edit_flags.go
@@ -103,6 +103,7 @@ func (p *ConfigurationEditFlags) addSharedFlags(command *cobra.Command) {
 	// DEPRECATED since 1.0
 	command.Flags().StringVar(&p.ScaleWindow, "autoscale-window", "", "Deprecated option, please use --scale-window")
 	p.markFlagMakesRevision("autoscale-window")
+	command.Flags().MarkHidden("autoscale-window")
 
 	command.Flags().StringVar(&p.ScaleWindow, "scale-window", "", "Duration to look back for making auto-scaling decisions. The service is scaled to zero if no request was received in during that time. (eg: 10s)")
 	p.markFlagMakesRevision("scale-window")
@@ -114,6 +115,7 @@ func (p *ConfigurationEditFlags) addSharedFlags(command *cobra.Command) {
 	command.Flags().IntVar(&p.ScaleTarget, "concurrency-target", 0,
 		"Deprecated, use --scale-target instead.")
 	p.markFlagMakesRevision("concurrency-target")
+	command.Flags().MarkHidden("concurrency-target")
 
 	command.Flags().IntVar(&p.ScaleTarget, "scale-target", 0,
 		"Recommendation for when to scale up based on the concurrent number of incoming request. "+
@@ -128,6 +130,7 @@ func (p *ConfigurationEditFlags) addSharedFlags(command *cobra.Command) {
 	command.Flags().IntVar(&p.ScaleUtilization, "concurrency-utilization", 70,
 		"Deprecated, use --scale-utilization instead.")
 	p.markFlagMakesRevision("concurrency-utilization")
+	command.Flags().MarkHidden("concurrency-utilization")
 
 	command.Flags().IntVar(&p.ScaleUtilization, "scale-utilization", 70,
 		"Percentage of concurrent requests utilization before scaling up.")
diff --git a/pkg/kn/commands/source/list_types.go b/pkg/kn/commands/source/list_types.go
index 172fef12..f0fbb110 100644
--- a/pkg/kn/commands/source/list_types.go
+++ b/pkg/kn/commands/source/list_types.go
@@ -16,7 +16,6 @@ package source
 
 import (
 	"context"
-	"fmt"
 
 	"knative.dev/client/pkg/sources"
 
@@ -68,7 +67,7 @@ func NewListTypesCommand(p *commands.KnParams) *cobra.Command {
 			}
 
 			if !listTypesFlags.GenericPrintFlags.OutputFlagSpecified() && len(sourceListTypes.Items) == 0 {
-				return fmt.Errorf("no sources found on the backend, please verify the installation")
+				return knerrors.NewInvalidCRD("Sources")
 			}
 
 			if sourceListTypes.GroupVersionKind().Empty() {
diff --git a/pkg/kn/flags/podspec.go b/pkg/kn/flags/podspec.go
index 9dd3d5ef..0dee6dc4 100644
--- a/pkg/kn/flags/podspec.go
+++ b/pkg/kn/flags/podspec.go
@@ -132,6 +132,7 @@ func (p *PodSpecFlags) AddFlags(flagset *pflag.FlagSet) []string {
 	// DEPRECATED since 1.0
 	flagset.StringVarP(&p.ExtraContainers, "extra-containers", "", "",
 		"Deprecated, use --containers instead.")
+	flagset.MarkHidden("extra-containers")
 	flagNames = append(flagNames, "containers")
 
 	flagset.StringVarP(&p.ExtraContainers, "containers", "", "",


Test patch:
diff --git a/pkg/errors/errors_test.go b/pkg/errors/errors_test.go
index 6ed50073..ba94738f 100644
--- a/pkg/errors/errors_test.go
+++ b/pkg/errors/errors_test.go
@@ -17,17 +17,18 @@ package errors
 import (
 	"testing"
 
+	"knative.dev/client/pkg/util"
+
 	"gotest.tools/v3/assert"
 )
 
 func TestNewInvalidCRD(t *testing.T) {
-	err := newInvalidCRD("serving.knative.dev")
-	assert.Error(t, err, "no Knative serving API found on the backend, please verify the installation")
-
-	err = newInvalidCRD("eventing")
-	assert.Error(t, err, "no Knative eventing API found on the backend, please verify the installation")
+	err := NewInvalidCRD("serving.knative.dev")
+	assert.Assert(t, util.ContainsAll(err.Error(), "no or newer Knative Serving API found on the backend", "please verify the installation", "update", "'kn'"))
 
-	err = newInvalidCRD("")
-	assert.Error(t, err, "no Knative  API found on the backend, please verify the installation")
+	err = NewInvalidCRD("eventing")
+	assert.Assert(t, util.ContainsAll(err.Error(), "no or newer Knative Eventing API found on the backend", "please verify the installation", "update", "'kn'"))
 
+	err = NewInvalidCRD("")
+	assert.Assert(t, util.ContainsAll(err.Error(), "no or newer Knative  API found on the backend", "please verify the installation", "update", "'kn'"))
 }
diff --git a/pkg/errors/factory_test.go b/pkg/errors/factory_test.go
index 93a5e925..1a5e6956 100644
--- a/pkg/errors/factory_test.go
+++ b/pkg/errors/factory_test.go
@@ -61,7 +61,7 @@ func TestKnErrorsStatusErrors(t *testing.T) {
 				}
 				return statusError
 			},
-			ExpectedMsg: "no Knative serving API found on the backend, please verify the installation",
+			ExpectedMsg: "no or newer Knative Serving API found on the backend, please verify the installation or update the 'kn' client",
 			Validate: func(t *testing.T, err error, msg string) {
 				assert.Error(t, err, msg)
 			},
diff --git a/pkg/kn/commands/channel/list_types_test.go b/pkg/kn/commands/channel/list_types_test.go
index d3d73f31..49d4e055 100644
--- a/pkg/kn/commands/channel/list_types_test.go
+++ b/pkg/kn/commands/channel/list_types_test.go
@@ -68,7 +68,7 @@ func TestChannelListTypesNoChannelInstalled(t *testing.T) {
 
 	_, err := channelFakeCmd([]string{"channel", "list-types"}, dynamicClient)
 	assert.Check(t, err != nil)
-	assert.Check(t, util.ContainsAll(err.Error(), "no channels found on the backend, please verify the installation"))
+	assert.Check(t, util.ContainsAll(err.Error(), "no", "Knative Channels", "found", "backend", "verify", "installation"))
 }
 
 func TestChannelListTypesNoChannelWithJsonOutput(t *testing.T) {
@@ -86,7 +86,7 @@ func TestChannelListTypesErrorDynamicClient(t *testing.T) {
 
 	_, err := channelFakeCmd([]string{"channel", "list-types"}, dynamicClient)
 	assert.Check(t, err != nil)
-	assert.Check(t, util.ContainsAll(err.Error(), "no channels found on the backend, please verify the installation"))
+	assert.Check(t, util.ContainsAll(err.Error(), "no", "Knative Channels", "found", "backend", "verify", "installation"))
 }
 
 func TestChannelListTypes(t *testing.T) {
diff --git a/pkg/kn/commands/source/list_test.go b/pkg/kn/commands/source/list_test.go
index 38744441..9a568f6a 100644
--- a/pkg/kn/commands/source/list_test.go
+++ b/pkg/kn/commands/source/list_test.go
@@ -56,7 +56,7 @@ func sourceFakeCmd(args []string, objects ...runtime.Object) (output []string, e
 func TestSourceListTypesNoSourcesInstalled(t *testing.T) {
 	_, err := sourceFakeCmd([]string{"source", "list-types"})
 	assert.Check(t, err != nil)
-	assert.Check(t, util.ContainsAll(err.Error(), "no sources", "found", "backend", "verify", "installation"))
+	assert.Check(t, util.ContainsAll(err.Error(), "no", "Knative Sources", "found", "backend", "verify", "installation"))
 }
 
 func TestSourceListTypesNoSourcesWithJsonOutput(t *testing.T) {