Bug 1794940 - Monitoring Dashboards: Runtime error in SingleState component when prometheus query returned error [openshift-4.4]
Summary: Monitoring Dashboards: Runtime error in SingleState component when prometheus...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.4.0
Assignee: Andrew Pickering
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-25 17:20 UTC by Samuel Padgett
Modified: 2020-05-04 11:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Version: 4.4.0-0.ci-2020-01-24-013659 Cluster ID: 76eb6597-d42e-47f6-b0a7-1f27ca8a9f13 Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0
Last Closed: 2020-05-04 11:26:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
js-error (129.86 KB, image/png)
2020-02-06 14:34 UTC, Yanping Zhang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 4116 0 None closed Bug 1794940: Monitoring Dashboards: Fix JavaScript error when API call fails 2020-04-22 08:42:33 UTC
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:27:10 UTC

Description Samuel Padgett 2020-01-25 17:20:07 UTC
This is difficult to reproduce, but I saw an error page when one of the queries failed on the dashboard. We are passed an Object to the Alert component instead of a string.

> found: Error: Call to /api/prometheus/api/v1/query?query=1+-+avg%28rate%28node_cpu_seconds_total%7Bmode%3D%22idle%22%2C+cluster%3D%22%22%7D%5B1m%5D%29%29 timed out after 20000ms

This appears to be the SingleStat component.

Warning: Failed prop type: Invalid prop `children` supplied to `Alert`, expected a ReactNode.
    in Alert (created by Context.Consumer)
    in ComponentWithOuia (created by Context.Consumer)
    in Unknown (created by ErrorAlert)
    in ErrorAlert (created by SingleStat)
    in SingleStat (created by Card_)
    in div (created by CardBody)
    in CardBody
    in Unknown (created by Card_)
    in article (created by Card)
    in Card
    in Unknown (created by Card_)
    in div (created by Card_)
    in Card_ (created by ConnectFunction)
    in ConnectFunction (created by Board)
    in div (created by Board)
    in Board (created by MonitoringDashboardsPage_)
    in div (created by Dashboard)
    in Dashboard (created by MonitoringDashboardsPage_)
    in MonitoringDashboardsPage_ (created by ConnectFunction)
    in ConnectFunction
    in ErrorBoundary
    in Unknown (created by Context.Consumer)
    in Route (created by MonitoringUI)
    in Switch (created by MonitoringUI)
    in MonitoringUI (created by AsyncComponent)
    in AsyncComponent (created by Context.Consumer)
    in Route (created by LazyRoute)
    in LazyRoute (created by AppContents_)
    in Switch (created by AppContents_)
    in div (created by AppContents_)
    in div (created by AppContents_)
    in section (created by PageSection)
    in PageSection (created by AppContents_)
    in AppContents_ (created by ConnectFunction)
    in ConnectFunction (created by ConnectFunction)
    in ConnectFunction (created by App)
    in div (created by DrawerContent)
    in DrawerContent (created by NotificationDrawer)
    in div (created by Drawer)
    in Drawer (created by NotificationDrawer)
    in NotificationDrawer (created by ConnectedNotificationDrawer_)
    in ConnectedNotificationDrawer_ (created by ConnectFunction)
    in ConnectFunction (created by AsyncComponent)
    in AsyncComponent (created by NotificationDrawer)
    in NotificationDrawer (created by App)
    in Unknown
    in Unknown (created by ConnectFunction)
    in ConnectFunction (created by Firehose)
    in Firehose (created by ConnectFunction)
    in ConnectFunction (created by App)
    in main (created by Page)
    in div (created by Page)
    in Page (created by App)
    in App (created by Context.Consumer)
    in Route
    in Router
    in Provider

Objects are not valid as a React child (found: Error: Call to /api/prometheus/api/v1/query?query=1+-+avg%28rate%28node_cpu_seconds_total%7Bmode%3D%22idle%22%2C+cluster%3D%22%22%7D%5B1m%5D%29%29 timed out after 20000ms.). If you meant to render a collection of children, use an array instead. in div (created by Alert) in div (created by Alert) in Alert (created by Context.Consumer) in ComponentWithOuia (created by Context.Consumer) in Unknown (created by ErrorAlert) in ErrorAlert (created by SingleStat) in SingleStat (created by Card_) in div (created by CardBody) in CardBody in Unknown (created by Card_) in article (created by Card) in Card in Unknown (created by Card_) in div (created by Card_) in Card_ (created by ConnectFunction) in ConnectFunction (created by Board) in div (created by Board) in Board (created by MonitoringDashboardsPage_) in div (created by Dashboard) in Dashboard (created by MonitoringDashboardsPage_) in MonitoringDashboardsPage_ (created by ConnectFunction) in ConnectFunction in ErrorBoundary in Unknown (created by Context.Consumer) in Route (created by MonitoringUI) in Switch (created by MonitoringUI) in MonitoringUI (created by AsyncComponent) in AsyncComponent (created by Context.Consumer) in Route (created by LazyRoute) in LazyRoute (created by AppContents_) in Switch (created by AppContents_) in div (created by AppContents_) in div (created by AppContents_) in section (created by PageSection) in PageSection (created by AppContents_) in AppContents_ (created by ConnectFunction) in ConnectFunction (created by ConnectFunction) in ConnectFunction (created by App) in div (created by DrawerContent) in DrawerContent (created by NotificationDrawer) in div (created by Drawer) in Drawer (created by NotificationDrawer) in NotificationDrawer (created by ConnectedNotificationDrawer_) in ConnectedNotificationDrawer_ (created by ConnectFunction) in ConnectFunction (created by AsyncComponent) in AsyncComponent (created by NotificationDrawer) in NotificationDrawer (created by App) in Unknown in Unknown (created by ConnectFunction) in ConnectFunction (created by Firehose) in Firehose (created by ConnectFunction) in ConnectFunction (created by App) in main (created by Page) in div (created by Page) in Page (created by App) in App (created by Context.Consumer) in Route in Router in Provider

in div (created by Alert)
    in div (created by Alert)
    in Alert (created by Context.Consumer)
    in ComponentWithOuia (created by Context.Consumer)
    in Unknown (created by ErrorAlert)
    in ErrorAlert (created by SingleStat)
    in SingleStat (created by Card_)
    in div (created by CardBody)
    in CardBody
    in Unknown (created by Card_)
    in article (created by Card)
    in Card
    in Unknown (created by Card_)
    in div (created by Card_)
    in Card_ (created by ConnectFunction)
    in ConnectFunction (created by Board)
    in div (created by Board)
    in Board (created by MonitoringDashboardsPage_)
    in div (created by Dashboard)
    in Dashboard (created by MonitoringDashboardsPage_)
    in MonitoringDashboardsPage_ (created by ConnectFunction)
    in ConnectFunction
    in ErrorBoundary
    in Unknown (created by Context.Consumer)
    in Route (created by MonitoringUI)
    in Switch (created by MonitoringUI)
    in MonitoringUI (created by AsyncComponent)
    in AsyncComponent (created by Context.Consumer)
    in Route (created by LazyRoute)
    in LazyRoute (created by AppContents_)
    in Switch (created by AppContents_)
    in div (created by AppContents_)
    in div (created by AppContents_)
    in section (created by PageSection)
    in PageSection (created by AppContents_)
    in AppContents_ (created by ConnectFunction)
    in ConnectFunction (created by ConnectFunction)
    in ConnectFunction (created by App)
    in div (created by DrawerContent)
    in DrawerContent (created by NotificationDrawer)
    in div (created by Drawer)
    in Drawer (created by NotificationDrawer)
    in NotificationDrawer (created by ConnectedNotificationDrawer_)
    in ConnectedNotificationDrawer_ (created by ConnectFunction)
    in ConnectFunction (created by AsyncComponent)
    in AsyncComponent (created by NotificationDrawer)
    in NotificationDrawer (created by App)
    in Unknown
    in Unknown (created by ConnectFunction)
    in ConnectFunction (created by Firehose)
    in Firehose (created by ConnectFunction)
    in ConnectFunction (created by App)
    in main (created by Page)
    in div (created by Page)
    in Page (created by App)
    in App (created by Context.Consumer)
    in Route
    in Router
    in Provider

Comment 2 Yanping Zhang 2020-02-06 14:33:48 UTC
Checked on ocp 4.4 env with payload 4.4.0-0.nightly-2020-02-06-072311
Now could not get promethus data successfully, and there is error info such as:
" An error occurred
Call to /api/prometheus/api/v1/query?query=count+by+%28job%2C+instance%2C+version%29+%28prometheus_build_info%7Bjob%3D%7E%22%22%2C+instance%3D%7E%22%22%7D%29 timed out after 20000ms."
Seems the string is similar with that in the bug description, but the error in dev console is not the same, pls refer to the screenshot.
The original js error in the bug description has disappeared, does it mean the bug is fixed?

Comment 3 Yanping Zhang 2020-02-06 14:34:36 UTC
Created attachment 1658227 [details]
js-error

Comment 4 Samuel Padgett 2020-02-11 13:22:12 UTC
The error you see in the console is expected. By default, the JS console will show failed HTTP requests. If the UI renders, it means the bug is fixed. Thanks!

Comment 5 Yanping Zhang 2020-02-12 07:35:00 UTC
Thanks for confirmation.
According to Comment 3 and Comment 4, checked on OCP 4.4 env with payload 4.4.0-0.nightly-2020-02-11-200858 again, the bug is fixed.

Comment 7 errata-xmlrpc 2020-05-04 11:26:45 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


Note You need to log in before you can comment on or make changes to this bug.