You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are different text / format of error printed if tkn couldn't reach the cluster, in this case I am using OCP and I need to re-login to cluster to access the cluster. Listing below error messages I received listing different resources.
16:53 ➜ catalog git:(master) ✗ tkn task list
No tasks found
Error: Unauthorized
Usage:
tkn task list [flags]
Aliases:
list, ls
Flags:
--allow-missing-template-keys If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help help for list
-o, --output string Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.
--template string Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
Global Flags:
-k, --kubeconfig string kubectl config file (default: $HOME/.kube/config)
-n, --namespace string namespace to use (default: from $KUBECONFIG)
16:53 ➜ catalog git:(master) ✗ tkn taskrun list
Failed to list taskruns from default namespace
Error: Unauthorized
Usage:
tkn taskrun list [flags]
Aliases:
list, ls
Examples:
# List all TaskRuns of Task name 'foo'
tkn taskrun list foo -n bar
# List all taskruns in a namespaces 'foo'
tkn tr list -n foo \n",
Flags:
--allow-missing-template-keys If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help help for list
-l, --limit int limit taskruns listed (default: return all taskruns)
-o, --output string Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.
--template string Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
Global Flags:
-k, --kubeconfig string kubectl config file (default: $HOME/.kube/config)
-n, --namespace string namespace to use (default: from $KUBECONFIG)
16:53 ➜ catalog git:(master) ✗ tkn resource list
Failed to list pipelineresources from default namespace
Error: Unauthorized
16:53 ➜ catalog git:(master) ✗ tkn pipelinerun list
Failed to list pipelineruns from default namespace
Error: Unauthorized
Usage:
tkn pipelinerun list [flags]
Aliases:
list, ls
Examples:
# List all PipelineRuns of Pipeline name 'foo'
tkn pipelinerun list foo -n bar
# List all pipelineruns in a namespaces 'foo'
tkn pr list -n foo",
Flags:
--allow-missing-template-keys If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help help for list
-l, --limit int limit pipelineruns listed (default: return all pipelineruns)
-o, --output string Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.
--template string Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
Global Flags:
-k, --kubeconfig string kubectl config file (default: $HOME/.kube/config)
-n, --namespace string namespace to use (default: from $KUBECONFIG)
16:53 ➜ catalog git:(master) ✗ tkn pipeline list
Failed to list pipelines from default namespace
Error: Unauthorized
16:54 ➜ catalog git:(master) ✗ tkn clustertask list
No clustertasks found
Error: Unauthorized
Usage:
tkn clustertask list [flags]
Aliases:
list, ls
Flags:
--allow-missing-template-keys If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help help for list
-o, --output string Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.
--template string Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
Global Flags:
-k, --kubeconfig string kubectl config file (default: $HOME/.kube/config)
-n, --namespace string namespace to use (default: from $KUBECONFIG)
Notice the different error messages printed
Printing help text immediately after the error makes it difficult to locate the actual error, should printing help text be disabled if error occurs ?
✗ tkn version
Client version: 0.3.1
The text was updated successfully, but these errors were encountered:
Thanks for finding this and reporting it. Of note here, the help message (i.e. list of all the options for a command) will go away from error messages with #292.
So this issue comes down to changing the text for error messages returned.
There are different text / format of error printed if
tkn
couldn't reach the cluster, in this case I am using OCP and I need to re-login to cluster to access the cluster. Listing below error messages I received listing different resources.The text was updated successfully, but these errors were encountered: