TPT-4277: Implement support for Reserved IP for IPv4#919
TPT-4277: Implement support for Reserved IP for IPv4#919mgwoj wants to merge 20 commits intolinode:proj/reserved-ipsfrom
Conversation
* build(deps): bump golang.org/x/oauth2 from 0.35.0 to 0.36.0 Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.35.0 to 0.36.0. - [Commits](golang/oauth2@v0.35.0...v0.36.0) --- updated-dependencies: - dependency-name: golang.org/x/oauth2 dependency-version: 0.36.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zhiwei Liang <zliang@akamai.com>
…elease notes workflow (linode#913) * Added PR title checking to lint and clean up release notes * Fixed CoPilot suggestions * Exclude dependabot PRs from PR title validation * Address CoPilot suggestions * Add exemptions for hotfixes and external contributions * Switch to using amannn/action-semantic-pull-request@v6 for title validation * Add exemption for dependencies label and remove dependabot author check
* Redact sensitive data from logging * Address copilot suggestions * TPT-4014 Address comments suggestions
There was a problem hiding this comment.
Pull request overview
Implements remaining Go SDK (linodego) support for the Reserved IPv4 feature to better align with the API spec, primarily by expanding reserved IP metadata support and adding unit coverage.
Changes:
- Add
reserved_ipv4_addressessupport to tag creation and decode tagged objects of typereserved_ipv4_address. - Add reserved IP tags support plus new endpoints for updating a reserved IP and listing reserved IP types (pricing).
- Add/extend unit tests and fixtures to validate request bodies and response decoding for reserved IP behavior.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tags.go |
Adds tag create option for reserved IPv4 addresses and decodes tagged reserved IP objects. |
network_reserved_ips.go |
Adds tag support for reserving IPs, plus update + types-list endpoints and related models. |
instance_ips.go |
Extends InstanceIP with tags field to capture reserved IP tags. |
test/unit/tag_test.go |
Adds unit coverage for tag create with reserved IPv4 addresses and tagged-object decoding. |
test/unit/nodebalancer_test.go |
Adds request-body validation test for NodeBalancer create with ipv4. |
test/unit/network_reserved_ips_test.go |
Extends reserved IP tests to cover tags, update, and type listing. |
test/unit/network_ips_test.go |
Adds request-body validation for reserve allocation and combined RDNS+reserved update. |
test/unit/instance_test.go |
Adds request-body validation for instance create with explicit IPv4 list. |
test/unit/instance_ip_test.go |
Adds request-body validation for assigning a reserved IP to an instance. |
test/unit/fixtures/tagged_objects_reserved_ip_list.json |
Adds fixture for tagged reserved IPv4 address objects. |
test/unit/fixtures/network_reserved_ips_list.json |
Updates reserved IP list fixture with reserved and tags. |
test/unit/fixtures/network_reserved_ips_get.json |
Updates reserved IP get fixture with reserved and tags. |
test/unit/fixtures/network_reserved_ips.json |
Updates reserve-IP create fixture with reserved and tags. |
test/unit/fixtures/network_reserved_ip_update.json |
Adds fixture for reserved IP update response. |
test/unit/fixtures/network_reserved_ip_types_list.json |
Adds fixture for reserved IP types (pricing) list response. |
Comments suppressed due to low confidence (1)
test/unit/fixtures/network_reserved_ips_list.json:26
- This list fixture is missing the standard "page" field used by paginated list responses in this repo's fixtures. If this fixture is used with getPaginatedResults, pagination decoding may fail or behave inconsistently; add "page": 1 to match other list fixtures.
],
"pages": 1,
"results": 2
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…reateOptions (linode#921) * Update FirewallID to use single pointer in LinodeInterfaceCreateOptions * Fix test
…inode#916) * build(deps): bump slackapi/slack-github-action from 2.1.1 to 3.0.1 Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 2.1.1 to 3.0.1. - [Release notes](https://github.com/slackapi/slack-github-action/releases) - [Commits](slackapi/slack-github-action@v2.1.1...v3.0.1) --- updated-dependencies: - dependency-name: slackapi/slack-github-action dependency-version: 3.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Apply suggestions from code review Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com>
Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](actions/github-script@v7...v8) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* TPT-4318: Add @linode/dx-sdets to CODEOWNERS * Correct CODEOWNERS
…node#917) * Added DiskEncryption field for LKE Node Pool creation * Address CoPilot suggestions * Removed more LA notices * Update disk_encryption field to be a pointer
* build(deps): bump golang.org/x/net from 0.51.0 to 0.52.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.51.0 to 0.52.0. - [Commits](golang/net@v0.51.0...v0.52.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.52.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * go mod tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lena Garber <lgarber@akamai.com>
…field to firewall (linode#901) * Fix firewall device for linode interfaces#829 * Fix unit test * Update the unit test * feat: add entities field to Firewall struct and define FirewallEntity type * Fix unit test * Integration test update * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update FirewallDeviceEntity and tests * Reuse FirewallDeviceEntity * fmt * Fix test --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Michal Wojcik <32574975+mgwoj@users.noreply.github.com>
Add entity envelope in AlertDefinition GET, POST and PUT API responses. Add new method to list entities. Update tests.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 27 out of 30 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // UpdateReservedIPOptions represents the options for updating a reserved IP address | ||
| // NOTE: Reserved IP feature may not currently be available to all users. | ||
| type UpdateReservedIPOptions struct { | ||
| Tags []string `json:"tags"` | ||
| } |
There was a problem hiding this comment.
UpdateReservedIPOptions.Tags is a non-pointer slice without omitempty, so the zero value (nil) will marshal as "tags":null. If the API expects an array (even when clearing), this can cause request validation errors or unintended semantics. Consider using Tags *[]string json:"tags,omitempty"`` (consistent with other update options in the SDK) or validate that Tags is non-nil before issuing the PUT.
There was a problem hiding this comment.
You can use omitzero instead of omitempty for any list to make sure empty slice are correctly marshalled.
There was a problem hiding this comment.
Agree, this is the way to go
yec-akamai
left a comment
There was a problem hiding this comment.
Overall looks good. Is the security vulnerability related to this change?
…upport-for-reserved-ip-for-ipv4
No, it is not related at all |
📝 Description
Complete the Go SDK (linodego) support for the Reserved IP feature. Several foundations are already in place; this story addresses the remaining gaps to bring the SDK fully in line with the API Specification.
✔️ How to Test
As the API is not ready yet, there are only mocked integration tests.