Skip to content

test: run the bigquery system tests in google cloud build#8690

Open
danieljbruce wants to merge 7 commits into
mainfrom
kokoro-to-gcb-bigquery
Open

test: run the bigquery system tests in google cloud build#8690
danieljbruce wants to merge 7 commits into
mainfrom
kokoro-to-gcb-bigquery

Conversation

@danieljbruce

@danieljbruce danieljbruce commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Description

This pull request adds a yaml file to instruct the Bigquery 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 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 new Cloud Build configuration (cloudbuild.yaml) to automate dependency installation, system testing, and coverage reporting for the handwritten/bigquery Node.js project. The reviewer provided valuable feedback to improve the build script, including using the standard binary path for nyc to avoid brittleness, cleaning up verbose placeholder comments and mock echo statements, and reducing the exceptionally long 3-hour timeout to a safer 1-hour limit to prevent excessive resource consumption in case of hanging tests.

Comment on lines +47 to +48
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

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

Using the internal path ./node_modules/nyc/bin/nyc.js is brittle as the internal structure of the package can change between versions. It is safer and more standard to reference the binary in ./node_modules/.bin/nyc.

    if [ -f ./node_modules/.bin/nyc ]; then
      ./node_modules/.bin/nyc report || true # || true prevents build failure if nyc report itself exits non-zero

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.

I think it is better if we just stay in alignment with what it was for the kokoro tests. Less likely we get an unexpected surprise that way.

Comment on lines +52 to +58
# The original codecov.sh script from Kokoro needs to be made available to GCB.
# Options:
# a) Commit codecov.sh into your repo (e.g., .kokoro/codecov.sh) and call it:
# if [ -f .kokoro/codecov.sh ]; then . ./.kokoro/codecov.sh; fi
# b) Replicate its functionality directly in this step.
# c) Store it in a GCS bucket and fetch it.
echo "Codecov reporting (if desired) would be integrated here."

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

These verbose placeholder comments and the mock echo statement should be cleaned up for production. Replacing them with a simple TODO comment keeps the configuration file clean and maintainable.

    # TODO: Integrate Codecov reporting here if desired.

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.

I think it is best if we just stay in alignment with the template for consistency

Comment thread handwritten/bigquery/cloudbuild.yaml Outdated
substitutions:
_GCP_PROJECT_ID: 'long-door-651'

timeout: '10800s'

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

The timeout is set to 10800s (3 hours), which is exceptionally long for standard system tests. If a test hangs or enters an infinite loop, this can lead to high resource consumption and costs. Consider reducing this to a more reasonable limit, such as 3600s (1 hour).

timeout: '3600s'

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.

This change was made.

@danieljbruce danieljbruce changed the title Add cloudbuild.yaml file for bigquery repository test: run the bigquery system tests in google cloud build Jun 22, 2026
@danieljbruce danieljbruce marked this pull request as ready for review June 22, 2026 15:13
@danieljbruce danieljbruce requested a review from a team as a code owner June 22, 2026 15:13
@danieljbruce danieljbruce requested a review from pearigee June 22, 2026 15:16
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.

1 participant