Skip to content

chore(Storage Control) Relocate storage control sample#14094

Open
XrossFox wants to merge 8 commits intoGoogleCloudPlatform:mainfrom
XrossFox:relocate-storage-control-sample
Open

chore(Storage Control) Relocate storage control sample#14094
XrossFox wants to merge 8 commits intoGoogleCloudPlatform:mainfrom
XrossFox:relocate-storage-control-sample

Conversation

@XrossFox
Copy link
Copy Markdown
Contributor

@XrossFox XrossFox commented Apr 20, 2026

Relocate Storage Control sample to delete nested HNS Folders.

Fixes # b/503111470 #14090

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

@XrossFox XrossFox requested review from a team as code owners April 20, 2026 16:56
@product-auto-label product-auto-label Bot added samples Issues that are directly related to samples. api: storage Issues related to the Cloud Storage API. labels Apr 20, 2026
@XrossFox XrossFox added the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 20, 2026
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 20, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the documentation regarding GCS folder behavior and modifies the delete_empty_folders.py script. Key feedback includes a critical bug in the should_retry function where integer status codes are incorrectly compared to gRPC enums, which would prevent retries from functioning. Additionally, the reviewer suggests increasing the MAX_WORKERS count for better performance and moving the retry_policy instantiation to the module level to improve efficiency by avoiding redundant object creation.

Comment thread storagecontrol/hierarchical-namespace/delete_empty_folders.py Outdated
Comment thread storagecontrol/hierarchical-namespace/delete_empty_folders.py Outdated
Comment thread storagecontrol/hierarchical-namespace/delete_empty_folders.py
@XrossFox XrossFox changed the title Relocate storage control sample chore(Storage Control) Relocate storage control sample Apr 20, 2026
@XrossFox XrossFox added the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 20, 2026
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 20, 2026
@XrossFox XrossFox added the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 20, 2026
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 20, 2026
@iennae
Copy link
Copy Markdown
Contributor

iennae commented Apr 21, 2026

generally, you have to do these in 2 phases. 1 create the new location, update documentation, delete old, or freeze the sample where it's being pulled in documentation, move, and then unfreeze. Are you doing either of those processes here?

@XrossFox
Copy link
Copy Markdown
Contributor Author

generally, you have to do these in 2 phases. 1 create the new location, update documentation, delete old, or freeze the sample where it's being pulled in documentation, move, and then unfreeze. Are you doing either of those processes here?

Hello, i forgot and skipped a step by pre-emptively deleting the source. Will restore files, then once merged, edit doc (https://docs.cloud.google.com/storage/docs/hns-buckets-best-practices.md) and then finally delete old code again.

@XrossFox XrossFox added the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 21, 2026
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 21, 2026
@XrossFox XrossFox requested a review from iennae April 21, 2026 19:12
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. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants