Skip to content

TPT-2038: Refactor for bucket migration#2276

Open
zliang-akamai wants to merge 11 commits intolinode:devfrom
zliang-akamai:zhiwei/refactor-for-bucket-migration
Open

TPT-2038: Refactor for bucket migration#2276
zliang-akamai wants to merge 11 commits intolinode:devfrom
zliang-akamai:zhiwei/refactor-for-bucket-migration

Conversation

@zliang-akamai
Copy link
Copy Markdown
Member

@zliang-akamai zliang-akamai commented Feb 28, 2026

Description

Refactor the helper function that gets OBJ keys from framework data model to be shared among multiple framework models who implements the interface.

Test

make PKG_NAME="obj" test-int

@zliang-akamai zliang-akamai force-pushed the zhiwei/refactor-for-bucket-migration branch from 7702cc7 to 873a320 Compare February 28, 2026 05:16
@zliang-akamai zliang-akamai marked this pull request as ready for review February 28, 2026 05:21
@zliang-akamai zliang-akamai requested a review from a team as a code owner February 28, 2026 05:21
@zliang-akamai zliang-akamai requested review from Copilot, dawiddzhafarov and lgarber-akamai and removed request for a team February 28, 2026 05:21
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

Refactors Object Storage (OBJ) key/identifier access in preparation for bucket migration by extracting common “bucket context” accessors and centralizing Object Storage key resolution.

Changes:

  • Added BucketAccessor interface and a shared GetObjectStorageKeys resolver for OBJ framework resources.
  • Updated OBJ resource model to expose RegionOrCluster, BucketLabel, and ObjectStorageKeys accessors (and removed the prior model-specific key-resolution method).
  • Minor schema/model refactors in objbucket to support consistent bucket attribute handling.

Reviewed changes

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

Show a summary per file
File Description
linode/objbucket/framework_models.go Adds helper accessors on the framework bucket model (RegionOrCluster, BucketLabel).
linode/objbucket/framework_datasource_schema.go Reorders/organizes datasource attributes (no functional behavior change expected).
linode/obj/helpers.go Switches to the new package-level GetObjectStorageKeys resolver.
linode/obj/framework_resource.go Updates logging to use the renamed RegionOrCluster model method.
linode/obj/framework_models.go Renames GetRegionOrClusterRegionOrCluster; adds ObjectStorageKeys and BucketLabel; removes model-scoped key resolution.
linode/obj/bucket_accessor.go Introduces BucketAccessor + centralized GetObjectStorageKeys implementation.

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

@zliang-akamai zliang-akamai requested a review from a team as a code owner March 27, 2026 00:26
@zliang-akamai zliang-akamai requested review from psnoch-akamai and removed request for a team March 27, 2026 00:26
@zliang-akamai zliang-akamai changed the title Refactor for bucket migration TPT-2038: Refactor for bucket migration Apr 8, 2026
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.

Looks great and tests are passing locally, nice work!

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.

4 participants