Skip to content

TPT-4320: Update FirewallID to use single pointer in LinodeInterfaceCreateOptions#921

Merged
zliang-akamai merged 2 commits intolinode:mainfrom
zliang-akamai:zhiwei/firewall-id-single-pointer
Mar 24, 2026
Merged

TPT-4320: Update FirewallID to use single pointer in LinodeInterfaceCreateOptions#921
zliang-akamai merged 2 commits intolinode:mainfrom
zliang-akamai:zhiwei/firewall-id-single-pointer

Conversation

@zliang-akamai
Copy link
Copy Markdown
Member

Only -1 can unset firewall ID now when default firewall setting is in-place for Linode interface. Update it to a single pointer because we no longer need the double pointer to explicitly express null in API requests.

@zliang-akamai zliang-akamai requested a review from a team as a code owner March 24, 2026 16:58
@zliang-akamai zliang-akamai added the breaking-change for breaking changes in the changelog. label Mar 24, 2026
@zliang-akamai zliang-akamai requested review from Copilot, lgarber-akamai and yec-akamai and removed request for a team March 24, 2026 16:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates Linode Interface creation options to reflect the API change where firewall_id no longer needs to support explicit null (using -1 to unset instead), simplifying the SDK field type.

Changes:

  • Changed LinodeInterfaceCreateOptions.FirewallID from **int to *int.
  • Updated unit and integration tests to use linodego.Pointer(...) instead of linodego.DoublePointer(...).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
interfaces.go Simplifies FirewallID type on LinodeInterfaceCreateOptions to a single pointer.
test/unit/interface_test.go Updates interface creation unit test to match the new FirewallID type.
test/integration/instance_interfaces_test.go Updates integration test assignments to match the new FirewallID type.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/integration/instance_interfaces_test.go Outdated
Comment thread interfaces.go
@zliang-akamai zliang-akamai changed the title Update FirewallID to use single pointer in LinodeInterfaceCreateOptions TPT-4320: Update FirewallID to use single pointer in LinodeInterfaceCreateOptions Mar 24, 2026
Copy link
Copy Markdown
Contributor

@ezilber-akamai ezilber-akamai left a comment

Choose a reason for hiding this comment

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

Should we leave a comment notifying users of the breaking change? We can include it in the release notes but a comment with a TODO to remove in ~6 months or so could be nice too.

@zliang-akamai
Copy link
Copy Markdown
Member Author

zliang-akamai commented Mar 24, 2026

@ezilber-akamai I think we are fine to just make the breaking change as the project is still in LA/beta, not stable status.

And the breaking change label on this PR will be converted to a breaking change notice into the generated release note.

@zliang-akamai zliang-akamai merged commit dc00ea0 into linode:main Mar 24, 2026
10 checks passed
@zliang-akamai zliang-akamai deleted the zhiwei/firewall-id-single-pointer branch March 24, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change for breaking changes in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants