-
Notifications
You must be signed in to change notification settings - Fork 991
test(ai): prompt for grep string in debug script #9400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Mocha lets us filter tests using the `--grep` command-line option. This is useful when debugging the AI integration tests, which run against a grid of backend x model. With this grid there may me multiple redundant test runs, and the tests may take >20 minutes. With this new config, we can isolate the test we want to debug. Before running, VSCode will prompt us for a regex to use for grepping tests by name. An example grep string would be `Google AI gemini-2.0-flash generateContent: google search grounding`. Without this, I've been manually editing the input test files to be the file with the test I'm running, then manually editing `integration/constants.ts` to remove the additional backends and model names.
|
Summary of ChangesHello @dlarocque, 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 streamlines the debugging process for AI integration tests by allowing developers to dynamically filter tests using a grep pattern. By integrating a prompt for a search string directly into the VSCode launch configuration, it eliminates the need for manual file edits and reduces the execution time of test suites, making the debugging workflow more efficient and targeted. Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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 introduces a helpful feature for debugging AI integration tests by adding a VS Code launch configuration that prompts for a grep pattern. This allows developers to easily filter and run specific tests, improving the debugging workflow. The implementation is straightforward and correct. I have a couple of minor suggestions to improve the usability of the prompt.
Size Report 1Affected ProductsNo changes between base commit (e6415dd) and merge commit (c9f2026).Test Logs |
Size Analysis Report 1Affected ProductsNo changes between base commit (e6415dd) and merge commit (c9f2026).Test Logs |
Mocha lets us filter tests using the
--grepcommand-line option. This is useful when debugging the AI integration tests, which run against a grid of backend x model. With this grid there may me multiple redundant test runs, and the tests may take >20 minutes.With this new config, we can isolate the test we want to debug. Before running, VSCode will prompt us for a regex to use for grepping tests by name.
An example grep string would be
Google AI gemini-2.0-flash generateContent: google search grounding.Without this, I've been manually editing the input test files to be the file with the test I'm running, then manually editing
integration/constants.tsto remove the additional backends and model names.