Skip to content

Conversation

@hana-akamai
Copy link
Contributor

@hana-akamai hana-akamai commented Mar 20, 2025

Description 📝

Update types and validation for VPC Subnet

Changes 🔄

  • Updated ipv6 type for CreateSubnetPayload
  • Separated createSubnetSchema into createSubnetSchemaIPv4 and createSubnetSchemaWithIPv6
  • Added ipv6 prefix length validation for subnets in vpcsValidateIP
  • Updated ipv6 subnet schema validation in vpcs.schema.ts
  • Minor variable refactoring

How to test 🧪

Verification steps

Cross-reference VPC IPv6 API spec (linked in parent ticket) and updated types for:

  • POST /v4/vpcs/{vpcId}/subnets
  • GET /v4/vpcs/{vpcId}/subnets
  • GET v4/vpcs/{vpcId}/subnets/{vpcSubnetId}
Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All unit tests are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@hana-akamai hana-akamai added the VPC Relating to VPC project label Mar 20, 2025
@hana-akamai hana-akamai self-assigned this Mar 20, 2025
@hana-akamai hana-akamai marked this pull request as ready for review March 20, 2025 17:23
@hana-akamai hana-akamai requested a review from a team as a code owner March 20, 2025 17:23
@hana-akamai hana-akamai requested review from cliu-akamai, dwiley-akamai and mjac0bs and removed request for a team March 20, 2025 17:23
});

// @TODO VPC: Delete this when IPv6 is in GA
export const createSubnetSchemaIPv4 = object({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I separated createSubnetSchema into createSubnetSchemaIPv4 and createSubnetSchemaWithIPv6 for now as to not effect how subnets currently work with ipv4.

  • If a customer does not have access to ipv6, we don't want to show the IP_EITHER_BOTH_NOT_NEITHER message
  • If a customer has access to ipv6, we want to show the IP_EITHER_BOTH_NOT_NEITHER message instead of TEMPORARY_IPV4_REQUIRED_MESSAGE

We'll need feature flag logic to determine which Schema to use which we can do when implementing ipv6 logic to the subnet flow

@hana-akamai hana-akamai added the Add'tl Approval Needed Waiting on another approval! label Mar 21, 2025
Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updates to api-v4 look consistent with the API spec and the changes to separate out the schemas makes sense.

Thanks Hana 🚢

@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Mar 21, 2025
@mjac0bs mjac0bs added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Mar 21, 2025
@hana-akamai hana-akamai added Add'tl Approval Needed Waiting on another approval! VPC IPv6 and removed Approved Multiple approvals and ready to merge! VPC Relating to VPC project Add'tl Approval Needed Waiting on another approval! labels Mar 21, 2025
@hana-akamai hana-akamai added the Approved Multiple approvals and ready to merge! label Mar 21, 2025
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 1 failing test on test run #6 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
1 Failing539 Passing3 Skipped106m 35s

Details

Failing Tests
SpecTest
linode-config.spec.tsEnd-to-End » Clones a config

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/linodes/linode-config.spec.ts"

@hana-akamai hana-akamai merged commit 611aed5 into linode:develop Mar 21, 2025
24 of 25 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Cloud Manager Mar 21, 2025
@hana-akamai hana-akamai deleted the M3-9512-update-types-vpc-subnet branch March 21, 2025 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Multiple approvals and ready to merge! VPC IPv6

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants