Skip to content

Comments

refactor: consolidate quickstart tests into universal runner#2413

Merged
twishabansal merged 13 commits intomainfrom
quickstart-ci-refactor
Feb 9, 2026
Merged

refactor: consolidate quickstart tests into universal runner#2413
twishabansal merged 13 commits intomainfrom
quickstart-ci-refactor

Conversation

@twishabansal
Copy link
Contributor

@twishabansal twishabansal commented Feb 3, 2026

Description

Tested locally.
Last successful runs:

Note: After merging change path to cloud build yaml files for all these triggers: quickstart-python, quickstart-python-test-on-merge and same for JS and Go.

PR Checklist

Thank you for opening a Pull Request! Before submitting your PR, there are a
few things you can do to make sure it goes smoothly:

  • Make sure you reviewed
    CONTRIBUTING.md
  • Make sure to open an issue as a
    bug/issue
    before writing your code! That way we can discuss the change, evaluate
    designs, and agree on the general idea
  • 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 #<issue_number_goes_here>

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @twishabansal, 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 significantly refactors the continuous integration (CI) testing framework for quickstart examples. It consolidates the previously separate language-specific test execution scripts (Go, JavaScript, Python) into a single, parameterized shell script. This change aims to reduce redundancy, simplify maintenance, and provide a more consistent and robust testing environment for all quickstart examples.

Highlights

  • Unified Test Runner: Replaced separate language-specific test runner scripts (run_go_tests.sh, run_js_tests.sh, run_py_tests.sh) with a single, universal run_tests.sh script.
  • Dynamic Language Support: The new run_tests.sh script dynamically handles test execution for Python, JavaScript, and Go based on environment variables like TARGET_LANG and AGENT_FILE_PATTERN, reducing code duplication.
  • Cloudbuild Configuration Updates: Modified go.integration.cloudbuild.yaml, js.integration.cloudbuild.yaml, and py.integration.cloudbuild.yaml files to invoke the new run_tests.sh and pass necessary language-specific configuration via environment variables.
  • Improved Health Checks and Logging: The universal runner includes enhanced health checks and logging for the Cloud SQL Proxy and Toolbox server startup, making the testing process more robust and easier to debug.
  • Flexible Test Discovery: The new runner incorporates logic to discover and execute native test files (e.g., *test.py, *test.js) or directly run the agent file if no specific test file is found within a sample directory.
Changelog
  • .ci/quickstart_test/go.integration.cloudbuild.yaml
    • Updated the build step to call the new run_tests.sh script.
    • Configured new environment variables (TARGET_ROOT, TARGET_LANG, TABLE_NAME, SQL_FILE, AGENT_FILE_PATTERN) for Go-specific test execution.
  • .ci/quickstart_test/js.integration.cloudbuild.yaml
    • Updated the build step to call the new run_tests.sh script.
    • Configured new environment variables (TARGET_ROOT, TARGET_LANG, TABLE_NAME, SQL_FILE, AGENT_FILE_PATTERN) for JavaScript-specific test execution.
  • .ci/quickstart_test/py.integration.cloudbuild.yaml
    • Updated the build step to call the new run_tests.sh script.
    • Configured new environment variables (TARGET_ROOT, TARGET_LANG, TABLE_NAME, SQL_FILE, AGENT_FILE_PATTERN) for Python-specific test execution.
  • .ci/quickstart_test/run_go_tests.sh
    • Removed, as its functionality is now integrated into the universal run_tests.sh script.
  • .ci/quickstart_test/run_js_tests.sh
    • Removed, as its functionality is now integrated into the universal run_tests.sh script.
  • .ci/quickstart_test/run_py_tests.sh
    • Removed, as its functionality is now integrated into the universal run_tests.sh script.
  • .ci/quickstart_test/run_tests.sh
    • Added a new universal shell script responsible for setting up the test environment.
    • Includes logic to start services (Cloud SQL Proxy, Toolbox) with improved health checks and logging.
    • Executes language-specific quickstart tests (Python, JS, Go) based on provided environment variables.
Activity
  • No human activity has been recorded on this pull request yet.
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
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 successfully consolidates the language-specific quickstart test runners into a single, universal run_tests.sh script. The cloudbuild.yaml files have been updated to utilize this new script and pass the necessary language-specific configurations. This refactoring improves maintainability by centralizing the test execution logic. However, there are a few issues identified regarding cleanup commands, the Go test implementation, and a future copyright year that should be addressed.

twishabansal and others added 3 commits February 3, 2026 14:15
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@twishabansal twishabansal marked this pull request as ready for review February 3, 2026 09:16
@twishabansal twishabansal requested a review from a team as a code owner February 3, 2026 09:16
@twishabansal twishabansal assigned averikitsch and unassigned Yuan325 Feb 3, 2026
Copy link
Contributor

@Yuan325 Yuan325 left a comment

Choose a reason for hiding this comment

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

Can we trigger a run for all go, js, and py quickstart tests in this PR to test the changes? Otherwise LGTM :)

twishabansal and others added 2 commits February 5, 2026 09:47
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
@twishabansal
Copy link
Contributor Author

twishabansal commented Feb 5, 2026

Can we trigger a run for all go, js, and py quickstart tests in this PR to test the changes? Otherwise LGTM :)

It is not possible to run these triggers directly yet because they use the run_test script files in main (not pushed yet). However, I have used the gcloud builds submit command to test the changes in these PR by submitting the build to google cloud. I think that should work for testing the local changes. WDYT?

@twishabansal twishabansal requested a review from Yuan325 February 5, 2026 04:28
Copy link
Contributor

@Yuan325 Yuan325 left a comment

Choose a reason for hiding this comment

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

LGTM :)

@twishabansal twishabansal merged commit bb40cdf into main Feb 9, 2026
11 of 12 checks passed
@twishabansal twishabansal deleted the quickstart-ci-refactor branch February 9, 2026 05:35
nester-neo4j pushed a commit to nester-neo4j/genai-toolbox that referenced this pull request Feb 17, 2026
…pis#2413)

## Description

Tested locally.
Last successful runs:
- Python:
https://pantheon.corp.google.com/cloud-build/builds;region=global/e86608d7-b9df-46b3-b8e6-60f0d6144b59;step=0?e=13802955&mods=-autopush_coliseum&project=toolbox-testing-438616
- JS:
https://pantheon.corp.google.com/cloud-build/builds;region=global/7d8803fb-3e4e-4d0b-8b60-44f0c7962132?e=13802955&mods=-autopush_coliseum&project=toolbox-testing-438616
- Go:
https://pantheon.corp.google.com/cloud-build/builds;region=global/a0d0d693-ec14-422f-aa62-b0ae664005ff?e=13802955&mods=-autopush_coliseum&project=toolbox-testing-438616

Note: After merging change path to cloud build yaml files for all these
triggers: quickstart-python, quickstart-python-test-on-merge and same
for JS and Go.

## PR Checklist

> Thank you for opening a Pull Request! Before submitting your PR, there
are a
> few things you can do to make sure it goes smoothly:

- [ ] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [ ] Make sure to open an issue as a

[bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose)
  before writing your code! That way we can discuss the change, evaluate
  designs, and agree on the general idea
- [ ] 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 #<issue_number_goes_here>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
dumians pushed a commit to dumians/genai-toolbox that referenced this pull request Feb 18, 2026
…pis#2413)

## Description

Tested locally.
Last successful runs:
- Python:
https://pantheon.corp.google.com/cloud-build/builds;region=global/e86608d7-b9df-46b3-b8e6-60f0d6144b59;step=0?e=13802955&mods=-autopush_coliseum&project=toolbox-testing-438616
- JS:
https://pantheon.corp.google.com/cloud-build/builds;region=global/7d8803fb-3e4e-4d0b-8b60-44f0c7962132?e=13802955&mods=-autopush_coliseum&project=toolbox-testing-438616
- Go:
https://pantheon.corp.google.com/cloud-build/builds;region=global/a0d0d693-ec14-422f-aa62-b0ae664005ff?e=13802955&mods=-autopush_coliseum&project=toolbox-testing-438616

Note: After merging change path to cloud build yaml files for all these
triggers: quickstart-python, quickstart-python-test-on-merge and same
for JS and Go.

## PR Checklist

> Thank you for opening a Pull Request! Before submitting your PR, there
are a
> few things you can do to make sure it goes smoothly:

- [ ] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [ ] Make sure to open an issue as a

[bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose)
  before writing your code! That way we can discuss the change, evaluate
  designs, and agree on the general idea
- [ ] 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 #<issue_number_goes_here>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Yuan Teoh <45984206+Yuan325@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.

3 participants