Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing Error Message from kn service describe When Revision Not Available #823

Closed
danielhelfand opened this issue May 4, 2020 · 2 comments · Fixed by #825
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@danielhelfand
Copy link
Contributor

danielhelfand commented May 4, 2020

Bug report

When using kn service describe on a Service where the Revision is not available, the following error message is returned:

resource name may not be empty

It would be helpful to display a more informative error message or display that the Revision is not ready as part of the describe command.

Debugging this locally, this error comes from completeWithLatestRevisions and is returned here:

image

It appears an empty string is being passed to GetRevision causing the error.

Expected behavior

kn service describe should describe the Service without issue. Also, regardless of the root of this issue, there should be more information about why this error message is occurring.

Steps to reproduce the problem

Find a way to create a Service with a Revision stuck in a pending state:

$ kn service list
NAME            URL                                                                                     LATEST
  AGE     CONDITIONS   READY     REASON
helloworld-go   http://helloworld-go.deploy-your-first-application-using-knative-w01-s001.example.com
  6m49s   0 OK / 3     Unknown   RevisionMissing : Configuration "helloworld-go" is waiting for a Revision to b
ecome ready.

Run kn service describe on the service.

kn version

Version:      v0.14.0
Build Date:   2020-04-22 08:56:32
Git Revision: c41e9fd
Supported APIs:
* Serving
  - serving.knative.dev/v1 (knative-serving v0.14.0)
* Eventing
  - sources.knative.dev/v1alpha2 (knative-eventing v0.14.1)
  - eventing.knative.dev/v1alpha1 (knative-eventing v0.14.1)

Knative (serving/eventing) version

Serving: v0.14.0

@danielhelfand danielhelfand added the kind/bug Categorizes issue or PR as related to a bug. label May 4, 2020
@rhuss
Copy link
Contributor

rhuss commented May 5, 2020

Thanks, for the report, good find. We should address this for the next release. Volunteers ?

@danielhelfand
Copy link
Contributor Author

danielhelfand commented May 5, 2020

Would be happy to pick it up if no one is working on it. Not sure if keeping the empty string in any capacity would be worth it? It's coming from LatestReadyRevisionName. Would just skipping the empty string be appropriate?

if revisionsSeen.Has(revisionName) || revisionName == "" {
    continue
}

Edit:

Seems to work if the revisionName is skipped in this case:

$ ./kn service describe helloworld-go -n deploy-your-first-application-using-knative-w01-s001
Name:       helloworld-go
Namespace:  deploy-your-first-application-using-knative-w01-s001
Age:        16h
URL:        http://helloworld-go.deploy-your-first-application-using-knative-w01-s001.example.com

Revisions:  
     ?  helloworld-go-4wr5b (latest created) [1] (16h)
        Image:  gcr.io/knative-samples/helloworld-go (at 5ea96b)

Conditions:  
  OK TYPE                   AGE REASON
  ?? Ready                  16h RevisionMissing
  ?? ConfigurationsReady    16h 
  ?? RoutesReady            16h RevisionMissing

@navidshaikh navidshaikh added this to the v0.15.0 milestone May 14, 2020
coryrc pushed a commit to coryrc/client that referenced this issue May 14, 2020
knative#823)

* Add dynamic flaky reporting for jobs with less tests

* Fix issues with dynamic flaky reporting thresholds

* update test configs for new flaky logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants