Skip to content

Conversation

@alkatrivedi
Copy link
Contributor

@alkatrivedi alkatrivedi commented Jan 9, 2026

Backups test are getting timeout on presubmit, leading to presubmit failure with the ERROR: Aborting VM command. Hence, skipping them to unblock the release 8.4.0.

@alkatrivedi alkatrivedi requested review from a team as code owners January 9, 2026 09:42
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: spanner Issues related to the googleapis/nodejs-spanner API. samples Issues that are directly related to samples. labels Jan 9, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @alkatrivedi, 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 enhances the test suite's flexibility by allowing specific backup-related tests to be skipped under predefined conditions, such as during presubmit checks or when explicitly configured via an environment variable. This change aims to optimize CI/CD pipelines by potentially reducing test execution time or avoiding known flakiness in certain environments.

Highlights

  • Conditional Test Skipping: Introduced logic to conditionally skip a before hook within the 'Autogenerated Admin Clients' test suite in spanner.test.js. This skip occurs if the SKIP_BACKUPS environment variable is set to 'true' or if the KOKORO_JOB_NAME environment variable includes 'presubmit'.
  • Environment Variable Integration: Added two new constants, SKIP_BACKUPS and KOKORO_JOB_NAME, which read their values from corresponding environment variables. These are used to control the conditional test skipping.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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

@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 introduces a mechanism to skip backup-related tests based on environment variables, which is a good practice for managing test execution in different CI environments. However, I've identified a potential runtime error in the implementation. If the KOKORO_JOB_NAME environment variable is not set, the test suite will crash with a TypeError. I've provided a suggestion to make the code more robust against this scenario.

let instance_already_exists = false;
let key1, key2, key3;
before(async () => {
if (SKIP_BACKUPS === 'true' || KOKORO_JOB_NAME.includes('presubmit')) {

Choose a reason for hiding this comment

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

high

If the KOKORO_JOB_NAME environment variable is not set, KOKORO_JOB_NAME will be undefined. Calling .includes() on an undefined value will raise a TypeError and crash the test suite. Using optional chaining (?.) will prevent this by short-circuiting to undefined if KOKORO_JOB_NAME is nullish, which is then treated as falsy in the || expression.

Suggested change
if (SKIP_BACKUPS === 'true' || KOKORO_JOB_NAME.includes('presubmit')) {
if (SKIP_BACKUPS === 'true' || KOKORO_JOB_NAME?.includes('presubmit')) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since node modules enforces ES2018 in the gts package, we strictly cannot use the optional chaining operator (?.) in the JavaScript files without overriding the configuration. The parser for ES2018 simply does not recognize that syntax, hence leading to the Parsing error: Unexpected token .

@alkatrivedi alkatrivedi force-pushed the skip-backups-test branch 2 times, most recently from 26831df to 6817ec3 Compare January 9, 2026 10:28
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: xs Pull request size is extra small. labels Jan 9, 2026
@alkatrivedi alkatrivedi added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Jan 9, 2026
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 9, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 9, 2026
@alkatrivedi alkatrivedi added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Jan 9, 2026
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 9, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 9, 2026
surbhigarg92
surbhigarg92 previously approved these changes Jan 9, 2026
@alkatrivedi alkatrivedi added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Jan 9, 2026
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 9, 2026
@surbhigarg92 surbhigarg92 merged commit a13985b into main Jan 9, 2026
27 of 33 checks passed
@surbhigarg92 surbhigarg92 deleted the skip-backups-test branch January 9, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the googleapis/nodejs-spanner API. kokoro:force-run Add this label to force Kokoro to re-run the tests. samples Issues that are directly related to samples. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants