Skip to content

Feat: adding flexible placement group limit - #1038

Merged
zliang-akamai merged 4 commits into
linode:mainfrom
avnimish:feat/adding-flexible-placement-group-limit
Sep 3, 2026
Merged

Feat: adding flexible placement group limit#1038
zliang-akamai merged 4 commits into
linode:mainfrom
avnimish:feat/adding-flexible-placement-group-limit

Conversation

@avnimish

Copy link
Copy Markdown
Contributor

📝 Description

This change adds the flexible placement group limit as a field in the PlacementGroupLimits to use when provisioning Placement groups

✔️ How to Test

make TEST_ARGS=-run=TestRegions_pgLimits test-int

Copilot AI lite review requested due to automatic review settings August 31, 2026 17:41
@avnimish
avnimish requested review from a team as code owners August 31, 2026 17:41
@avnimish
avnimish requested review from psnoch-akamai and zliang-akamai and removed request for a team August 31, 2026 17:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request extends the RegionPlacementGroupLimits model in the root linodego API client to surface the API’s “flexible placement group” Linode limit returned by the Regions endpoints, and updates unit/integration tests and fixtures accordingly.

Changes:

  • Added MaximumLinodesPerFlexiblePG to RegionPlacementGroupLimits with the corresponding JSON field mapping.
  • Updated unit fixtures and unit tests to validate the new field is populated.
  • Updated the integration TestRegions_pgLimits to assert the new limit is non-zero.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
regions.go Adds MaximumLinodesPerFlexiblePG to RegionPlacementGroupLimits for Regions API responses.
test/unit/region_test.go Extends unit assertions to validate MaximumLinodesPerFlexiblePG is present and > 0 when limits exist.
test/unit/fixtures/regions_list.json Updates the regions list fixture to include maximum_linodes_per_flexible_pg.
test/unit/fixtures/region_get.json Updates the region get fixture to include maximum_linodes_per_flexible_pg.
test/integration/regions_test.go Extends the placement-group limits integration test to assert MaximumLinodesPerFlexiblePG is non-zero.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@zliang-akamai zliang-akamai added the community-contribution contributions from the community. label Sep 3, 2026

@psnoch-akamai psnoch-akamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM and tests work locally

avnimish and others added 3 commits September 3, 2026 12:50
* TPT-4463: Support RDMA VPC interfaces  (linode#988)

* init

* lint

* address comments for omitzero

* lint

* update comment

* fix interfaces list

* fix lint

* Fix RDMA project branch merge from v2 (linode#1003)

* fix v2

* udpate

* TPT-4463: Add integration tests for RDMA interfaces (linode#999)

* init

# Conflicts:
#	interfaces.go
#	regions.go
#	test/unit/fixtures/interface_list_with_rdma.json
#	test/unit/rdma_vpc_test.go
#	vpc.go

* address comments for omitzero

* Refactor vpcCreateOptionsCheck to use createOpts

Current implementation of vpcCreateOptionsCheck verifies fields copied
from VPC so comparing opts.Label == vpc.Label etc. is just comparing
a value to itself —> good is always true.

* Update fixtures

* Create int tests for VPC and VPC Subnet with RDMA type

* Add assertion for regular VPC type

* Update vpcCreateOptionsCheck to use require

* Update error msg in TestVPC_Update_Invalid

* Update fixtures for TestVPC_List tests

* Update err msg for invalid label in VPC and Subnet tests

* Add negative TCs for RDMA VPC with IPv6

* Create int test for Linode instance with RDMA interfaces

* Refactor createInstanceWithLinodeInterfaces to use LinodeInstanceInterfaceCreateOptions

* Refactor TestInstance_CreateWithRDMAVPCInterfaces to use createInstanceWithLinodeInterfaces

* Small refactor & fixture update

* Linter

* Comment out TestInstance_CreateWithRDMAVPCInterfaces due to infra changes needed

* Update comment for TestVPC_WithRDMATypeIPv6_Fail

* Update fixtures for TestVPC_CreateGet_smoke and TestVPC_Subnet_Create

* Update fixtures and TestVPC_IPv4Ranges to return 4 vals in createVPC

* Update TestInstance_CreateWithRDMAVPCInterfaces

* Address Copilot remarks

* Uncomment TestVPC_WithRDMATypeAndIPv6_Fail as IPv6 is blocked already

---------

Co-authored-by: Ye Chen <yechen@akamai.com>

* fix conflict

* Add booted=false for RDMA Linode instance creation

* TPT-4456: Enable integration test for RDMA Linode interface (linode#1032)

* add for passing tests

* update test

* disable cfw

* add pointers to omitzero fields

* fmt

---------

Co-authored-by: Maciej Wilk <mawilk@akamai.com>
@avnimish
avnimish force-pushed the feat/adding-flexible-placement-group-limit branch from 1269f79 to 71d2f23 Compare September 3, 2026 16:51
@zliang-akamai
zliang-akamai merged commit 79ebe2b into linode:main Sep 3, 2026
10 checks passed
@zliang-akamai zliang-akamai added the new-feature for new features in the changelog. label Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution contributions from the community. new-feature for new features in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants