Skip to content

Support regions/vpc-availability endpoints#880

Merged
dawiddzhafarov merged 7 commits intolinode:mainfrom
dawiddzhafarov:feature/TPT-4108-linodego-support-regions-vpc-availability-endpoints
Feb 13, 2026
Merged

Support regions/vpc-availability endpoints#880
dawiddzhafarov merged 7 commits intolinode:mainfrom
dawiddzhafarov:feature/TPT-4108-linodego-support-regions-vpc-availability-endpoints

Conversation

@dawiddzhafarov
Copy link
Copy Markdown
Contributor

📝 Description

Add support for region vpc availability endpoints

✔️ How to Test

To run all unit and integration tests:

make test-unit

make test-int

To run only newly added unit and integration tests:

make TEST_ARGS="-run TestListRegionsVPCAvailability" test-unit
make TEST_ARGS="-run TestGetRegionVPCAvailability" test-unit

make TEST_ARGS="-run TestRegionsVPCAvailability_List" test-int
make TEST_ARGS="-run TestRegionVPCAvailability_Get" test-int

Comment thread test/unit/region_test.go
Comment thread regions_availability.go Outdated
Comment thread regions_availability.go Outdated
@dawiddzhafarov dawiddzhafarov added the new-feature for new features in the changelog. label Jan 29, 2026
@dawiddzhafarov dawiddzhafarov marked this pull request as ready for review January 29, 2026 15:43
@dawiddzhafarov dawiddzhafarov requested a review from a team as a code owner January 29, 2026 15:43
@dawiddzhafarov dawiddzhafarov requested review from Copilot, psnoch-akamai and vshanthe and removed request for a team January 29, 2026 15:43
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

This PR adds support for VPC availability endpoints in regions, enabling clients to query which regions support VPCs and their available IPv6 prefix lengths.

Changes:

  • Added RegionVPCAvailability struct and two new API methods: ListRegionsVPCAvailability and GetRegionVPCAvailability
  • Implemented comprehensive unit tests with fixture data for both list and get operations
  • Added integration tests with recorded API responses

Reviewed changes

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

Show a summary per file
File Description
regions_availability.go Implements new RegionVPCAvailability struct and API methods with caching support
test/unit/region_test.go Adds unit tests for listing and retrieving VPC availability data
test/unit/fixtures/regions_vpc_availability_list.json Fixture data for list VPC availability endpoint
test/unit/fixtures/region_vpc_availability_get.json Fixture data for get VPC availability endpoint
test/integration/regionsavailability_test.go Integration tests for VPC availability endpoints
test/integration/fixtures/TestRegionsVPCAvailability_List.yaml Recorded API response for list operation
test/integration/fixtures/TestRegionVPCAvailability_Get.yaml Recorded API response for get operation

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

Comment thread test/unit/fixtures/region_vpc_availability_get.json
Comment thread test/unit/region_test.go
@dawiddzhafarov dawiddzhafarov force-pushed the feature/TPT-4108-linodego-support-regions-vpc-availability-endpoints branch 3 times, most recently from b2109d6 to 80e4f55 Compare January 29, 2026 16:02
@mgwoj mgwoj self-requested a review January 30, 2026 07:09
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The output of those fixtures were recorded in the devcloud env rather than prod. This is because I don't have the token yet. But if I understand correctly, if someone run make fixtures for those tests, the output would differ greatly. That's why @mgwoj generated those output fixtures for production (as he has access) so I could use them here already, and future make fixtures would not generate such big diffs.

Should I use the fixtures obtained from prod env by Michał already?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have gained the access to the prod env and regenerated test data based on that env.

Copy link
Copy Markdown
Contributor

@lgarber-akamai lgarber-akamai left a comment

Choose a reason for hiding this comment

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

Nice work!

@dawiddzhafarov dawiddzhafarov force-pushed the feature/TPT-4108-linodego-support-regions-vpc-availability-endpoints branch from 466841d to c0448b4 Compare February 11, 2026 07:59
Copy link
Copy Markdown
Member

@zliang-akamai zliang-akamai left a comment

Choose a reason for hiding this comment

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

LGTM!

@dawiddzhafarov dawiddzhafarov merged commit e84bcdf into linode:main Feb 13, 2026
10 checks passed
mawilk90 pushed a commit to mawilk90/linodego that referenced this pull request Feb 27, 2026
* Add support for region vpc availability and regions vpc availability endpoints

* Add integration tests for new endpoints

* Execute gofumt to fix formatting issue

* Adjust integration test data to the production API

* Remove caching from vpc endpoints

* Add dots to the comments

---------

Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com>
mawilk90 added a commit that referenced this pull request Mar 5, 2026
* Add option to upload test report on demand only for manual run

* Include pull_request in TOD reports upload

* Fix invalid syntax: @Always() -> always()

* Set test_upload_report to choice type in ci.yml as it is unequivocal

* Fixed issues flagged by gosec (#893)

* Fixed issues flagged by gosec

* Remove redundant and causing integration test failure

* Removed `v4beta` notices from Maintenance Policy  (#889)

* Removed v4beta notices from Maintenance Policy fields/structs/methods

* Address PR feedback

* Support regions/vpc-availability endpoints (#880)

* Add support for region vpc availability and regions vpc availability endpoints

* Add integration tests for new endpoints

* Execute gofumt to fix formatting issue

* Adjust integration test data to the production API

* Remove caching from vpc endpoints

* Add dots to the comments

---------

Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com>

* Drop support for DBaaS V1 (#894)

* fix: exclude gosec G117 for golangci-lint > 2.9 (#898)

* fix: exclude gosec G117 for golangci-lint > 2.9

* improve comment

---------

Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com>

---------

Co-authored-by: Erik Zilber <ezilber@akamai.com>
Co-authored-by: Dawid <56120592+dawiddzhafarov@users.noreply.github.com>
Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com>
Co-authored-by: Glenn Pratt <gpratt@akamai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature for new features in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants