FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore(bigtable): improve system test instance usage by daniel-sanche · Pull Request #18149 · googleapis/google-cloud-python · GitHub

chore(bigtable): improve system test instance usage - #18149

Open
daniel-sanche wants to merge 6 commits into
googleapis:mainfrom
daniel-sanche:fix_emulator_quota_issues
Open

chore(bigtable): improve system test instance usage#18149
daniel-sanche wants to merge 6 commits into
googleapis:mainfrom
daniel-sanche:fix_emulator_quota_issues

Conversation

daniel-sanche commented Aug 18, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

We have been hitting quota limits on bigtable system tests recently. This PR attempts to make a few improovements:

  • Patched a bug in the system_emulated tests, where the tests would still try to clean up stale GCP instances, even in emulator mode
    • Also set a new dummy GOOGLE_CLOUD_PROJECT envvar in system_emulated mode, to prevent talking to the live GCP environment
  • Improved the stale clean-up logic to add a cap to only clean up at max 5 old instances, along with additional logs
  • Identified a couple placed in the tests where we can re-use existing instances instead of spinning up new ones

gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

daniel-sanche and others added 2 commits August 18, 2026 16:40
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
daniel-sanche marked this pull request as ready for review August 19, 2026 23:01
daniel-sanche requested a review from a team as a code owner August 19, 2026 23:01
cluster_id=alt_cluster_id,
location_id=location_id,
serve_nodes=1,
# Testing `Backup.restore()`:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL