-
Notifications
You must be signed in to change notification settings - Fork 370
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-7804] - LinodeVolumeCreateForm crash (for real this time) #10235
Conversation
@@ -176,6 +167,7 @@ export const LinodeVolumeCreateForm = (props: Props) => { | |||
<ConfigSelect | |||
disabled={disabled} | |||
error={touched.config_id ? errors.config_id : undefined} | |||
key={linode.id} |
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.
this is the only change to this file - the rest of the diff was reverting the previous fix (not of it in production)
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.
Confirmed no more crash in the Linode Create Volume Drawer and that /volumes/create
still works
Description 📝
This PR fixes a bad bug crashing the application when attempting to create a volume from the linode detail (storage tab).
follow up to #10225 which did not fix it completely
The
useEffect
in question was attempting to select a default value for the config select component and set the value for the field, creating an infinite loop with the label validation of the formik form (expecting a non-falsy value).It is a bit a of weird bug, which did not surface before the react 18 update and the way useEffect was optimized. I can't say I fully understand the clash between our
formik
initial values,setFieldValue
and our validation patterns. The fix here is to avoid the useEffect all togetherDue to another interesting fact, the e2e test was not breaking as a result, perhaps due to the click methods timing differences between a user click and a
CY.click()
.Changes 🔄
Preview 📷
How to test 🧪
Reproduction steps
Verification steps
Also
As an Author I have considered 🤔
Check all that apply