Skip to content

TPT-4421: Remove deprecated fields and methods#946

Merged
ezilber-akamai merged 9 commits into
linode:proj/linodego_v2from
ezilber-akamai:TPT-4421-remove-deprecated-fields-methods
May 5, 2026
Merged

TPT-4421: Remove deprecated fields and methods#946
ezilber-akamai merged 9 commits into
linode:proj/linodego_v2from
ezilber-akamai:TPT-4421-remove-deprecated-fields-methods

Conversation

@ezilber-akamai

Copy link
Copy Markdown
Contributor

📝 Description

Removed all deprecated fields and methods.

✔️ How to Test

make test-unit
make test-int

@ezilber-akamai ezilber-akamai changed the base branch from main to proj/linodego_v2 April 30, 2026 19:26
@ezilber-akamai ezilber-akamai force-pushed the TPT-4421-remove-deprecated-fields-methods branch from 1ce2f28 to 6e41bdf Compare April 30, 2026 20:22
@ezilber-akamai ezilber-akamai marked this pull request as ready for review April 30, 2026 20:32
@ezilber-akamai ezilber-akamai requested review from a team as code owners April 30, 2026 20:32
@ezilber-akamai ezilber-akamai requested review from Copilot, psnoch-akamai and zliang-akamai and removed request for a team April 30, 2026 20:32

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 PR removes deprecated public fields, types, and client methods across the linodego SDK, and updates unit/integration tests plus recorded fixtures to use the non-deprecated (primarily “V2”) APIs and region-based Object Storage identifiers.

Changes:

  • Removed multiple deprecated SDK APIs/types (Object Storage clusters, legacy paged response structs, LKE cluster pool aliases, v1 Object Storage ACL/cert APIs, legacy instance transfer/group APIs, etc.).
  • Updated SDK call sites in unit/integration tests to use V2 methods and region-based identifiers instead of cluster IDs.
  • Refreshed/removal of numerous test fixtures to match the new request/response shapes.

Reviewed changes

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

Show a summary per file
File Description
test/unit/object_storage_cluster_test.go Removes unit tests for deleted Object Storage cluster APIs.
test/unit/object_storage_bucket_test.go Updates bucket access test to V2 method (but still uses cluster IDs in places).
test/unit/object_storage_bucket_cert_test.go Removes unit tests for deprecated bucket cert APIs; keeps V2 tests.
test/unit/monitor_alert_definitions_test.go Removes assertions/fixture fields tied to deprecated monitor alert fields.
test/unit/lke_cluster_pool_test.go Removes tests for deprecated LKE cluster pool APIs.
test/unit/instance_test.go Removes v1 monthly transfer test and associated import; keeps V2.
test/unit/instance_ip_test.go Switches to IPAddressUpdateOptionsV2 / double-pointer RDNS.
test/unit/fixtures/object_storage_cluster_list.json Removes fixture for deleted Object Storage cluster listing.
test/unit/fixtures/object_storage_cluster_get.json Removes fixture for deleted Object Storage cluster get.
test/unit/fixtures/lke_cluster_pool_update.json Removes fixture for deleted LKE cluster pool APIs.
test/unit/fixtures/lke_cluster_pool_list.json Removes fixture for deleted LKE cluster pool APIs.
test/unit/fixtures/lke_cluster_pool_get.json Removes fixture for deleted LKE cluster pool APIs.
test/unit/fixtures/lke_cluster_pool_create.json Removes fixture for deleted LKE cluster pool APIs.
test/integration/object_storage_quota_test.go Updates expected quota name/description strings to new API values.
test/integration/object_storage_object_test.go Switches Object Storage object operations to region + V2 ACL APIs.
test/integration/object_storage_keys_test.go Removes deprecated Cluster usage in bucket_access; tweaks regional limited test setup.
test/integration/object_storage_clusters_test.go Removes integration test for deleted Object Storage cluster APIs.
test/integration/object_storage_buckets_test.go Removes cluster-based/regional legacy tests; uses region-based bucket APIs.
test/integration/object_storage_bucket_certs_test.go Removes deprecated bucket cert calls; uses V2 methods.
test/integration/monitor_alert_definitions_test.go Drops assertion against deprecated EntityIDs field.
test/integration/instances_test.go Removes deprecated monthly transfer call; uses V2.
test/integration/fixtures/TestObjectStorageQuotas_List.yaml Updates quota list fixture (new fields, pagination).
test/integration/fixtures/TestObjectStorageQuotas_Get.yaml Updates quota get fixture with new fields/strings.
test/integration/fixtures/TestObjectStorageQuotaUsage_Get.yaml Refreshes headers/dates in recorded fixture.
test/integration/fixtures/TestObjectStorageObject_Smoke.yaml Updates Object Storage object smoke fixture for region-based paths and updated responses.
test/integration/fixtures/TestObjectStorageObject_ACLConfig_Bucket_Put.yaml Refreshes signed URL and request IDs in fixture.
test/integration/fixtures/TestObjectStorageObject_ACLConfig_Bucket_Delete.yaml Refreshes signed URL and request IDs in fixture.
test/integration/fixtures/TestObjectStorageKeys_Limited_Bucket.yaml Updates bucket delete path to region-based endpoint + refreshed headers.
test/integration/fixtures/TestObjectStorageKeys_Limited.yaml Removes cluster from request body; refreshes IDs/headers.
test/integration/fixtures/TestObjectStorageKey_Update.yaml Refreshes IDs/regions list contents/headers.
test/integration/fixtures/TestObjectStorageKey_List.yaml Refreshes IDs/regions list contents/headers.
test/integration/fixtures/TestObjectStorageKey_GetMissing.yaml Updates error message text + refreshed headers.
test/integration/fixtures/TestObjectStorageKey_GetFound.yaml Refreshes IDs/regions list contents/headers.
test/integration/fixtures/TestObjectStorageClusters_List.yaml Removes fixture for deleted Object Storage cluster listing.
test/integration/fixtures/TestObjectStorageBuckets_List.yaml Updates fixture to region-based delete path; trims/refreshes list payload.
test/integration/fixtures/TestObjectStorageBucketsInCluster_List.yaml Removes fixture for deprecated/removed cluster listing behavior.
test/integration/fixtures/TestObjectStorageBucket_Regional.yaml Removes fixture for removed regional legacy test.
test/integration/fixtures/TestObjectStorageBucket_GetMissing.yaml Updates missing-bucket error message + region-based delete path.
test/integration/fixtures/TestObjectStorageBucket_GetFound.yaml Updates region-based bucket paths + refreshed headers.
test/integration/fixtures/TestObjectStorageBucket_Create.yaml Updates region-based delete path + refreshed headers.
test/integration/fixtures/TestObjectStorageBucket_Access_Update.yaml Refreshes endpoints list payload and switches bucket operations to region-based paths.
test/integration/fixtures/TestObjectStorageBucket_Access_Get.yaml Refreshes endpoints list payload and switches bucket operations to region-based paths.
test/integration/fixtures/TestObjectStorageBucketCert.yaml Refreshes endpoints list payload and switches SSL operations to region-based paths.
regions.go Removes deprecated capability constant alias.
pagination.go Removes legacyPagedResponse generic struct.
paged_response_structs.go Removes deprecated paged response type aliases.
object_storage_object.go Removes deprecated Object Storage ACL config type and v1 methods.
object_storage_keys.go Removes deprecated Cluster field from bucket access.
object_storage_clusters.go Deletes Object Storage clusters types/methods.
object_storage_buckets.go Removes deprecated Cluster fields and switches bucket APIs to region IDs; removes v1 access getter.
object_storage_bucket_certs.go Removes deprecated bucket cert type and v1 methods; standardizes regionID param naming.
network_ips.go Removes deprecated IPAddressUpdateOptions type, v1 update method, and legacy helper.
monitor_alert_definitions.go Removes deprecated fields and type alias; updates method return types to AlertDefinition.
lke_cluster_pools.go Deletes deprecated LKE cluster pool alias APIs/types.
kernels.go Removes deprecated/unpopulated XEN field from LinodeKernel.
instances.go Removes deprecated monthly transfer stats type + method and deprecated Group fields/method.
instance_ips.go Updates UpdateInstanceIPAddress to require IPAddressUpdateOptionsV2.
domains.go Removes deprecated Domain.Group field and stops populating it in update options.
account_maintenance.go Removes deprecated AccountMaintenance.When field and parsing.
account_events.go Removes deprecated misspelled/alias event action constants and deprecated MarkEventRead.

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

Comment thread object_storage_buckets.go Outdated
Comment thread test/unit/object_storage_bucket_test.go Outdated
Comment thread object_storage_object.go Outdated
@ezilber-akamai ezilber-akamai force-pushed the TPT-4421-remove-deprecated-fields-methods branch from 1d242e1 to 1507d5f Compare May 1, 2026 20:04
@zliang-akamai zliang-akamai requested a review from Copilot May 1, 2026 22:49

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

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


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

Comment thread test/unit/object_storage_bucket_cert_test.go Outdated
Comment thread test/unit/object_storage_bucket_cert_test.go Outdated
@zliang-akamai zliang-akamai added the breaking-change for breaking changes in the changelog. label May 4, 2026
@zliang-akamai zliang-akamai requested review from a team and mgwoj and removed request for a team May 4, 2026 15:32
Comment thread domains.go Outdated
Comment thread object_storage_buckets.go Outdated
@lgarber-akamai

Copy link
Copy Markdown
Contributor

Just a couple tiny things, otherwise looks great!

@lgarber-akamai lgarber-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.

Looks great! Should be good to merge after conflicts are resolved

@ezilber-akamai ezilber-akamai merged commit df9cb24 into linode:proj/linodego_v2 May 5, 2026
10 checks passed
zliang-akamai added a commit that referenced this pull request May 27, 2026
* TPT-4423: Drop resty as a dependency (#938)

* Ported resty removal changes to new branch from up-to-date main and made additional changes to monitor client

* Fixed lint

* Updated log formatting to more closely resemble Resty's

* Fixed lint

* redact request header log

* Fixes

* Fixed CoPilot suggestions

* Sanitize log output

* Addressed CoPilot comments

---------

Co-authored-by: Zhiwei Liang <zliang@akamai.com>

* TPT-4421: Remove deprecated fields and methods (#946)

* Removed deprecated fields and methods and updated tests

* Fix lint

* Addressed copilot suggestion

* Fixed lint

* Removed V2 suffix from various fields and methods

* Addressed CoPilot suggestions

* Added separate struct for Instance IP Address update options

* Address PR suggestions

* TPT-4414: Refactor JSON tags to use "omitzero" for optional fields across multiple files (#947)

* Refactor JSON struct tags to use "omitzero" for optional fields

* Remove url tags in pagination structs

* TPT-4414: Change slice pointer types with `omitzero` to be slice (#954)

* Refactor: Change pointer slices to slices for various fields with omitzero

* Refresh fixtures

* Update TestLKECluster_Update to remove pinned lke versions in test

* TPT-4434: Added custom type for Region Capabilities and updated tests (#953)

* Added custom type for Region Capabilities and updated tests

* Fix formatting

* Added disctinction between Object Storage Bucket Access POST/PUT endpoints (#951)

* TPT-3454: Refactor wait functions to use context for timeouts and polling (#964)

* Refactor wait functions to use context for timeouts and polling

* fix context cancelled in cleanup

* nolint generic return type

* Fix grammar

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Make preTask a private function; cleanup unnecessary previousEvents allocation

* Fix error msg format

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* TPT-4422: Added options structs for POST/PUT endpoints that were missing them (#968)

* Added options structs for POST/PUT endpoints that were missing them

* Address PR comments

* Address PR comments

* TPT-3483: Update NewClient method to return an error rather than just logging errors (#967)

* refactor: update NewClient and related functions to handle errors properly

* refactor: update SetRootCertificate to return errors and enhance logging

* update NewClient instantiation to handle errors

* Export PaginatedResponse type in request_helpers (#970)

* TPT-3388: Separated GET and POST/PUT options structs where needed (#969)

* Separated GET and POST/PUT options structs where needed

* Separated additional structs that were reused for options and response

* More struct fixes

* Fix lint

* Rename FirewallRule structs

* integration test fixes

* Addressed PR comments

* FirewallRuleSetRule options; test updates; fixture refreshed

* Address more PR comments

---------

Co-authored-by: Zhiwei Liang <zliang@akamai.com>

* TPT-4464: Update FirewallDeviceEntity Label field to be a pointer (#971)

* Update FirewallDeviceEntity Label field to be a pointer and adjust tests accordingly

* Fix unit tests

* fmt

* Fix another unit test

* Change `[]*T` to `[]T` in all structs (#972)

* Remove LKE cluster dashboard function, tests, and related fixture (#975)

* Simplify client.go (#976)

Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>

* Apply suggestion from @zliang-akamai

* Update region capability in TestImageSharing_Suite to use Linodes

---------

Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
Co-authored-by: Erik Zilber <ezilber@akamai.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Zhiwei Liang <zhiwei.liang@zliang.me>
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