Skip to content

test: run the bigquery-storage system tests in google cloud build#8697

Merged
danieljbruce merged 8 commits into
mainfrom
kokoro-to-gcb-bigquery-storage
Jun 22, 2026
Merged

test: run the bigquery-storage system tests in google cloud build#8697
danieljbruce merged 8 commits into
mainfrom
kokoro-to-gcb-bigquery-storage

Conversation

@danieljbruce

@danieljbruce danieljbruce commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Description

This pull request adds a yaml file to instruct the Bigquery Storage system test CI check to work with the new Cloud Build trigger thereby making the new CI check effectively run our system tests. It turns out that no extra code modifications are required to allow the test to run in the new environment.

Impact

Leverages the strengths of running system tests in GCB rather than relying on kokoro for system tests.

Testing

This pull request tells the tests how to work with the new check to the continuous integration pipeline for the Bigquery Storage system tests thus improves the effectiveness of that test.

Next Steps

  1. Merge a pull request that removes the system tests from kokoro. This should be done in a separate pull request to separate the concerns of removing the kokoro system tests from adding the Google Cloud Build system tests.

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

Copy link
Copy Markdown
Contributor

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 Cloud Build configuration (cloudbuild.yaml) for the handwritten/bigquery-storage directory to automate Node.js environment setup, dependency installation, system test execution, and optional code coverage reporting. The reviewer suggested a more robust way to check for and execute the nyc coverage tool using npx --no-install instead of relying on fragile internal paths.

Comment on lines +46 to +51
# Check if nyc is installed and run report
if [ -f ./node_modules/nyc/bin/nyc.js ]; then
./node_modules/nyc/bin/nyc.js report || true # `|| true` prevents build failure if nyc report itself exits non-zero
else
echo "nyc not found, skipping coverage report."
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Relying on the internal path ./node_modules/nyc/bin/nyc.js is fragile as the internal directory structure of the nyc package is an implementation detail and can change between versions. Using npx --no-install is a more robust and standard way to check for and execute local CLI tools.

    # Check if nyc is installed and run report
    if npx --no-install nyc --version >/dev/null 2>&1; then
      npx nyc report || true
    else
      echo "nyc not found, skipping coverage report."
    fi

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As with the other tests, I think it is better here if we stay in alignment with how the kokoro tests worked.

@danieljbruce danieljbruce marked this pull request as ready for review June 22, 2026 18:46
@danieljbruce danieljbruce requested a review from a team as a code owner June 22, 2026 18:46
@danieljbruce danieljbruce merged commit e78cc50 into main Jun 22, 2026
37 checks passed
@danieljbruce danieljbruce deleted the kokoro-to-gcb-bigquery-storage branch June 22, 2026 19:15
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.

2 participants