New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 1834774: Solve React warning when closing Traffic Splitting dialog #5406
Bug 1834774: Solve React warning when closing Traffic Splitting dialog #5406
Conversation
@jerolimov: This pull request references Bugzilla bug 1834774, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hi @jerolimov. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
/assign @invincibleJai |
/retest |
493c274
to
e732c9e
Compare
interface TrafficSplittingModalProps { | ||
revisionItems: RevisionItems; | ||
cancel: () => void; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could extend the interface with the underlying ModalComponentProps
which has these modal related props.
interface TrafficSplittingModalProps { | |
revisionItems: RevisionItems; | |
cancel: () => void; | |
} | |
interface TrafficSplittingModalProps { | |
revisionItems: RevisionItems; | |
} |
@@ -10,12 +10,13 @@ import { RevisionItems } from '../../utils/traffic-splitting-utils'; | |||
|
|||
interface TrafficSplittingModalProps { | |||
revisionItems: RevisionItems; | |||
cancel: () => void; | |||
} | |||
|
|||
type Props = FormikProps<FormikValues> & TrafficSplittingModalProps; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type Props = FormikProps<FormikValues> & TrafficSplittingModalProps; | |
type Props = FormikProps<FormikValues> & TrafficSplittingModalProps & ModalComponentProps; | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting idea, I'll force push this, thanks 👍
e732c9e
to
2d2517d
Compare
/retest |
Verified locally, i dont see the warnings anymore. |
"Can't perform a React state update" happend because the Dialog resets the formik state after unmounting it. Just close it instead.
2d2517d
to
052511d
Compare
@karthikjeeyar Force pushed the changes with fixed commit email address. |
/lgtm |
/approve Thanks @jerolimov , verified works as expected |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: invincibleJai, jerolimov, karthikjeeyar The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Flaky test (timeout) /retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@jerolimov: All pull requests linked via external trackers have merged: openshift/console#5406. Bugzilla bug 1834774 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fixes:
https://issues.redhat.com/browse/ODC-2356
Analysis / Root cause:
"Can't perform a React state update" warning happend because the Dialog resets the formik state after unmounting it.
Solution Description:
Just close the dialog instead. Similar to some other modal dialogs, like:
https://github.com/openshift/console/blob/master/frontend/packages/dev-console/src/components/modals/EditApplicationModal.tsx#L61
Test setup:
Not changed a test
Browser conformance: