chore(bigtable): improve system test instance usage - #18149
chore(bigtable): improve system test instance usage#18149daniel-sanche wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request optimizes and improves the robustness of system tests by configuring the emulator environment, skipping stale instance cleanup when using the emulator, limiting the number of stale instance deletions to conserve API write quotas, and reusing existing instances in several test cases. The review feedback points out that catching generic exceptions during instance deletion could lead to noisy logs in CI/CD if an instance is already deleted, and suggests explicitly catching and ignoring NotFound exceptions.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
| cluster_id=alt_cluster_id, | ||
| location_id=location_id, | ||
| serve_nodes=1, | ||
| # Testing `Backup.restore()`: |
There was a problem hiding this comment.
did this change the behavior? it was testing restoring to a different instance before. Now it's just backing up to a different table? on the same instance?
| client.delete_instance(name=instance.name) | ||
| except NotFound: | ||
| pass | ||
| try: |
There was a problem hiding this comment.
Are instances cleaned up properly in the tests? Over time, would this cause instances to slowly increase on the test project? and eventually we could run into SSD node or HDD node quota and will need to clean up the test project manually
We have been hitting quota limits on bigtable system tests recently. This PR attempts to make a few improovements:
GOOGLE_CLOUD_PROJECTenvvar in system_emulated mode, to prevent talking to the live GCP environment