TPT-2038: Refactor for bucket migration#2276
Open
zliang-akamai wants to merge 11 commits intolinode:devfrom
Open
TPT-2038: Refactor for bucket migration#2276zliang-akamai wants to merge 11 commits intolinode:devfrom
zliang-akamai wants to merge 11 commits intolinode:devfrom
Conversation
7702cc7 to
873a320
Compare
Contributor
There was a problem hiding this comment.
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
BucketAccessorinterface and a sharedGetObjectStorageKeysresolver for OBJ framework resources. - Updated OBJ resource model to expose
RegionOrCluster,BucketLabel, andObjectStorageKeysaccessors (and removed the prior model-specific key-resolution method). - Minor schema/model refactors in
objbucketto 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 GetRegionOrCluster → RegionOrCluster; 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.
dawiddzhafarov
approved these changes
Mar 2, 2026
lgarber-akamai
approved these changes
Apr 27, 2026
Contributor
lgarber-akamai
left a comment
There was a problem hiding this comment.
Looks great and tests are passing locally, nice work!
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.
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