Cause: Both knative Service and regular k8s service is of same kind "Service" so action meny/Kebeb option shows up for k8s Service which should only show for knative Service
Consequence: "Set Traffic Distribution" action on Service causes runtime error
Fix: Avoid check on kind directly and have made use of referenceForModel instead of directly checking for kind (it give apiGrouop~apiVersion~Kind which is unique)
Result: Action menu works correctly for both knative Service as well as k8s Service
Created attachment 1656346[details]
Runtime error in console
Steps to reproduce:
* Go to search view.
* Find a service. You should be able to reproduce with service console in openshift-console.
* Select "Set Traffic Distribution" from the kebab
Result:
You see a runtime error in the JS console.
TypeError: "resources.configurations is undefined"
getKnativeServiceData knative-topology-utils.ts:103
transformTrafficSplitingData traffic-splitting-utils.ts:29
Controller TrafficSplittingController.tsx:22
React 22
result modal.tsx:25
createModal modal.tsx:16
createModalLauncher modal.tsx:62
setTrafficDistributionModal index.ts:2
Comment 1Andrew Ballantyne
2020-01-29 19:18:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2020:0581
Created attachment 1656346 [details] Runtime error in console Steps to reproduce: * Go to search view. * Find a service. You should be able to reproduce with service console in openshift-console. * Select "Set Traffic Distribution" from the kebab Result: You see a runtime error in the JS console. TypeError: "resources.configurations is undefined" getKnativeServiceData knative-topology-utils.ts:103 transformTrafficSplitingData traffic-splitting-utils.ts:29 Controller TrafficSplittingController.tsx:22 React 22 result modal.tsx:25 createModal modal.tsx:16 createModalLauncher modal.tsx:62 setTrafficDistributionModal index.ts:2