Skip to content
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-7643] – Support VPC IPv4 Ranges in Linode Create flow #10116

Conversation

dwiley-akamai
Copy link
Contributor

@dwiley-akamai dwiley-akamai commented Jan 26, 2024

Description πŸ“

Add support for VPC IPv4 Ranges in the Linode Create flow.

  • "Add additional IPv4 ranges" section added in VPC panel
  • Logic to include ip_ranges in creation payload

The inclusion of a "VPC IPv4 Ranges" column in the VPC Detail > Subnets inner table as per the mockups slipped through the cracks during ticket creation, but I noticed it and included it in this PR (to try to keep things more consolidated).

Changes πŸ”„

Preview πŸ“·

Before After
Screenshot 2024-01-26 at 12 31 24 PM Screenshot 2024-01-26 at 12 37 46 PM
Screenshot 2024-01-26 at 12 55 08 PM Screenshot 2024-01-26 at 12 54 12 PM

How to test πŸ§ͺ

Verification steps

With the vpc-extra-beta tag on your account, enter the Linode Create flow and confirm:

  • The "Add additional IPv4 ranges" section appears in the VPC panel after a subnet is selected
  • You can add and remove IP input fields using the "Add IPv4 Range" and the "X" buttons, respectively
  • When you click "Create Linode," the POST request contains the IP ranges you specified in the form in the ip_ranges property
  • Once the linode is created, go to the detail page of the VPC you assigned the linode to. Expand the inner subnet table and observe the "VPC IPv4 Ranges" column is populated with what you provided (or "None" if you didn't provide any).

As an Author I have 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

DevDW and others added 18 commits January 25, 2024 23:45
…re flag so the link disappears once we turn off the feature flag for GA
… field tied to it only if a linode has been selected
…ved schema limit on how many IP ranges can be provided; added prop to <Autocomplete /> in LinodeSelect.tsx to prevent 'The value provided to Autocomplete is invalid' console error
…put placeholder and button text per updated mockups
…signIPRanges />; temp skip in SubnetAssignLinodesDrawer.test.tsx and remove some assertions given changed behavior
…cription (fixes it across the various views it appears in)
@dwiley-akamai dwiley-akamai added the VPC Relating to VPC project label Jan 26, 2024
@dwiley-akamai dwiley-akamai self-assigned this Jan 26, 2024
@dwiley-akamai dwiley-akamai force-pushed the M3-7643-ipv4-range-support-linode-create-flow branch from 9c47dde to 4ae0234 Compare January 26, 2024 17:46
…d 'VPC IPv4 Ranges' column to inner Subnets table on VPC Detail page
@@ -294,6 +305,31 @@ const getIPv4Link = (configInterface: Interface | undefined): JSX.Element => {
);
};

// determineNoneSingleOrMultipleWithChip
const getIPRangesCellContents = (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There could be some refactoring between getSubnetLinodeIPv4CellString and this function since they both accept the same arguments/data.

@dwiley-akamai
Copy link
Contributor Author

One other relatively small thing here is making sure the ranges get picked up in the CLI arguments

@jaalah-akamai jaalah-akamai marked this pull request as ready for review January 28, 2024 17:43
@jaalah-akamai jaalah-akamai requested a review from a team as a code owner January 28, 2024 17:43
@jaalah-akamai jaalah-akamai requested review from jdamore-linode and bnussman-akamai and removed request for a team January 28, 2024 17:43
Copy link
Contributor

@jaalah-akamai jaalah-akamai left a comment

Choose a reason for hiding this comment

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

This is looking good - confirmed payload has added ranges and everything shows up in VPC detail table.

@jaalah-akamai
Copy link
Contributor

We'll need to test this:

One other relatively small thing here is making sure the ranges get picked up in the CLI arguments

@jaalah-akamai
Copy link
Contributor

βœ… confirmed.
Screenshot 2024-01-28 at 12 46 16 PM
Screenshot 2024-01-28 at 12 46 24 PM

@jaalah-akamai jaalah-akamai self-assigned this Jan 28, 2024
@jaalah-akamai jaalah-akamai added Add'tl Approval Needed Waiting on another approval! Needs extra approvals Use for PRs that have high-impact changes where > 2 approvals are needed labels Jan 28, 2024
jaalah-akamai pushed a commit to dwiley-akamai/manager that referenced this pull request Jan 29, 2024
Copy link
Member

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

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

functionality looks good!

Looks like the error handling could use some work

Screenshot 2024-01-29 at 8 53 03 AM

@bnussman-akamai bnussman-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Jan 29, 2024
@jaalah-akamai
Copy link
Contributor

jaalah-akamai commented Jan 29, 2024

Looks like the error handling could use some work.

@bnussman-akamai Noted, I'll create a follow ticket. Looks like it could use some work in the other drawers too.

@hana-akamai hana-akamai removed Ready for Review Needs extra approvals Use for PRs that have high-impact changes where > 2 approvals are needed labels Jan 29, 2024
@hana-akamai
Copy link
Contributor

@bnussman-akamai @jaalah Created M3-7709 to look into the error handling

@hana-akamai hana-akamai merged commit 2d5eca9 into linode:staging-off-release Jan 29, 2024
17 of 18 checks passed
Copy link

Coverage Report: βœ…
Base Coverage: 80.05%
Current Coverage: 80.07%

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 Relating to VPC project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants