Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Chore: Update move logic now to support non-HNS buckets#2666

Merged
ddelgrosso1 merged 5 commits intomainfrom
refactor/rename-object-samples
Oct 31, 2025
Merged

Chore: Update move logic now to support non-HNS buckets#2666
ddelgrosso1 merged 5 commits intomainfrom
refactor/rename-object-samples

Conversation

@thiyaguk09
Copy link
Contributor

Description

The original file move implementation and its associated tests were rigidly structured around the assumptions and features of Hierarchical Namespace (HNS) enabled buckets. This constraint meant the functionality was unnecessarily restricted.

This change refactors the codebase to remove all explicit references, tags, and dependencies on HNS buckets throughout the move logic and testing stages. The goal is to make the move operation the standard implementation across all bucket types, specifically by:

  1. Code Refactor: Eliminating HNS-specific checks and flags within the move logic.
  2. Test Restructuring: Updating all integration and unit tests related to file moves to use normal (non-HNS) buckets by default, ensuring the logic is validated in the most widely used environment.
  3. Standardization: Ensuring that the underlying copy-and-delete mechanism works seamlessly for standard buckets, achieving full compatibility.

Impact

This change significantly improves the compatibility and simplicity of the file move feature:

  • The move operation is now standardized and fully functional for non-HNS buckets without requiring special flags or logic.
  • It simplifies the codebase by removing domain-specific checks related to HNS.
  • No breaking changes are introduced to the public API signature.

Testing

  • Tests Restructured: All relevant unit and integration tests have been restructured to operate against normal (non-HNS) buckets to validate the core functionality in the default environment.
  • Tests related to HNS-specific logic have been removed or generalized.
  • The tests confirm that the file move operation now executes successfully in a standard bucket environment.
  • No breaking changes are necessary.

Additional Information

This change shifts the assumed operational environment from HNS-specific to general-purpose buckets, simplifying future maintenance and development efforts. This ensures a clean, universal move API that performs correctly regardless of the bucket's HNS status.

Checklist

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease
  • Appropriate docs were updated
  • Appropriate comments were added, particularly in complex areas or places that require background
  • No new warnings or issues will be generated from this change

Fixes #

The existing logic for file move operations was implicitly tied to
features available only in Hierarchical Namespace (HNS) enabled buckets.

This update refactors the underlying move implementation to correctly
handle the different API requirements and constraints of **non-HNS
buckets**.
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/nodejs-storage API. labels Oct 28, 2025
@thiyaguk09 thiyaguk09 marked this pull request as ready for review October 29, 2025 06:00
@thiyaguk09 thiyaguk09 requested a review from a team October 29, 2025 06:00
@thiyaguk09 thiyaguk09 requested a review from a team as a code owner October 29, 2025 06:00
@ddelgrosso1 ddelgrosso1 added the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 30, 2025
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 30, 2025
@ddelgrosso1 ddelgrosso1 merged commit 642c3e8 into main Oct 31, 2025
19 checks passed
@ddelgrosso1 ddelgrosso1 deleted the refactor/rename-object-samples branch October 31, 2025 14:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: storage Issues related to the googleapis/nodejs-storage API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants