-
Notifications
You must be signed in to change notification settings - Fork 364
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
feat: [M3-7121 & M3-7122] - Support VPC in Linode Add/Edit Config dialog #9709
feat: [M3-7121 & M3-7122] - Support VPC in Linode Add/Edit Config dialog #9709
Conversation
2241b8e
to
e325b51
Compare
…rface dropdown in Add/Edit Config dialog; casing adjustments for some variable names
… and fully fixed formatting
packages/manager/src/features/Linodes/LinodesDetail/LinodeConfigs/LinodeConfigDialog.tsx
Show resolved
Hide resolved
Observed some instances of errors not surfacing, so the error mapping still needs tweaking |
For endpoints that take a list of interfaces, if one of the interfaces has an API error, that should be indicated in the With regards to the error when you uncheck the VPC IPv4 autoassign checkbox but don't input a VPC IPv4: I am going to make a separate ticket to handle that situation and will work on that today. |
…d weird spacing in Add/Edit Linode Config dialog; make noWrap on VPC IPv4 checkbox text conditional so tooltip isn't obscured
…hub.com/hana-linode/manager into M3-7121-vpc-add-config-dialog-and-table
Functionality from above that I checked off still looks good + the error on the Subnet Assign Linodes Drawer is fixed and I saw the tickets for the other error surfacing issues 🚀 One other thing I'm noticing is that when we edit a Linode's configuration details to include or delete a VPC related interface, the configuration will update, but other information won't until we refresh - something to do with query invalidation/the query cache, most likely? https://github.com/linode/manager/assets/139280159/9150f54e-7507-4afc-a172-7eddb6d055c7 (Actually this reminds me about the issue for freshly deleted linodes still appearing in VPCs -- let me make a ticket for that so it doesn't get lost 😅) |
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.
awesome work Hana and Dajahi!
approving pending query caching issue is resolved (moved to a new ticket or handled in this PR)!
… purpose === 'vpc'
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.
Nice work! things are working
I tested both flows (edit and create config) as we will as the linode creation flow and the form behaviors work well. Left a couple comments to clarify and clean up a couple things.
Also, there is no test coverage added here although we are modifying core flows and adding/modifying many components. I know there must be upcoming e2e tests covering some of those cases but we should also have unit tests testing the rendering and some of the utilities added.
packages/manager/src/features/Linodes/LinodesCreate/VPCPanel.tsx
Outdated
Show resolved
Hide resolved
@@ -268,6 +306,15 @@ export const VPCPanel = (props: VPCPanelProps) => { | |||
</Box> | |||
} | |||
/> | |||
{assignPublicIPv4Address && nat_1_1Error && ( |
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.
how can we test this error?
also, let's update this variable name so it's human readable, it's pretty unclear from reading the code
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.
If the linode doesn't have an unused public IP available and the "Assign a public IPv4 address for this Linode" checkbox is checked, the following error gets returned:
One way to get it to be returned is to have an interface with 2 VPC slots and checking off that checkbox for both of them. You need an extra tag to be able to get to that state.
I'll rename the variable to publicIPv4Error
or something to that effect.
✅ For both the "Add Configuration" and "Edit Configuration" dialogs:
✅ For the "Edit Configuration" dialog:
|
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 addressing the feedback and adding coverage - looks great!
Functionality and UI are good as far as my testing went. ✅
E2E failure seems unrelated
## Description 📝 Bug from #9709 On the prod env, we were unable to edit a config due to the config interface being deleted. This was due to the `regionHasVPCs` variable being coupled with `regionHasVLANS` in the if statement to delete config interfaces. The fix was to handle VPCs and VLANs separately. ## How to test 🧪 ### Prerequisites - Point to the prod environment ### Reproduction steps - Go to a Linode's details page and click on the `Configurations` tab - Click the edit button and scroll down to the Networking section - Select a VLAN and save changes ### Verification steps - The VLAN changes should be reflected in the Configurations table
## Description 📝 Bug from linode#9709 On the prod env, we were unable to edit a config due to the config interface being deleted. This was due to the `regionHasVPCs` variable being coupled with `regionHasVLANS` in the if statement to delete config interfaces. The fix was to handle VPCs and VLANs separately. ## How to test 🧪 ### Prerequisites - Point to the prod environment ### Reproduction steps - Go to a Linode's details page and click on the `Configurations` tab - Click the edit button and scroll down to the Networking section - Select a VLAN and save changes ### Verification steps - The VLAN changes should be reflected in the Configurations table
Description 📝
Add support for VPCs in the Linode Add Config and Linode Edit Config dialogs, as well as within the config row in the Linode Configurations table.
Major Changes 🔄
VPCPanel
component used in the Add/Edit Linode Configuration dialogsLinodeConfigDialog.tsx
,InterfaceSelect.tsx
, andVPCPanel.tsx
InterfaceListItem
componentHow to test 🧪
With a properly-tagged account or with the VPC feature flag on:
For both the "Add Configuration" and "Edit Configuration" dialogs:
For the "Edit Configuration" dialog:
None of the above should be viewable/possible without the proper account tags or the VPC feature flag being on.
Because the
<VPCPanel />
component was changed to accommodate the Add/Edit Config use case, ensure there were no regressions to its behavior in the Linode Create flow.