Project: Add support for NB Front-End IP in VPC-MTC + 40Gbps NB-MTC#978
Open
mawilk90 wants to merge 8 commits into
Open
Project: Add support for NB Front-End IP in VPC-MTC + 40Gbps NB-MTC#978mawilk90 wants to merge 8 commits into
mawilk90 wants to merge 8 commits into
Conversation
* Added support for NB Frontend VPC IP * Address CoPilot suggestions * Removed unnecessary omitempty
* Use dynamic capabilities in createVPCWithSubnet * Modify TestNodeBalancer_Create_with_vpc to cover NB Front-End IP * Add tests for frontend VPCs in single stack * Update capabilities in createVPCWithSubnet and createVPCWithDualStackSubnet * Add func getIntersection * Add tests for premium40gb and different VPCs * Create func createVPCWithDualStackSubnetInRegion * Rename fixture in TestNodeBalancer_Create_WithBackendVPCOnly * Extract setup functions for premium NBs * Clean-up * Refactor TestNodeBalancer_Create_WthFrontendVPC to use setupNodeBalancerWithFrontendVPC * Generate fixtures with make * Rename expected to fail tests * Comment out expected to fail tests * Add two more checks to TestNodeBalancer_Create_WithFrontendVPCOnly * Solve PR remarks * Solve PR remarks * Update setupInstanceWithDualStackVPCAndNAT11 to fix failing TestVPC_List*IPv6Addresses * Add recordStopper and fixtures to expected-to-fail tests * Add t.Skip in getValidRegion in case there is no valid regions * PR review remarks: replace assert.Emtpy with assert.Nil * Linter fix
* TPT-4329 Deprecate vpcs in favor of backend_vpcs * TPT-4329 Create specific type for NB Backend VPC
…eate (#926) * TPT-4329 Deprecate vpcs in favor of backend_vpcs * TPT-4329 Create specific type for NB Backend VPC * Replace VPCs with BackendVPCs to be passed to POST /nodebalancers * Refactor tests to use newly added type for NB Backend VPC * Copilot remarks fixes --------- Co-authored-by: Dawid Dzhafarov <ddzhafar@akamai.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends linodego’s NodeBalancer support to cover (1) Premium 40Gbps plans and (2) NodeBalancer front-end IPs in VPC, including new VPC config list/get endpoints and corresponding unit/integration fixtures/tests.
Changes:
- Add NodeBalancer fields and create options for
frontend_vpcs,backend_vpcs(plus deprecatedvpcs) and the newpremium_40gbplan type. - Add NodeBalancer VPC config purpose support and client methods to list/get configs from
/vpcs,/backend_vpcs, and/frontend_vpcs. - Expand unit/integration test coverage and fixtures for the new NodeBalancer/VPC behaviors.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
nodebalancer.go |
Adds NodeBalancer front-end VPC fields, new plan type constant, and create options for frontend/backend VPCs. |
nodebalancer_config_vpc.go |
Adds VPC config purpose plus new list endpoints for backend/frontend configs. |
test/unit/nodebalancer_test.go |
Updates unit tests/fixtures assertions for the new NB fields/type and adds create tests for VPC options. |
test/unit/nodebalancer_config_vpc_test.go |
Adds unit tests for NodeBalancer VPC config list/get endpoints. |
test/unit/fixtures/nodebalancers_list.json |
Updates list fixture to include type and front-end VPC fields. |
test/unit/fixtures/nodebalancer_get.json |
Updates get fixture to include type and front-end VPC fields. |
test/unit/fixtures/nodebalancer_create_with_vpcs.json |
Adds create fixture for NB with backend/frontend VPCs. |
test/unit/fixtures/nodebalancer_vpc_config_*.json |
Adds fixtures for VPC config list/get endpoints. |
test/integration/nodebalancers_test.go |
Adds integration tests for frontend/backend VPC scenarios and premium_40gb. |
test/integration/vpc_subnet_test.go |
Ensures VPC setup selects regions with NodeBalancer capability. |
test/integration/instance_config_test.go |
Updates region selection to use capability filtering (no hardcoded region). |
test/integration/util_test.go |
Adds generic getIntersection helper used for region selection. |
test/integration/fixtures/TestNodeBalancer_*.yaml |
Adds recorded fixtures for new integration test scenarios. |
Comments suppressed due to low confidence (1)
test/unit/nodebalancer_test.go:99
- This test’s expectations depend on the position of the test case in
tests(viaidx), making it brittle if the table ordering changes. Prefer branching on a stable attribute (e.g.,tt.fixture) or adding explicit expected fields to the table.
for idx, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
fixtureData, err := fixtures.GetFixture(tt.fixture)
assert.NoError(t, err)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
This PR merges support for NB Front-End IP + 40Gbps features into the main branch for release.
✔️ How to Test
make test-unitmake test-int TEST_ARGS="-run TestNodeBalancer_Create_With"