Repository navigation
Conversation
Bigtable v2_client system tests never invoke clear_stale_instances(), data system tests pass only a single prefix instead of all default test prefixes, and v2_client session fixtures do not wrap creation waits in try/finally.
There was a problem hiding this comment.
Code Review
This pull request refactors the system test setup for Google Cloud Bigtable. It updates the stale instance cleanup logic and improves robustness in the admin_instance_populated and data_instance_populated fixtures by wrapping creation and deletion in try-finally blocks to handle timeouts and NotFound exceptions. Feedback was provided to explicitly pass older_than_days=1 to clear_stale_instances in the new cleanup fixture to maintain consistency with its docstring and other test configurations.
| return | ||
| from tests.system.utils import clear_stale_instances | ||
|
|
||
| clear_stale_instances(admin_client.project) |
There was a problem hiding this comment.
To ensure consistency with the docstring ("Automatically deletes stale test instances older than 1 day") and the implementation in tests/system/data/__init__.py, please explicitly pass older_than_days=1 to clear_stale_instances.
| clear_stale_instances(admin_client.project) | |
| clear_stale_instances(admin_client.project, older_than_days=1) |
There was a problem hiding this comment.
Updated to pass older_than_days=1 explicitly so it matches the docstring and the other cleanup fixtures. (commit 2afa3d75)
|
Closing speculative hardening PR without live leaked-resource evidence |
Context & Problem
Bigtable v2_client system tests never invoke clear_stale_instances(), data system tests pass only a single prefix instead of all default test prefixes, and v2_client session fixtures do not wrap creation waits in try/finally.
Summary of Changes
Why This Approach
Wires the existing stale-instance sweeper into all remaining system test suites and prevents timed-out instance creations from leaking clusters.
Intentionally Out of Scope
Verification
nox -s lint mypy unit-3.14 unit-3.10 cover and two independent Owl review passes