-
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-6723] β VPC Subnet endpoints, validation, & React Query queries #9390
feat: [M3-6723] β VPC Subnet endpoints, validation, & React Query queries #9390
Conversation
); | ||
}; | ||
|
||
export const useCreateSubnetMutation = (vpcID: number) => { |
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.
The invalidation in the onSuccess
functions for useCreateSubnetMutation
, useUpdateSubnetMutation
, and useDeleteSubnetMutation
can probably be streamlined/improved, but I'd rather optimize those later in the process in tickets where those queries are made use of as opposed to over-optimizing at this early stage.
packages/manager/src/App.tsx
Outdated
@@ -58,6 +59,9 @@ const BaseApp = withFeatureFlagProvider( | |||
|
|||
const { enqueueSnackbar } = useSnackbar(); | |||
|
|||
// const { data: subnetData } = useSubnetQuery(vpcID, subnetID); | |||
// console.log(subnetData); |
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.
Like last time, all of the changes in this file are temporary for testing purposes and will be removed prior to merging.
You can uncomment out the lines and replace vpcID
and subnetID
with real IDs to check the data is coming through.
/[a-zA-Z0-9-]+/, | ||
'Must include only ASCII letters, numbers, and dashes' | ||
), | ||
.matches(/[a-zA-Z0-9-]+/, LABEL_REQUIREMENTS), |
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.
Since the label validation is essentially the same for all the schemas, what do you think about re-using that? const labelValidation = ...
then wherever it's used we can tack on .required(...)
or .notRequired(...)
?
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.
Can we also confirm that the regex we're using is sufficient? I think we may need to be more strict by doing /^[a-zA-Z0-9-]+$/
.
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.
In the cases of "test "
, " test "
, and " test"
I checked to see if the current VLAN validation would catch those and it did, so I think what we have currently should be sufficient
2 flaky tests on run #4858 βοΈ
Details:
Β firewalls/update-firewall.spec.ts β’ 1 flaky test
Β linodes/smoke-linode-landing-table.spec.ts β’ 1 flaky test
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
Description π
Add initial VPC subnet endpoints, validation, and RQ queries.
Major Changes π
createSubnetSchema
andmodifySubnetSchema
for validation, plus a few constants and a utility function for testing IP validityHow to test π§ͺ
Reach out for detailed testing instructions if you want to work with the queries in alpha.