Skip to content

test: run the datastore system tests in google cloud build#8343

Open
danieljbruce wants to merge 6 commits into
mainfrom
add-gcb-datastore-tests
Open

test: run the datastore system tests in google cloud build#8343
danieljbruce wants to merge 6 commits into
mainfrom
add-gcb-datastore-tests

Conversation

@danieljbruce
Copy link
Copy Markdown
Contributor

@danieljbruce danieljbruce commented May 21, 2026

Description

This pull request adds a yaml file to instruct the Datastore 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 Datastore 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 Datastore 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 introduces a new Cloud Build configuration for the datastore component, covering dependency installation, system testing, and coverage reporting. Feedback focuses on correcting the Node.js image version to a stable release, adopting npm ci for more reliable builds, parameterizing the project ID, and reducing the build timeout to prevent resource waste.

Comment thread handwritten/datastore/cloudbuild.yaml
Comment thread handwritten/datastore/cloudbuild.yaml
Comment thread handwritten/datastore/cloudbuild.yaml
Comment thread handwritten/datastore/cloudbuild.yaml Outdated
args:
- '-c'
- |
npm install
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

In CI environments, it is recommended to use npm ci instead of npm install. npm ci is faster, more reliable, and ensures that the installed dependencies exactly match the package-lock.json file, which helps avoid inconsistencies between environments.

    npm ci

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.

Made this change

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.

Actually, this breaks the build so needs to be reverted.

Comment thread handwritten/datastore/cloudbuild.yaml
Comment thread handwritten/datastore/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

A timeout of 3 hours (10800s) is very high. Unless the system tests are exceptionally long-running, it is safer to set a lower timeout (e.g., 3600s for 1 hour) to prevent unnecessary costs and resource consumption if a build hangs.

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.

Made this change. Reduced the timeout to 1h.

@danieljbruce danieljbruce changed the title add the cloudbuild.yaml file test: run the bigtable system tests in google cloud build May 21, 2026
@danieljbruce danieljbruce changed the title test: run the bigtable system tests in google cloud build test: run the datastore system tests in google cloud build May 21, 2026
@danieljbruce danieljbruce marked this pull request as ready for review May 21, 2026 21:20
@danieljbruce danieljbruce requested a review from a team as a code owner May 21, 2026 21:20
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