Skip to content

Conversation

@zliang-akamai
Copy link
Member

📝 Description

Add support for resource locks related API changes.

✔️ How to Test

make TEST_ARGS="-run TestLocks" fixtures

This is a known issue in the API and is expected to be fixed soon:

Error deleting lock: [200] Unexpected Content-Type: Expected: application/json, Received: text/html; charset=utf-8

I manually patched the fixtures to avoid the CI failure. We will be able to verify the API fix and regenerate the fixtures weeks later.

Copilot AI review requested due to automatic review settings November 20, 2025 22:16
@zliang-akamai zliang-akamai requested a review from a team as a code owner November 20, 2025 22:16
@zliang-akamai zliang-akamai requested review from ezilber-akamai and vshanthe and removed request for a team November 20, 2025 22:16
Copy link
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 resource locks API, enabling users to create, retrieve, list, and delete locks on Linode resources to prevent accidental deletion.

Key changes:

  • New locks API client methods (Create, Get, List, Delete)
  • Integration tests validating lock functionality
  • Instance model extended to expose applied locks

Reviewed Changes

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

File Description
locks.go Implements Lock types and API client methods for lock operations
instances.go Adds Locks field to Instance struct to expose lock states
test/integration/locks_test.go Integration tests covering lock CRUD operations and instance lock field
test/integration/fixtures/TestLocks.yaml HTTP fixtures for lock integration tests

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant