Repository navigation
Conversation
…s hermetic ## Description This change upgrades CI configurations to Node 22 and isolates unit tests. ## Impact Eliminates EOL Node runtimes in CI and removes external test network calls. ## Changes - Upgrade `ci/cloudbuild_with_credentials.yaml` from `_NODE_VERSION: "18"` to `"22"`, add default `_REPO_OWNER` and `_REPO_NAME` substitutions, add `--pull` to `docker build`, and add `id: 'Fetch Credentials'` with `waitFor: ['Fetch Credentials']` on `run-tests` to prevent a parallel race condition when writing `/workspace/google_application_credentials.json`. - Update the default `ARG NODE_VERSION` in `ci/Dockerfile` from `16` to `22`, and add `--pull` to `docker build` in `ci/cloudbuild.yaml` and `ci/cloudbuild_with_gapic_showcase.yaml`. - Update the Node.js version matrix in `.github/workflows/bigtable-conformance.yaml` and `.github/workflows/mandatory-conformance.yaml` from `[ 20, 22 ]` to `[ 22, 24 ]`. - Replace unmocked external HTTP calls (`http://google.com/` and `http://theblahstore`) in `core/packages/retry-request/test.js` with a local ephemeral `http.createServer` listening on `127.0.0.1:0` so unit tests are 100% hermetic. - Update remaining `.kokoro/**/*.cfg` `TRAMPOLINE_IMAGE` references in `core/*/.kokoro/` and `handwritten/*/.kokoro/` from `node:18-user` and `node:14-user` to `node:22-user`. ## Testing - Replaced live external requests in `core/packages/retry-request/test.js` with a local ephemeral HTTP server in `before`/`after` hooks (`URI_200`, `URI_404`, and `URI_NON_EXISTENT`). - Verified all 30 unit tests and `gts check` linter pass locally in `core/packages/retry-request`. ## Alternatives - Not merging this PR was considered, but it would leave credentialed Cloud Build triggers and conformance workflows running on EOL Node.js versions and keep `retry-request` unit tests dependent on external network reachability.
Contributor
There was a problem hiding this comment.
Code Review
This pull request upgrades the Node.js version to 22 across Dockerfiles, Cloud Build configurations, and Kokoro CI configurations. Additionally, it refactors the retry-request tests to use a local HTTP server for mocking endpoints instead of external URLs. The review feedback recommends utilizing server.closeAllConnections() in the test teardown to immediately terminate active keep-alive connections and prevent potential hangs.
quirogas
marked this pull request as ready for review
October 23, 2026 22:22
quirogas
enabled auto-merge (squash)
October 23, 2026 22:23
quirogas
disabled auto-merge
October 23, 2026 22:23
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This change upgrades CI configurations to Node 22 and isolates unit tests.
Impact
Eliminates EOL Node runtimes in CI and removes external test network calls.
Changes
ci/cloudbuild_with_credentials.yamlfrom_NODE_VERSION: "18"to"22", add default_REPO_OWNERand_REPO_NAMEsubstitutions, add--pulltodocker build, and addid: 'Fetch Credentials'withwaitFor: ['Fetch Credentials']onrun-teststo prevent a parallel race condition when writing/workspace/google_application_credentials.json.ARG NODE_VERSIONinci/Dockerfilefrom16to22, and add--pulltodocker buildinci/cloudbuild.yamlandci/cloudbuild_with_gapic_showcase.yaml..github/workflows/bigtable-conformance.yamland.github/workflows/mandatory-conformance.yamlfrom[ 20, 22 ]to[ 22, 24 ].http://google.com/andhttp://theblahstore) incore/packages/retry-request/test.jswith a local ephemeralhttp.createServerlistening on127.0.0.1:0so unit tests are 100% hermetic..kokoro/**/*.cfgTRAMPOLINE_IMAGEreferences incore/*/.kokoro/andhandwritten/*/.kokoro/fromnode:18-userandnode:14-usertonode:22-user.Testing
core/packages/retry-request/test.jswith a local ephemeral HTTP server inbefore/afterhooks (URI_200,URI_404, andURI_NON_EXISTENT).gts checklinter pass locally incore/packages/retry-request.Alternatives
retry-requestunit tests dependent on external network reachability.