Skip to content

test(serverless-spark): run tests sequentially for CI#2603

Merged
duwenxin99 merged 2 commits intogoogleapis:mainfrom
dborowitz:s8s-sequential
Mar 3, 2026
Merged

test(serverless-spark): run tests sequentially for CI#2603
duwenxin99 merged 2 commits intogoogleapis:mainfrom
dborowitz:s8s-sequential

Conversation

@dborowitz
Copy link
Copy Markdown
Contributor

Running tests in parallel consumes more GCE CPU quota, and we're occasionally getting flakes due to exceeding the default. This still may be the right tradeoff for speed of interactive development, but these aren't (yet) the slowest integration tests, so running sequentially will preserve quota without increasing CI walltime.

Description

Should include a concise description of the changes (bug or feature), it's
impact, along with a summary of the solution

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>

@dborowitz dborowitz requested a review from duwenxin99 March 2, 2026 18:39
@dborowitz dborowitz requested a review from a team as a code owner March 2, 2026 18:39
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 optimizes the continuous integration process for Serverless Spark integration tests by enforcing sequential execution. This change aims to reduce Google Cloud Engine (GCE) CPU quota consumption and mitigate intermittent test failures (flakes) that were occurring due to parallel test runs exceeding resource limits. The modification ensures more stable and resource-efficient CI builds without impacting interactive development speed.

Highlights

  • Sequential Test Execution: Configured the Cloud Build integration test step for Serverless Spark to run tests sequentially by passing EXTRA_TEST_ARGS=-test.parallel=1.
  • Test Script Enhancement: Modified the test_with_coverage.sh script to accept and apply the EXTRA_TEST_ARGS environment variable, allowing for dynamic test argument passing.
Changelog
  • .ci/integration.cloudbuild.yaml
    • Added EXTRA_TEST_ARGS environment variable with value -test.parallel=1 to the SERVERLESS_SPARK build step.
  • .ci/test_with_coverage.sh
    • Modified the test command to include ${EXTRA_TEST_ARGS:-} before -test.coverprofile.
Activity
  • No specific review comments or activities have been recorded yet for this pull request.
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 run the serverless-spark integration tests sequentially in CI to avoid GCE CPU quota issues. The change introduces an EXTRA_TEST_ARGS environment variable in the Cloud Build configuration and uses it in the test script. The approach is sound, but the implementation in the shell script could be made more robust. I've provided a suggestion to improve the handling of extra test arguments to prevent potential issues with arguments containing spaces in the future.

Comment thread .ci/test_with_coverage.sh
Running tests in parallel consumes more GCE CPU quota, and we're
occasionally getting flakes due to exceeding the default. This still may
be the right tradeoff for speed of interactive development, but these
aren't (yet) the slowest integration tests, so running sequentially will
preserve quota without increasing CI walltime.
@dborowitz
Copy link
Copy Markdown
Contributor Author

/gcbrun

1 similar comment
@duwenxin99
Copy link
Copy Markdown
Contributor

/gcbrun

@duwenxin99 duwenxin99 added the tests: run Label to trigger Github Action tests. label Mar 3, 2026
@duwenxin99 duwenxin99 assigned duwenxin99 and unassigned Yuan325 Mar 3, 2026
@github-actions github-actions bot removed the tests: run Label to trigger Github Action tests. label Mar 3, 2026
@dborowitz
Copy link
Copy Markdown
Contributor Author

FYI the serverless-spark tests now take 6 minutes to run sequentially, comparable to BQ (6-7m) and faster than Spanner (10m)

@duwenxin99 duwenxin99 merged commit a8edb79 into googleapis:main Mar 3, 2026
17 checks passed
github-actions bot pushed a commit to shyamkg/genai-toolbox that referenced this pull request Mar 4, 2026
…apis#2603)

Running tests in parallel consumes more GCE CPU quota, and we're
occasionally getting flakes due to exceeding the default. This still may
be the right tradeoff for speed of interactive development, but these
aren't (yet) the slowest integration tests, so running sequentially will
preserve quota without increasing CI walltime.

## Description

> Should include a concise description of the changes (bug or feature),
it's
> impact, along with a summary of the solution

## 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> a8edb79
duwenxin99 pushed a commit that referenced this pull request Mar 4, 2026
Running tests in parallel consumes more GCE CPU quota, and we're
occasionally getting flakes due to exceeding the default. This still may
be the right tradeoff for speed of interactive development, but these
aren't (yet) the slowest integration tests, so running sequentially will
preserve quota without increasing CI walltime.

## Description

> Should include a concise description of the changes (bug or feature),
it's
> impact, along with a summary of the solution

## 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>
NirajNandre pushed a commit to NirajNandre/genai-toolbox-fork that referenced this pull request Mar 24, 2026
Running tests in parallel consumes more GCE CPU quota, and we're
occasionally getting flakes due to exceeding the default. This still may
be the right tradeoff for speed of interactive development, but these
aren't (yet) the slowest integration tests, so running sequentially will
preserve quota without increasing CI walltime.

## Description

> Should include a concise description of the changes (bug or feature),
it's
> impact, along with a summary of the solution

## 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>
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