Repository navigation
Conversation
clear_stale_instances() in Bigtable system tests calls delete_instance() directly, which fails whenever a leaked instance still holds backups.
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the stale instance cleanup process to delete all associated backups before deleting the instance itself. A new helper function _delete_instance_backups is added to packages/google-cloud-bigtable/tests/system/utils.py, and clear_stale_instances is updated to lazily initialize a BigtableTableAdminClient and call this helper. Additionally, a new unit test file packages/google-cloud-bigtable/tests/unit/test_system_cleanup.py is introduced to verify this behavior and ensure robustness when listing backups fails. There are no review comments, and I have no feedback to provide.
This branch has not been deployed
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.
Context & Problem
clear_stale_instances() in Bigtable system tests calls delete_instance() directly, which fails whenever a leaked instance still holds backups.
Summary of Changes
Why This Approach
Fixes the backup-blocking failure inside the shared stale-instance helper without modifying production client code.
Intentionally Out of Scope
Verification
nox -s lint mypy unit-3.14 unit-3.10 cover and two independent Owl review passes