Bug 1833218 - Monitoring: Silence Form: "State updates from the useState() and useReducer() Hooks don't support the second callback argument" warning
Summary: Monitoring: Silence Form: "State updates from the useState() and useReducer()...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.5.0
Assignee: Andrew Pickering
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-08 05:31 UTC by Andrew Pickering
Modified: 2020-07-13 17:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-13 17:36:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 5357 0 None closed Bug 1833218: Monitoring: Fix JS warnings when updating some silence form fields 2020-06-24 02:10:11 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:36:28 UTC

Description Andrew Pickering 2020-05-08 05:31:53 UTC
When changing the values of some fields on the silence form, you get the following JavaScript warning.

Warning: State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().

Comment 3 Yadan Pei 2020-05-09 07:00:27 UTC
1. Confirm 4.5.0-0.nightly-2020-05-09-003922 has included bug fix
# oc adm release info registry.svc.ci.openshift.org/ocp/release:4.5.0-0.nightly-2020-05-09-003922 --pullspecs | grep console
  console                                        quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:b4b07b50a9b4ac8695c445d76df6e8bbbfd8a0972988e87db2955a50ed9be90a
  console-operator                               quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:3e7658b9eed326c33e271547c4c3622a8b505b04502014bacc9cedb71e7edbb0
# oc image info quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:b4b07b50a9b4ac8695c445d76df6e8bbbfd8a0972988e87db2955a50ed9be90a | grep commit
             io.openshift.build.commit.id=b818091c904b3e0dc27290142a982e36ed36222a
             io.openshift.build.commit.url=https://github.com/openshift/console/commit/b818091c904b3e0dc27290142a982e36ed36222a
# git log b818091c904b3e0dc27290142a982e36ed36222a | grep '#5357'
    Merge pull request #5357 from kyoto/monitoring-silence-set-state-warnings

2. Go to silence form page /monitoring/silences/~new, press F12 to open developer console
3. Toggle changes such as Start Immediately, add Labels and other info, during this process we didn't see the error in bug description


Moving to verified 4.5.0-0.nightly-2020-05-09-003922

Comment 4 errata-xmlrpc 2020-07-13 17:36:10 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:2409


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