Skip to content

test: run the bigtable system tests in google cloud build#8192

Open
danieljbruce wants to merge 29 commits intomainfrom
migrate-bigtable-to-gcp-cloud-build
Open

test: run the bigtable system tests in google cloud build#8192
danieljbruce wants to merge 29 commits intomainfrom
migrate-bigtable-to-gcp-cloud-build

Conversation

@danieljbruce
Copy link
Copy Markdown
Contributor

@danieljbruce danieljbruce commented May 6, 2026

Description

This pull request adds a yaml file to instruct the Bigtable system test CI check to work with the new Cloud Build trigger thereby making the new CI check effectively run our system tests. It also includes minor code modifications to the Bigtable handwritten layer that allow the system tests to operate properly in the new Cloud Build 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 Bigtable system tests thus improves the effectiveness of that test.

image

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.
  2. Distribute a document detailing the process for migrating system tests from kokoro to GCB for all handwritten libraries.

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 migrates system tests from Kokoro to Google Cloud Build for the handwritten/bigtable project. The existing Kokoro script is replaced with a notification, and a new cloudbuild.yaml is introduced. Feedback focuses on correcting the Cloud Build configuration, specifically addressing issues with environment variable persistence across steps, incorrect working directory paths, and the execution order of pre-test hooks. Consolidating steps and ensuring the correct directory context is used will prevent build failures and maintain coverage reporting.

I am having trouble creating individual review comments. Click here to see my feedback.

handwritten/bigtable/cloudbuild.yaml (6-55)

high

The current multi-step configuration has several issues that will likely cause the build to fail or behave incorrectly:

  1. Environment Variable Persistence: Each Cloud Build step runs in a separate container. Environment variables exported by .kokoro/pre-system-test.sh in Step 2 will not be available to Step 3.
  2. Working Directory: Cloud Build's default working directory is the repository root. Since this project is located in handwritten/bigtable, you must specify dir: 'handwritten/bigtable' for the steps to find package.json and the .kokoro directory. The current dir: '.' refers to the repo root, not the directory containing the cloudbuild.yaml file.
  3. Execution Order: The original Kokoro script ran the pre-test hook before npm install. This is important if the hook configures registry credentials or environment-specific settings needed for installation.
  4. Efficiency: npm install -g npm@latest and global prefix configuration are generally unnecessary in the Cloud Build environment and add overhead.

Consolidating these into a single step with the correct dir and execution order ensures correctness and improves performance.

- name: 'gcr.io/cloud-builders/npm'
  id: 'run-system-tests'
  entrypoint: 'bash'
  dir: 'handwritten/bigtable'
  args:
  - '-c'
  - |
    if [ -f .kokoro/pre-system-test.sh ]; then
      echo "Running pre-system-test.sh..."
      . .kokoro/pre-system-test.sh
    fi
    npm install
    npm run system-test
  env:
  - 'GCLOUD_PROJECT=${_GCP_PROJECT_ID}'

handwritten/bigtable/cloudbuild.yaml (58-77)

medium

This step also requires the correct working directory (dir: 'handwritten/bigtable') to find the coverage artifacts. Additionally, the original Kokoro script uploaded coverage via codecov.sh, which is currently missing here. Consider adding the logic to upload reports to Codecov to avoid a regression in coverage tracking.

- name: 'gcr.io/cloud-builders/npm'
  id: 'coverage-report'
  entrypoint: 'bash'
  dir: 'handwritten/bigtable'
  args:
  - '-c'
  - |
    if [ -f ./node_modules/nyc/bin/nyc.js ]; then
      ./node_modules/nyc/bin/nyc.js report || true
    else
      echo "nyc not found, skipping coverage report."
    fi
    # TODO: Implement codecov upload logic here.
    echo "Codecov reporting (if desired) would be integrated here."

@danieljbruce danieljbruce changed the title Migrate bigtable to gcp cloud build feat: add new Bigtable feature May 6, 2026
@danieljbruce danieljbruce marked this pull request as ready for review May 6, 2026 17:50
danieljbruce and others added 22 commits May 6, 2026 13:50
@danieljbruce danieljbruce changed the title feat: add new Bigtable feature test: move the system tests over from kokoro to google cloud build May 8, 2026
@danieljbruce danieljbruce changed the title test: move the system tests over from kokoro to google cloud build test: run the bigtable system tests in google cloud build May 8, 2026
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