client icon indicating copy to clipboard operation
client copied to clipboard

Distinguish missing Serving/Eventing API from unsupported version

Open dsimansk opened this issue 2 years ago • 8 comments

Feature request

In the current implementation when kn is unable to query Knative resource, we display combined "no or newer" error on missing API or incompatible API.

Per feedback from users, that might be confusing how to approach the troubleshooting of such issue with the Knative installation.

Error: no or newer Knative Serving API found on the backend, please verify the installation or update the 'kn' client

Use case

There are 2 main scenarios to cover:

  1. There's no Knative Serving/Eventing API found on the cluster. This might be mangled installation, operators still installing, missing CRDs, controllers not up.
Error: no Knative Serving API found on the backend, please verify the installation
  1. The incompatible API version, e.g. removed v1alpha1 and therefore backend x kn mismatch.
Error: incompatible Knative Serving API found on the backend, please verify the installation or update the 'kn' client to matchin version

/cc @rhuss

dsimansk avatar Aug 24 '23 13:08 dsimansk

For scenario 1, I guess or udpdate the kn client won't help :-)

rhuss avatar Aug 25 '23 09:08 rhuss

For scenario 1, I guess or udpdate the kn client won't help :-)

Yep, fixed the proposed errors.

dsimansk avatar Aug 25 '23 12:08 dsimansk

/assign @xiangpingjiang

xiangpingjiang avatar Aug 30 '23 16:08 xiangpingjiang

@dsimansk Hello, David

To resolve this issue, my idea is when client gets an no or newer Knative Serving API found on the backend error, client need to get all knative crds installed in the cluster, if there is a crd same with requested resource but different version, the error becomes incompatible Knative Serving API found on the backend, otherwise the error becomes no Knative Serving API found on the backend .

Do you think is it ok ?

xiangpingjiang avatar Sep 12 '23 15:09 xiangpingjiang

Sounds good, I think you can get over the /apis endpoint and I also think its good enough to check whether there is a KService resource in any version, then --> "no Knative API found", otherwise just assume that that there is a version mismatch (the only other possible error),. so no need to really check the version.

rhuss avatar Sep 13 '23 07:09 rhuss

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Dec 13 '23 01:12 github-actions[bot]

/remove-lifecycle stale

rhuss avatar Dec 14 '23 14:12 rhuss

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Mar 14 '24 02:03 github-actions[bot]