feat(storagecontrol): add delete folder recursive sample - #14382
feat(storagecontrol): add delete folder recursive sample#14382nidhiii-27 wants to merge 7 commits into
Conversation
Adds a Python code sample demonstrating hierarchical namespace recursive folder delete. Fixes: b/530058898 [Generated-by: AI]
There was a problem hiding this comment.
Code Review
This pull request introduces a new script delete_folder_recursive.py to recursively delete folders in Google Cloud Storage using the Storage Control API, along with corresponding integration tests in snippets_test.py. Feedback is provided regarding an incorrect type hint for the capsys fixture in the test file, which should be typed as pytest.CaptureFixture[str] instead of pytest.LogCaptureFixture.
|
|
||
|
|
||
| def test_delete_folder_recursive( | ||
| capsys: pytest.LogCaptureFixture, hns_enabled_bucket: storage.Bucket, uuid_name: str |
There was a problem hiding this comment.
The capsys fixture in pytest is of type pytest.CaptureFixture[str], not pytest.LogCaptureFixture (which is used for caplog). Using the correct type hint avoids static analysis/type-checking warnings.
| capsys: pytest.LogCaptureFixture, hns_enabled_bucket: storage.Bucket, uuid_name: str | |
| capsys: pytest.CaptureFixture[str], hns_enabled_bucket: storage.Bucket, uuid_name: str |
There was a problem hiding this comment.
Done
Co-authored by AI Agent
There was a problem hiding this comment.
Done
Co-authored by AI Agent
…ests Re-enable recursive delete folder integration tests and resolve GCS billing project limitations. [Generated-by: AI]
[Generated-by: AI]
[Generated-by: AI]
[Generated-by: AI]
[Generated-by: AI]
Adds a Python code sample demonstrating hierarchical namespace recursive folder delete.
Fixes: b/530058898