linodego v2#973
Merged
Merged
Conversation
* 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>
* 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
…ross multiple files (#947) * Refactor JSON struct tags to use "omitzero" for optional fields * Remove url tags in pagination structs
* Refactor: Change pointer slices to slices for various fields with omitzero * Refresh fixtures * Update TestLKECluster_Update to remove pinned lke versions in test
…#953) * Added custom type for Region Capabilities and updated tests * Fix formatting
…ling (#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>
…ing them (#968) * Added options structs for POST/PUT endpoints that were missing them * Address PR comments * Address PR comments
… 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
* 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>
* Update FirewallDeviceEntity Label field to be a pointer and adjust tests accordingly * Fix unit tests * fmt * Fix another unit test
Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR moves linodego toward a v2 API shape by removing deprecated compatibility surfaces, replacing Resty usage with net/http-based request handling, and updating tests/fixtures for the new method signatures and data models.
Changes:
- Updates public option structs, JSON tags, and method signatures for v2-style APIs.
- Removes deprecated object storage cluster, LKE cluster pool, Resty HTTP retry compatibility, and older v1/v2 duplicate methods.
- Updates unit/integration tests and fixtures for region capability types, wait contexts, pointer/value model changes, and new net/http client behavior.
Reviewed changes
Copilot reviewed 102 out of 210 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
vpc.go |
Updates VPC option JSON tags. |
vpc_subnet.go |
Updates subnet IPv6 option JSON tags. |
volumes.go |
Adds volume clone/resize option structs and updates signatures/tags. |
tags.go |
Updates tag create option JSON tags. |
stackscripts.go |
Updates StackScript UDF JSON tags. |
profile.go |
Updates profile option tags and authorized key slice handling. |
placement_groups.go |
Updates placement group option tags. |
pagination.go |
Reworks list option request mutation for net/http. |
object_storage_object.go |
Consolidates object ACL APIs and switches bucket identifiers to regions. |
object_storage_keys.go |
Updates bucket access create options and removes cluster usage. |
object_storage_clusters.go |
Removes deprecated object storage cluster API. |
object_storage_bucket_certs.go |
Consolidates bucket cert API around pointer-based response fields. |
nodebalancer.go |
Updates node balancer option types and tags. |
nodebalancer_configs.go |
Updates node balancer config option tags. |
nodebalancer_config_vpc.go |
Updates VPC config JSON tag. |
nodebalancer_config_nodes.go |
Updates node option JSON tags. |
network_ranges.go |
Updates IPv6 range option tags. |
network_ips.go |
Consolidates IP address update options and methods. |
monitor_api_services.go |
Migrates metrics fetch request construction to net/http helpers. |
logger.go |
Reworks logger interface/output and sanitization. |
lke_node_pools.go |
Updates node pool option tags and slice handling. |
lke_clusters.go |
Updates cluster options and removes dashboard API. |
lke_clusters_control_plane.go |
Updates control plane ACL option tags and slice fields. |
lke_cluster_pools.go |
Removes deprecated LKE cluster pool aliases/methods. |
kernels.go |
Removes deprecated kernel XEN field. |
instance_snapshots.go |
Adds snapshot create options and updates snapshot value slices. |
instance_ips.go |
Adds IP add/update option structs and updates method signatures. |
instance_disks.go |
Adds disk resize/password option structs and updates disk methods. |
images.go |
Updates image option tags and rewrites upload URL logic with net/http. |
image_sharegroups_producer.go |
Updates image share group option tags. |
image_sharegroups_consumer.go |
Updates share group token option tag. |
firewalls.go |
Splits firewall rule create/read types and updates option tags. |
firewall_templates.go |
Updates template rule type. |
firewall_devices.go |
Makes firewall device labels nullable. |
domain_records.go |
Updates domain record option tags. |
databases.go |
Updates database JSON tags. |
account.go |
Updates account option tags. |
account_users.go |
Updates user option tags. |
account_user_grants.go |
Updates grants option tags. |
account_settings.go |
Updates account settings option tags. |
account_payments.go |
Updates payment option tag. |
account_oauth_client.go |
Uses no-body POST helper for secret reset. |
account_maintenance.go |
Removes deprecated maintenance When field. |
account_events.go |
Removes deprecated event constants/method. |
account_agreements.go |
Updates agreement option tags. |
config_test.go |
Updates config tests for new client internals. |
request_helpers_test.go |
Updates helper tests for new client constructor and pagination type. |
retries_test.go |
Updates retry tests for net/http retry functions. |
retries_http.go |
Removes old unused HTTP retry compatibility file. |
retries_http_test.go |
Removes duplicate old HTTP retry tests. |
request_log_template.tmpl |
Adds request debug log template. |
response_log_template.tmpl |
Adds response debug log template. |
README.md |
Updates client construction example for returned error. |
go.mod |
Removes Resty dependency and updates module metadata. |
go.sum |
Removes unused Resty/x-time checksums. |
internal/testutil/mock.go |
Adds mock client helper for constructors returning errors. |
k8s/go.mod |
Removes Resty dependency from k8s module. |
k8s/go.sum |
Removes Resty checksums from k8s module. |
test/go.mod |
Removes Resty dependency from test module. |
test/go.sum |
Removes Resty checksums from test module. |
test/unit/base.go |
Uses new mock client helper. |
test/unit/util_test.go |
Uses new mock client helper. |
test/unit/waitfor_test.go |
Adds unit tests for wait/poller context behavior. |
test/unit/volume_test.go |
Updates volume tests for new option structs. |
test/unit/region_test.go |
Updates capability assertions. |
test/unit/object_storage_object_test.go |
Updates object ACL API tests. |
test/unit/object_storage_cluster_test.go |
Removes deprecated cluster tests. |
test/unit/object_storage_bucket_test.go |
Updates bucket tests for region-based APIs and access methods. |
test/unit/object_storage_bucket_cert_test.go |
Updates bucket cert tests for consolidated pointer response type. |
test/unit/nodebalancers_test.go |
Updates config slice type usage. |
test/unit/nodebalancer_types_test.go |
Fixes comment casing. |
test/unit/nodebalancer_test.go |
Updates tags slice usage. |
test/unit/network_ips_test.go |
Updates IP address update API test. |
test/unit/lke_node_pools_test.go |
Updates tags slice usage. |
test/unit/lke_clusters_test.go |
Updates cluster tags usage and removes dashboard test. |
test/unit/lke_cluster_pool_test.go |
Removes deprecated cluster pool tests. |
test/unit/lke_cluster_control_plane_acl_test.go |
Updates ACL address slices. |
test/unit/interface_test.go |
Updates interface option types and slices. |
test/unit/instance_test.go |
Updates monthly transfer assertions and boot/reboot option structs. |
test/unit/instance_ip_test.go |
Updates instance IP add/update option structs. |
test/unit/instance_disks_test.go |
Updates disk clone/resize/password tests. |
test/unit/instance_config_interfaces_test.go |
Updates VPC IPv4 option types and slices. |
test/unit/instance_backup_test.go |
Updates snapshot create option usage. |
test/unit/images_test.go |
Updates image tag slices and mocks upload PUT. |
test/unit/firewall_rulesets_test.go |
Updates rule set types and fixtures. |
test/unit/firewall_devices_test.go |
Updates nullable firewall device label assertions. |
test/integration/integration_suite_test.go |
Updates client construction, wait helper, and capability typing. |
test/integration/waitfor_test.go |
Updates wait calls to context-based API. |
test/integration/vpc_test.go |
Updates capability typing. |
test/integration/vpc_subnet_test.go |
Updates capability typing. |
test/integration/volumes_test.go |
Updates capabilities, wait contexts, and resize options. |
test/integration/vlans_test.go |
Updates wait contexts and capability typing. |
test/integration/tags_test.go |
Updates tag slice handling and capability typing. |
test/integration/postgres_test.go |
Updates DB setup/wait APIs and allow list slices. |
test/integration/postgres_db_config_test.go |
Passes wait context into Postgres setup/update waits. |
test/integration/placement_group_test.go |
Updates capability typing. |
test/integration/object_storage_quota_test.go |
Updates quota assertions to fixture-specific values. |
test/integration/object_storage_object_test.go |
Updates object storage object tests for region-based APIs. |
test/integration/object_storage_keys_test.go |
Updates key bucket access options and assertions. |
test/integration/object_storage_clusters_test.go |
Removes deprecated cluster integration test. |
test/integration/object_storage_bucket_certs_test.go |
Updates bucket cert smoke test for consolidated API. |
test/integration/nodebalancers_test.go |
Updates capability typing. |
test/integration/nodebalancer_configs_test.go |
Updates capability typing and VPC option type. |
test/integration/nodebalancer_config_nodes_test.go |
Updates instance IP add option usage. |
test/integration/mysql_test.go |
Updates DB setup/wait APIs and allow list slices. |
test/integration/mysql_db_config_test.go |
Passes wait context into MySQL setup/update waits. |
test/integration/monitor_services_token_creation_test.go |
Passes wait context into Postgres setup. |
test/integration/monitor_api_service_test.go |
Passes wait context through monitor setup. |
test/integration/monitor_alert_definitions_test.go |
Updates alert wait API to context timeout. |
test/integration/maintenance_test.go |
Uses typed maintenance policy list client method. |
test/integration/main_test.go |
Updates firewall rule creation types. |
test/integration/lke_node_pools_test.go |
Updates wait contexts and node pool option slices. |
test/integration/lke_clusters_acl_test.go |
Updates ACL address slices. |
test/integration/instance_snapshots_test.go |
Updates snapshot/wait APIs and setup context. |
test/integration/instance_interfaces_test.go |
Updates capability typing and interface option slices. |
test/integration/images_test.go |
Updates image waits, capabilities, and tag slices. |
test/integration/image_sharegroups_test.go |
Updates image sharing wait and region selection. |
test/integration/cache_test.go |
Updates request URL/query access for net/http request type. |
test/integration/example_nodebalancers_test.go |
Updates example for instance IP add options. |
test/integration/databases_test.go |
Updates DB setup and wait helper signatures. |
test/integration/firewalls_test.go |
Updates firewall rule types and tag slices. |
test/integration/firewalls_devices_test.go |
Updates nullable firewall device label checks. |
test/integration/firewall_rulesets_test.go |
Updates firewall rule set option types. |
test/integration/firewall_rules_test.go |
Splits inbound/outbound firewall rule test types. |
test/integration/fixtures/*.yaml |
Refreshes recorded fixtures for updated APIs and responses. |
test/unit/fixtures/*.json |
Removes fixtures for deleted deprecated APIs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ezilber-akamai
approved these changes
May 27, 2026
ezilber-akamai
approved these changes
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking changes bundle for linodego v2.