Description of problem: The web console does not display the reported error messages from a webhook denial when trying to update the cluster version using the modal interface. Version-Release number of selected component (if applicable): 4.9.23 (first noticed, possibly earlier versions) How reproducible: Always Steps to Reproduce: 1. Create webhook to block changes the "clusterversions" (https://github.com/openshift/managed-cluster-validating-webhooks/blob/master/build/selectorsyncset.yaml#L307-L318) 2. Attempt to update cluster from web console update modal (/settings/cluster) Actual results: No visual indication of failure; only a 403 error message in the browser's Developer Console Expected results: Report and show an error message in the web console update modal Additional info: This is a big UX issue for managed OSD/ROSA clusters. This is a regression from previous functionality (the update cluster UI used to show the webhook failure message)
> This is a regression from previous functionality (the update cluster UI used to show the webhook failure message). To my knowledge and review of the code, the Cluster Settings page has never displayed a webhook failure message. The alerts for 4.9 are visible at https://github.com/openshift/console/blob/42f3a0ca9d6e1a33a7e86b09ead80483b9b631e2/frontend/public/components/cluster-settings/cluster-settings.tsx#L885-L906. Can you provide more detail on this previous functionality? If this is not a regression, this should be converted to an RFE by * creating an issue of Feature Request Type and User Interface Component in https://issues.redhat.com/projects/RFE * closing this bug with the link to the new Jira RFE issue Thanks.
On a 4.5.11 cluster, I was able to get the expected webhook error message. On more recent versions (as recent as 4.7) this no longer seems to be the case. This is a huge usability regression. I don't have the time to validate the number of expected things on each OCP version, so clearly this is something that was lost along the way, but needs to be restored. Please refer to my attached screenshot
Created attachment 1892465 [details] Screenshot of expected webhook error message
Thanks for the screenshot! That is very helpful to know where the error was displaying (in the modal and not at the top of the Cluster Settings page).
Ya Dan, given the severity and need to back port all the way to 4.7, can you please prioritize this bug for verification? Thanks!
Created attachment 1894837 [details] screenshot of error 1. build a local console, hard code `desiredRecommendedUpdate` variable in /frontend/public/components/modals/cluster-update-modal.tsx to some string(invalid type) const desiredRecommendedUpdate = "teststring"; 2. in 'Update cluster' modal, when we choose one recommended version and hit 'Update' button, we can see inline errors Danger alert:An error occurred Error "Invalid value: "string": spec.desiredUpdate in body must be of type object: "string"" for field "spec.desiredUpdate". in javascript console, we can also see errors handlePromise failed in component : HttpError: Error "Invalid value: "string": spec.desiredUpdate in body must be of type object: "string"" for field "spec.desiredUpdate". the issue is fixed, however the bug can not be moved to VERIFIED since no nightly build contains the fix PR yet
Changing the release target to 4.11.z since this fix was merged to master but did yet make it to release-4.11.
Whoops. Should have changed the release target to 4.12.0. Fixed.
Ya Dan, you should be able to verify against a 4.12 build since the fix snuck in right after 4.11 code freeze. I've opened a https://bugzilla.redhat.com/show_bug.cgi?id=2104951 to cover back porting to 4.11.z.
$ oc adm release info registry.ci.openshift.org/ocp/release:4.12.0-0.nightly-2022-07-07-144231 --pullspecs | grep console console quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:f7892259292b0a490dd62684befdda835695720cdadb203f440cf357d700120a console-operator quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:9aa22923ef9693c614e9ab4c87594628d10af8cdbd7b90490b26dfe63a1a196b $ oc image info quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:f7892259292b0a490dd62684befdda835695720cdadb203f440cf357d700120a | grep commit io.openshift.build.commit.id=3cdfe94d26cac8345eab1b9a24f77a8c4ad90a8c io.openshift.build.commit.url=https://github.com/openshift/console/commit/3cdfe94d26cac8345eab1b9a24f77a8c4ad90a8c $ git log 3cdfe94d26cac8345eab1b9a24f77a8c4ad90a8c | grep '#11762' Merge pull request #11762 from rhamilto/bz2096350 fix PR is included in 4.12.0-0.nightly-2022-07-07-144231
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 (Important: OpenShift Container Platform 4.11.0 bug fix and security update), 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/RHSA-2022:5069