-
Notifications
You must be signed in to change notification settings - Fork 605
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 1856267: Fix crash (white screen) when cancel Pipeline Create with open sidebar #5918
Bug 1856267: Fix crash (white screen) when cancel Pipeline Create with open sidebar #5918
Conversation
setSelectedTask(null); | ||
selectedTaskRef.current = null; | ||
props.handleReset(); | ||
}, [props]); |
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.
why not destructure handleReset
as well? Now useCallback dependency is on all the props instead of just being on handleReset
?
setSelectedTask(null); | |
selectedTaskRef.current = null; | |
props.handleReset(); | |
}, [props]); | |
setSelectedTask(null); | |
selectedTaskRef.current = null; | |
handleReset(); | |
}, [handleReset]); |
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.
👍 Done
859ceb8
to
fbf4052
Compare
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.
/lgtm
verified locally. works as expected.
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.
/assign
LGTM. Sad to have had this issue in the first place, but I think it's easier to back port this change than do the needed change (push the data into Formik). So I'll work on that in my cleanup validation PR once I find a moment to code again haha.
setSelectedTask(null); | ||
selectedTaskRef.current = null; |
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.
Not a fan of this solution. It looks wrong but it seems to be a fault of the way the Pipeline Builder was written by me back in 4.4. I think this is an okay solution to back port. In 4.6, I'll fix it another way in #4805 when I rebase it and clean it up.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewballantyne, jerolimov, sahil143 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 |
@jerolimov: All pull requests linked via external trackers have merged: . Bugzilla bug 1856267 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. |
/cherry-pick release-4.5 |
@jerolimov: new pull request created: #5958 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-4275
Analysis / Root cause:
When creating a pipeline, open a sidebar and press cancel the Console "crashes" and shows just a white screen.
Cause is that the state was resetted and the pipeline was rendered without the required formik data.
Solution Description:
Deselected the task for the sidebar so that the sidebar content was not rerendered with missing informations.
Screen shots / Gifs for design review:
Before:
After:
Unit test coverage report:
No new tests, no test changed
Test setup:
When creating a pipeline, open a sidebar and press cancel the Console "crashes" and shows just a white screen.
Browser conformance: