Skip to content

fix: Deflake alloydb omni#2431

Merged
averikitsch merged 2 commits intomainfrom
deflake-alloydb-omni
Feb 13, 2026
Merged

fix: Deflake alloydb omni#2431
averikitsch merged 2 commits intomainfrom
deflake-alloydb-omni

Conversation

@ankel
Copy link
Copy Markdown
Contributor

@ankel ankel commented Feb 6, 2026

Description

Improve logic to check that database is up.

IMPORTANT DO NOT MERGE until I have reverted f7d7d9e

PR Checklist

🛠️ Fixes #2422

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @ankel, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request aims to significantly improve the reliability and stability of the AlloyDB Omni integration tests. It addresses flakiness by implementing a retry mechanism in the CI pipeline and, more importantly, by refining the logic used to determine when the database container is fully up and ready to accept connections. These changes collectively reduce the chances of transient test failures.

Highlights

  • CI Test Retries: Implemented a retry mechanism for AlloyDB Omni integration tests in the CI pipeline, allowing them to run up to 10 times to mitigate transient failures and improve test stability.
  • Database Readiness Check Improvement: Enhanced the database startup readiness check for AlloyDB Omni integration tests by using more reliable log messages ('database system was shut down at' and 'database system is ready to accept connections') instead of a less consistent 'Post Startup' message. This ensures the database is fully operational before tests proceed.
  • Code Refactoring: Extracted the PostgreSQL URL construction logic into a new helper function buildPostgresURL from initPostgresConnectionPool to improve code modularity and readability within the integration tests.
Changelog
  • .ci/integration.cloudbuild.yaml
    • Added a for loop to retry AlloyDB Omni integration tests up to 10 times.
  • tests/alloydbomni/alloydb_omni_integration_test.go
    • Refactored initPostgresConnectionPool to extract URL building into a new buildPostgresURL helper function.
    • Updated setupAlloyDBContainer to use more robust log messages for database readiness checks (database system was shut down at, database system is ready to accept connections).
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to fix flakiness in the AlloyDB Omni integration tests. The changes to alloydb_omni_integration_test.go are good, particularly the improved logic for checking database readiness in the test container. This should effectively address the root cause of the flakiness. However, the change in .ci/integration.cloudbuild.yaml to run the tests in a loop 10 times seems like a temporary workaround that will significantly increase CI execution time. I've recommended removing this loop, as the primary fix should make it redundant.

Comment thread .ci/integration.cloudbuild.yaml Outdated
@ankel ankel changed the title Deflake alloydb omni fix: Deflake alloydb omni Feb 6, 2026
@ankel ankel force-pushed the deflake-alloydb-omni branch 4 times, most recently from d73dbb5 to 66c951a Compare February 10, 2026 17:50
On first startup, alloydb omni restarts the database twice. This can resulted in incorrect start up signal. This commit for this restart to improve reliability when detecting database startup.

Tested with 100 runs locally.

#2422
@ankel ankel force-pushed the deflake-alloydb-omni branch 2 times, most recently from 1964b4f to f7d7d9e Compare February 10, 2026 21:49
@ankel ankel requested a review from averikitsch February 11, 2026 02:09
@ankel ankel marked this pull request as ready for review February 11, 2026 02:09
@ankel ankel requested review from a team February 11, 2026 02:09
@ankel ankel force-pushed the deflake-alloydb-omni branch from f7d7d9e to 518dfff Compare February 11, 2026 20:19
@averikitsch averikitsch enabled auto-merge (squash) February 13, 2026 17:30
@averikitsch averikitsch merged commit 62b8309 into main Feb 13, 2026
12 of 13 checks passed
@averikitsch averikitsch deleted the deflake-alloydb-omni branch February 13, 2026 17:55
rahulpinto19 pushed a commit that referenced this pull request Feb 16, 2026
## Description

Improve logic to check that database is up.

**IMPORTANT** DO NOT MERGE until I have reverted
f7d7d9e

## PR Checklist

- [x] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [x] #2422
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
- [ ] Make sure to add `!` if this involve a breaking change

🛠️ Fixes #2422

Co-authored-by: Averi Kitsch <akitsch@google.com>
nester-neo4j pushed a commit to nester-neo4j/genai-toolbox that referenced this pull request Feb 17, 2026
## Description

Improve logic to check that database is up.

**IMPORTANT** DO NOT MERGE until I have reverted
googleapis@f7d7d9e

## PR Checklist

- [x] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [x] googleapis#2422
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
- [ ] Make sure to add `!` if this involve a breaking change

🛠️ Fixes googleapis#2422

Co-authored-by: Averi Kitsch <akitsch@google.com>
duwenxin99 added a commit that referenced this pull request Mar 2, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.28.0](v0.27.0...v0.28.0)
(2026-03-02)


### Features

* Add polling system to dynamic reloading
([#2466](#2466))
([fcaac9b](fcaac9b))
* Added basic template for sdks doc migrate
([#1961](#1961))
([87f2eaf](87f2eaf))
* **dataproc:** Add dataproc source and list/get clusters/jobs tools
([#2407](#2407))
([cc05e57](cc05e57))
* **sources/postgres:** Add configurable pgx query execution mode
([#2477](#2477))
([57b77bc](57b77bc))
* **sources/redis:** Add TLS support for Redis connections
([#2432](#2432))
([d6af290](d6af290))
* **tools/looker:** Enable Get All Lookml Tests, Run LookML Tests, and
Create View From Table tools for Looker
([#2522](#2522))
([e01139a](e01139a))
* **tools/looker:** Tools to list/create/delete directories
([#2488](#2488))
([0036d8c](0036d8c))
* **ui:** Make tool list panel resizable
([#2253](#2253))
([276cf60](276cf60))


### Bug Fixes

* **ci:** Add path for forked PR unit test runs
([#2540](#2540))
([04dd2a7](04dd2a7))
* Deflake alloydb omni
([#2431](#2431))
([62b8309](62b8309))
* **docs/adk:** Resolve dependency duplication
([#2418](#2418))
([4d44abb](4d44abb))
* **docs/langchain:** Fix core at 0.3.0 and align compatible
dependencies
([#2426](#2426))
([36edfd3](36edfd3))
* Enforce required validation for explicit null parameter values
([#2519](#2519))
([d5e9512](d5e9512))
* **oracle:** Enable DML operations and resolve incorrect array type
error ([#2323](#2323))
([72146a4](72146a4))
* **server/mcp:** Guard nil dereference in sseManager.get
([#2557](#2557))
([e534196](e534196)),
closes [#2548](#2548)
* **tests/postgres:** Implement uuid-based isolation and reliable
resource cleanup
([#2377](#2377))
([8a96fb1](8a96fb1))
* **tests/postgres:** Restore list_schemas test and implement dynamic
owner ([#2521](#2521))
([7041e79](7041e79))
* **tests:** Resolve LlamaIndex dependency conflict in JS quickstart
([#2597](#2597))
([ac11f5a](ac11f5a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Mar 2, 2026
🤖 I have created a release *beep* *boop*
---

##
[0.28.0](v0.27.0...v0.28.0)
(2026-03-02)

### Features

* Add polling system to dynamic reloading
([#2466](#2466))
([fcaac9b](fcaac9b))
* Added basic template for sdks doc migrate
([#1961](#1961))
([87f2eaf](87f2eaf))
* **dataproc:** Add dataproc source and list/get clusters/jobs tools
([#2407](#2407))
([cc05e57](cc05e57))
* **sources/postgres:** Add configurable pgx query execution mode
([#2477](#2477))
([57b77bc](57b77bc))
* **sources/redis:** Add TLS support for Redis connections
([#2432](#2432))
([d6af290](d6af290))
* **tools/looker:** Enable Get All Lookml Tests, Run LookML Tests, and
Create View From Table tools for Looker
([#2522](#2522))
([e01139a](e01139a))
* **tools/looker:** Tools to list/create/delete directories
([#2488](#2488))
([0036d8c](0036d8c))
* **ui:** Make tool list panel resizable
([#2253](#2253))
([276cf60](276cf60))

### Bug Fixes

* **ci:** Add path for forked PR unit test runs
([#2540](#2540))
([04dd2a7](04dd2a7))
* Deflake alloydb omni
([#2431](#2431))
([62b8309](62b8309))
* **docs/adk:** Resolve dependency duplication
([#2418](#2418))
([4d44abb](4d44abb))
* **docs/langchain:** Fix core at 0.3.0 and align compatible
dependencies
([#2426](#2426))
([36edfd3](36edfd3))
* Enforce required validation for explicit null parameter values
([#2519](#2519))
([d5e9512](d5e9512))
* **oracle:** Enable DML operations and resolve incorrect array type
error ([#2323](#2323))
([72146a4](72146a4))
* **server/mcp:** Guard nil dereference in sseManager.get
([#2557](#2557))
([e534196](e534196)),
closes [#2548](#2548)
* **tests/postgres:** Implement uuid-based isolation and reliable
resource cleanup
([#2377](#2377))
([8a96fb1](8a96fb1))
* **tests/postgres:** Restore list_schemas test and implement dynamic
owner ([#2521](#2521))
([7041e79](7041e79))
* **tests:** Resolve LlamaIndex dependency conflict in JS quickstart
([#2597](#2597))
([ac11f5a](ac11f5a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com> 81253a0
github-actions bot pushed a commit to renovate-bot/googleapis-_-genai-toolbox that referenced this pull request Mar 3, 2026
🤖 I have created a release *beep* *boop*
---

##
[0.28.0](googleapis/mcp-toolbox@v0.27.0...v0.28.0)
(2026-03-02)

### Features

* Add polling system to dynamic reloading
([googleapis#2466](googleapis#2466))
([fcaac9b](googleapis@fcaac9b))
* Added basic template for sdks doc migrate
([googleapis#1961](googleapis#1961))
([87f2eaf](googleapis@87f2eaf))
* **dataproc:** Add dataproc source and list/get clusters/jobs tools
([googleapis#2407](googleapis#2407))
([cc05e57](googleapis@cc05e57))
* **sources/postgres:** Add configurable pgx query execution mode
([googleapis#2477](googleapis#2477))
([57b77bc](googleapis@57b77bc))
* **sources/redis:** Add TLS support for Redis connections
([googleapis#2432](googleapis#2432))
([d6af290](googleapis@d6af290))
* **tools/looker:** Enable Get All Lookml Tests, Run LookML Tests, and
Create View From Table tools for Looker
([googleapis#2522](googleapis#2522))
([e01139a](googleapis@e01139a))
* **tools/looker:** Tools to list/create/delete directories
([googleapis#2488](googleapis#2488))
([0036d8c](googleapis@0036d8c))
* **ui:** Make tool list panel resizable
([googleapis#2253](googleapis#2253))
([276cf60](googleapis@276cf60))

### Bug Fixes

* **ci:** Add path for forked PR unit test runs
([googleapis#2540](googleapis#2540))
([04dd2a7](googleapis@04dd2a7))
* Deflake alloydb omni
([googleapis#2431](googleapis#2431))
([62b8309](googleapis@62b8309))
* **docs/adk:** Resolve dependency duplication
([googleapis#2418](googleapis#2418))
([4d44abb](googleapis@4d44abb))
* **docs/langchain:** Fix core at 0.3.0 and align compatible
dependencies
([googleapis#2426](googleapis#2426))
([36edfd3](googleapis@36edfd3))
* Enforce required validation for explicit null parameter values
([googleapis#2519](googleapis#2519))
([d5e9512](googleapis@d5e9512))
* **oracle:** Enable DML operations and resolve incorrect array type
error ([googleapis#2323](googleapis#2323))
([72146a4](googleapis@72146a4))
* **server/mcp:** Guard nil dereference in sseManager.get
([googleapis#2557](googleapis#2557))
([e534196](googleapis@e534196)),
closes [googleapis#2548](googleapis#2548)
* **tests/postgres:** Implement uuid-based isolation and reliable
resource cleanup
([googleapis#2377](googleapis#2377))
([8a96fb1](googleapis@8a96fb1))
* **tests/postgres:** Restore list_schemas test and implement dynamic
owner ([googleapis#2521](googleapis#2521))
([7041e79](googleapis@7041e79))
* **tests:** Resolve LlamaIndex dependency conflict in JS quickstart
([googleapis#2597](googleapis#2597))
([ac11f5a](googleapis@ac11f5a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com> 81253a0
NightStack15 added a commit to NightStack15/googleapis-_-genai-toolbox that referenced this pull request Mar 20, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.28.0](googleapis/mcp-toolbox@v0.27.0...v0.28.0)
(2026-03-02)


### Features

* Add polling system to dynamic reloading
([#2466](googleapis/mcp-toolbox#2466))
([fcaac9b](googleapis/mcp-toolbox@fcaac9b))
* Added basic template for sdks doc migrate
([#1961](googleapis/mcp-toolbox#1961))
([87f2eaf](googleapis/mcp-toolbox@87f2eaf))
* **dataproc:** Add dataproc source and list/get clusters/jobs tools
([#2407](googleapis/mcp-toolbox#2407))
([cc05e57](googleapis/mcp-toolbox@cc05e57))
* **sources/postgres:** Add configurable pgx query execution mode
([#2477](googleapis/mcp-toolbox#2477))
([57b77bc](googleapis/mcp-toolbox@57b77bc))
* **sources/redis:** Add TLS support for Redis connections
([#2432](googleapis/mcp-toolbox#2432))
([d6af290](googleapis/mcp-toolbox@d6af290))
* **tools/looker:** Enable Get All Lookml Tests, Run LookML Tests, and
Create View From Table tools for Looker
([#2522](googleapis/mcp-toolbox#2522))
([e01139a](googleapis/mcp-toolbox@e01139a))
* **tools/looker:** Tools to list/create/delete directories
([#2488](googleapis/mcp-toolbox#2488))
([0036d8c](googleapis/mcp-toolbox@0036d8c))
* **ui:** Make tool list panel resizable
([#2253](googleapis/mcp-toolbox#2253))
([276cf60](googleapis/mcp-toolbox@276cf60))


### Bug Fixes

* **ci:** Add path for forked PR unit test runs
([#2540](googleapis/mcp-toolbox#2540))
([04dd2a7](googleapis/mcp-toolbox@04dd2a7))
* Deflake alloydb omni
([#2431](googleapis/mcp-toolbox#2431))
([62b8309](googleapis/mcp-toolbox@62b8309))
* **docs/adk:** Resolve dependency duplication
([#2418](googleapis/mcp-toolbox#2418))
([4d44abb](googleapis/mcp-toolbox@4d44abb))
* **docs/langchain:** Fix core at 0.3.0 and align compatible
dependencies
([#2426](googleapis/mcp-toolbox#2426))
([36edfd3](googleapis/mcp-toolbox@36edfd3))
* Enforce required validation for explicit null parameter values
([#2519](googleapis/mcp-toolbox#2519))
([d5e9512](googleapis/mcp-toolbox@d5e9512))
* **oracle:** Enable DML operations and resolve incorrect array type
error ([#2323](googleapis/mcp-toolbox#2323))
([72146a4](googleapis/mcp-toolbox@72146a4))
* **server/mcp:** Guard nil dereference in sseManager.get
([#2557](googleapis/mcp-toolbox#2557))
([e534196](googleapis/mcp-toolbox@e534196)),
closes [#2548](googleapis/mcp-toolbox#2548)
* **tests/postgres:** Implement uuid-based isolation and reliable
resource cleanup
([#2377](googleapis/mcp-toolbox#2377))
([8a96fb1](googleapis/mcp-toolbox@8a96fb1))
* **tests/postgres:** Restore list_schemas test and implement dynamic
owner ([#2521](googleapis/mcp-toolbox#2521))
([7041e79](googleapis/mcp-toolbox@7041e79))
* **tests:** Resolve LlamaIndex dependency conflict in JS quickstart
([#2597](googleapis/mcp-toolbox#2597))
([ac11f5a](googleapis/mcp-toolbox@ac11f5a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
NirajNandre pushed a commit to NirajNandre/genai-toolbox-fork that referenced this pull request Mar 24, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.28.0](googleapis/mcp-toolbox@v0.27.0...v0.28.0)
(2026-03-02)


### Features

* Add polling system to dynamic reloading
([googleapis#2466](googleapis#2466))
([fcaac9b](googleapis@fcaac9b))
* Added basic template for sdks doc migrate
([googleapis#1961](googleapis#1961))
([87f2eaf](googleapis@87f2eaf))
* **dataproc:** Add dataproc source and list/get clusters/jobs tools
([googleapis#2407](googleapis#2407))
([cc05e57](googleapis@cc05e57))
* **sources/postgres:** Add configurable pgx query execution mode
([googleapis#2477](googleapis#2477))
([57b77bc](googleapis@57b77bc))
* **sources/redis:** Add TLS support for Redis connections
([googleapis#2432](googleapis#2432))
([d6af290](googleapis@d6af290))
* **tools/looker:** Enable Get All Lookml Tests, Run LookML Tests, and
Create View From Table tools for Looker
([googleapis#2522](googleapis#2522))
([e01139a](googleapis@e01139a))
* **tools/looker:** Tools to list/create/delete directories
([googleapis#2488](googleapis#2488))
([0036d8c](googleapis@0036d8c))
* **ui:** Make tool list panel resizable
([googleapis#2253](googleapis#2253))
([276cf60](googleapis@276cf60))


### Bug Fixes

* **ci:** Add path for forked PR unit test runs
([googleapis#2540](googleapis#2540))
([04dd2a7](googleapis@04dd2a7))
* Deflake alloydb omni
([googleapis#2431](googleapis#2431))
([62b8309](googleapis@62b8309))
* **docs/adk:** Resolve dependency duplication
([googleapis#2418](googleapis#2418))
([4d44abb](googleapis@4d44abb))
* **docs/langchain:** Fix core at 0.3.0 and align compatible
dependencies
([googleapis#2426](googleapis#2426))
([36edfd3](googleapis@36edfd3))
* Enforce required validation for explicit null parameter values
([googleapis#2519](googleapis#2519))
([d5e9512](googleapis@d5e9512))
* **oracle:** Enable DML operations and resolve incorrect array type
error ([googleapis#2323](googleapis#2323))
([72146a4](googleapis@72146a4))
* **server/mcp:** Guard nil dereference in sseManager.get
([googleapis#2557](googleapis#2557))
([e534196](googleapis@e534196)),
closes [googleapis#2548](googleapis#2548)
* **tests/postgres:** Implement uuid-based isolation and reliable
resource cleanup
([googleapis#2377](googleapis#2377))
([8a96fb1](googleapis@8a96fb1))
* **tests/postgres:** Restore list_schemas test and implement dynamic
owner ([googleapis#2521](googleapis#2521))
([7041e79](googleapis@7041e79))
* **tests:** Resolve LlamaIndex dependency conflict in JS quickstart
([googleapis#2597](googleapis#2597))
([ac11f5a](googleapis@ac11f5a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
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.

Cloud Build Failure Reporter: toolbox-test-on-merge (toolbox-testing-438616) failed

3 participants