-
Notifications
You must be signed in to change notification settings - Fork 361
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
fix: [M3-7630] - Fix Kubernetes Upgrade Flow #10057
fix: [M3-7630] - Fix Kubernetes Upgrade Flow #10057
Conversation
if (nextVersion === null) { | ||
return 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.
Because the React Query cache updates immediately when the PUT request happens to update the Cluster's version, it caused nextVersion
to become null, which is expected behavior. This caused the dialog to stop rendering. We need the dialog to remain open even though the version update was successful so that we can show them step 2 of recycling their nodes.
I'm sure there are other ways to fix this (for example: restructuring the Dialogs), but I took the most simple approach for the time being
if (!nextVersion) { | ||
setError('Your Kubernetes Cluster is already on the latest version.'); | ||
return; | ||
} |
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.
Rather than using a non-null assertion, we'll show this error. This case should never really happen
Coverage Report: ✅ |
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.
Thanks Banks! Thanks for fixing this test too 🤦♂️
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.
Thanks for fixing this 🔧
Description 📝
The Bug 🐛
null
in our upgrade component when we still need to render step 2The Solution 🔧
null
if the Kubernetes version is up to date. We must continue to render the component so that the user can reach step 2, which is recycling the nodes.Preview 📷
Screen.Recording.2024-01-10.at.6.12.29.PM.mov
Screen.Recording.2024-01-10.at.5.41.44.PM.mov
How to test 🧪
Reproduction steps
Verification steps
As an Author I have considered 🤔