-
Notifications
You must be signed in to change notification settings - Fork 367
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-7168] - Increment Subnet IPv4 value when recommending new subnet range #10010
Conversation
@@ -26,9 +27,15 @@ export const SubnetCreateDrawer = (props: Props) => { | |||
|
|||
const { data: profile } = useProfile(); | |||
const { data: grants } = useGrants(); | |||
const { data: allSubnets } = useAllSubnetsQuery(vpcId); |
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 a getAll subnets of a VPC, we could directly get the VPC since subnets are part of the VPC's return object if that's a better approach! (we just wouldn't need any of the vpc's other information besides its subnets)
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.
Yes, I think using useVPCQuery
to get all of the subnets would be much better because it would be one less things to fetch and work about invalidating. I pushed this change in 644f882
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.
Unit test passed and confirmed that the subnet range is increased when adding a new subnet in the Create VPC and Create Subnet flow
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.
Incrementation in VPC Create flow and Create Subnet drawer ✅
Code review ✅
Description 📝
When creating new subnets via both the Create VPC flow and the Create Subnet drawer, we will now be incrementing the subnet range so that the default value is not a static 10.0.4.0/24 value.
Talked with Daniel about this behavior 👍 -
Changes 🔄
List any change relevant to the reviewer.
Preview 📷
Screen.Recording.2023-12-19.at.8.11.40.PM.mov
Screen.Recording.2023-12-19.at.8.07.57.PM.mov
How to test 🧪
Prerequisites
NOTE - there is a separate bug regarding SubnetCreateDrawer erroring when we try to create more than 10 subnets - see internal ticket for details
Verification steps
(How to verify changes)
As an Author I have considered 🤔
Check all that apply