Fix VPC interface addresses flattening#408
Merged
zliang-akamai merged 3 commits intodevfrom Mar 5, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes missing VPC interface IPv4 address fields during request option flattening so 1:1 NAT addresses (and primary flag) are preserved when creating Linode interfaces.
Changes:
- Update
flattenVPCInterfaceto includePrimaryandNAT1To1Addresswhen mapping IPv4 addresses. - Add a new unit test file covering
flattenVPCInterface,flattenPublicInterface,flattenLinodeInterface,flattenConfigInterface(IPv4), andflattenMetadata. - Strengthen disk/config flattening tests (DeepEqual for table cases + new “all fields” coverage, plus expanded
flattenInstanceConfigassertions).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| builder/linode/step_create_linode.go | Ensures VPC IPv4 address create options include Primary and NAT1To1Address during flattening. |
| builder/linode/step_create_linode_test.go | Adds focused unit coverage validating interface/metadata flattening behavior (incl. NAT 1:1 mapping). |
| builder/linode/step_create_disk_config_test.go | Improves test assertions for disk/config flattening and adds broader “all fields” coverage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
yec-akamai
approved these changes
Mar 5, 2026
Contributor
yec-akamai
left a comment
There was a problem hiding this comment.
Tests passed locally!
ezilber-akamai
approved these changes
Mar 5, 2026
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
Fix the issue that NAT 1 to 1 address is not included in creation options after being flattened.
Bug report is from a comment under another issue: #222 (comment)
✔️ How to Test