From 5d4a8d451a2b21b3cf09841cb6a83ff0c95a3b0f Mon Sep 17 00:00:00 2001 From: Gunjan Vyas Date: Tue, 23 Nov 2021 18:00:59 +0530 Subject: [PATCH 1/3] Fixed panic in kn service describe --- pkg/kn/commands/revision/describe.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/kn/commands/revision/describe.go b/pkg/kn/commands/revision/describe.go index 346ad7eac1..599dca1256 100644 --- a/pkg/kn/commands/revision/describe.go +++ b/pkg/kn/commands/revision/describe.go @@ -162,7 +162,12 @@ func WriteImage(dw printers.PrefixWriter, revision *servingv1.Revision) { // Check if the user image is likely a more user-friendly description pinnedDesc := "at" userImage := clientserving.UserImage(&revision.ObjectMeta) - imageDigest := revision.Status.ContainerStatuses[0].ImageDigest + + containerStatuses := revision.Status.ContainerStatuses + var imageDigest string + if len(containerStatuses) > 0 { + imageDigest = containerStatuses[0].ImageDigest + } if userImage != "" && imageDigest != "" { var parts []string if strings.Contains(image, "@") { From 35ec6eedf1b2bba41a998fc9c68f7a65b7cfb6e0 Mon Sep 17 00:00:00 2001 From: Gunjan Vyas Date: Tue, 23 Nov 2021 18:10:33 +0530 Subject: [PATCH 2/3] Added changelog entry --- CHANGELOG.adoc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 25b5da69f3..7eb26d6b78 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -12,6 +12,17 @@ | https://github.com/knative/client/pull/[#] //// +## v1.0.1 +[cols="1,10,3", options="header", width="100%"] +|=== +| | Description | PR + +| 🐛 +| Fixed panic in kn service describe +| https://github.com/knative/client/pull/1529[#1529] + +|=== + ## v1.0.0 (2021-11-02) [cols="1,10,3", options="header", width="100%"] |=== From 86b62a905d217023de6603a19a4aa918582765fd Mon Sep 17 00:00:00 2001 From: Gunjan Vyas Date: Tue, 23 Nov 2021 20:14:10 +0530 Subject: [PATCH 3/3] Update CHANGELOG.adoc Co-authored-by: David Simansky --- CHANGELOG.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 7eb26d6b78..5c5e884456 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -12,7 +12,7 @@ | https://github.com/knative/client/pull/[#] //// -## v1.0.1 +## v1.1.0 (Unreleased) [cols="1,10,3", options="header", width="100%"] |=== | | Description | PR