Skip to content

chore(storage): Update move logic now to support non-HNS buckets#32157

Open
shubhangi-google wants to merge 10 commits into
googleapis:mainfrom
shubhangi-google:refactor_move_object
Open

chore(storage): Update move logic now to support non-HNS buckets#32157
shubhangi-google wants to merge 10 commits into
googleapis:mainfrom
shubhangi-google:refactor_move_object

Conversation

@shubhangi-google

@shubhangi-google shubhangi-google commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

This pull request broadens the utility of the move_file operation within the Google Cloud Storage Ruby client library. By removing the prior limitation to Hierarchical Namespace (HNS) enabled buckets, the move_file method can now be used with any bucket type, making the storage client more versatile and user-friendly for file management tasks.

Highlights

  • Expanded move_file functionality: The move_file operation in the Google Cloud Storage client library now supports all bucket types, removing the previous restriction to only Hierarchical Namespace (HNS) enabled buckets.
  • Documentation Update: The documentation for the move_file method has been updated to reflect its broader applicability across all bucket types.
  • Enhanced Acceptance Tests: New acceptance tests have been added and existing ones modified to validate the move_file functionality on standard buckets, including tests for successful file movement and proper error handling when source and destination filenames are identical.

@shubhangi-google shubhangi-google changed the title remove references to hns from test cases Chore: Update move logic now to support non-HNS buckets Nov 5, 2025
@shubhangi-google shubhangi-google changed the title Chore: Update move logic now to support non-HNS buckets Chore(storage) : Update move logic now to support non-HNS buckets Nov 5, 2025
@shubhangi-google shubhangi-google changed the title Chore(storage) : Update move logic now to support non-HNS buckets chore(storage) : Update move logic now to support non-HNS buckets Nov 5, 2025
@shubhangi-google shubhangi-google changed the title chore(storage) : Update move logic now to support non-HNS buckets chore(storage): Update move logic now to support non-HNS buckets Nov 5, 2025
@shubhangi-google shubhangi-google marked this pull request as ready for review November 5, 2025 12:22
@shubhangi-google shubhangi-google requested review from a team November 5, 2025 12:22
Pulkit0110
Pulkit0110 previously approved these changes Nov 6, 2025
@cpriti-os

Copy link
Copy Markdown

@shubhangi-google could you check why presubmits are failing.

@shubhangi-google

Copy link
Copy Markdown
Contributor Author

@shubhangi-google could you check why presubmits are failing.

hi @cpriti-os I am not facing this error when I am running the samples with my user this seems to be a permission issue with the user used by kokoro

@aandreassa aandreassa added the api: storage Issues related to the Cloud Storage API. label Nov 21, 2025

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shubhangi-google AFAIK Move API is only supported for HNS buckets, for Non-HNS we will have to use copy + delete, correct me if I missed something. If not, could you add that and lets see if we still see move permission missing issue in this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @cpriti-os this was the case earlier when move object API was supported by HNS bucekt only (#29391)
purpose of current PR is to provide support of move object- API to both HNS and NON HNS buckets

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shubhangi-google shubhangi-google requested review from a team as code owners June 29, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants