Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/bigtable-conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
working-directory: handwritten/bigtable
strategy:
matrix:
node: [ 20, 22 ]
node: [ 22, 24 ]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mandatory-conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
working-directory: handwritten/bigtable
strategy:
matrix:
node: [ 20, 22 ]
node: [ 22, 24 ]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
Expand Down
2 changes: 1 addition & 1 deletion ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG NODE_VERSION=16
ARG NODE_VERSION=22
ARG FLAKYBOT_VERSION=1.1.0

FROM node:${NODE_VERSION}-slim as build
Expand Down
1 change: 1 addition & 0 deletions ci/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ steps:
id: 'Build Test Image'
args: [
'build',
'--pull',
'-t', 'gcr.io/${PROJECT_ID}/google-cloud-node-${_NODE_VERSION}',
'--cache-from', 'gcr.io/${PROJECT_ID}/google-cloud-node-${_NODE_VERSION}',
'-f', 'ci/Dockerfile',
Expand Down
8 changes: 6 additions & 2 deletions ci/cloudbuild_with_credentials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ options:
substitutions:
_BUILD_TYPE: "presubmit"
_TEST_TYPE: "system"
_NODE_VERSION: "18"
_NODE_VERSION: "22"
_REPO_OWNER: "googleapis"
_REPO_NAME: "google-cloud-node"

logsBucket: 'gs://${_LOGS_BUCKET}/logs/google-cloud-node/${_BUILD_TYPE}/${COMMIT_SHA}/${TRIGGER_NAME}'
timeout: 7200s
Expand All @@ -33,6 +35,7 @@ steps:
id: 'Build Test Image'
args: [
'build',
'--pull',
'-t', 'gcr.io/${PROJECT_ID}/google-cloud-node-${_NODE_VERSION}',
'--cache-from', 'gcr.io/${PROJECT_ID}/google-cloud-node-${_NODE_VERSION}',
'-f', 'ci/Dockerfile',
Expand All @@ -47,6 +50,7 @@ steps:
waitFor: ['Build Test Image']

- name: gcr.io/cloud-builders/gcloud
id: 'Fetch Credentials'
entrypoint: 'bash'
args: [ '-c', "gcloud secrets versions access latest --project=cloud-devrel-kokoro-resources --secret=long-door-651-kokoro-system-test-service-account --format='get(payload.data)' | tr '_-' '/+' | base64 -d > /workspace/google_application_credentials.json" ]
waitFor: ['Push Test Image']
Expand All @@ -55,7 +59,7 @@ steps:
id: "run-tests"
timeout: 7200s
entrypoint: "ci/run_conditional_tests.sh"
waitFor: ['Push Test Image']
waitFor: ['Fetch Credentials']
env:
- 'BUILD_TYPE=${_BUILD_TYPE}'
- 'TEST_TYPE=${_TEST_TYPE}'
Expand Down
1 change: 1 addition & 0 deletions ci/cloudbuild_with_gapic_showcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ steps:
id: 'Build Test Image'
args: [
'build',
'--pull',
'-t', 'gcr.io/${PROJECT_ID}/google-cloud-node-${_NODE_VERSION}',
'--cache-from', 'gcr.io/${PROJECT_ID}/google-cloud-node-${_NODE_VERSION}',
'-f', 'ci/Dockerfile',
Expand Down
2 changes: 1 addition & 1 deletion core/common/.kokoro/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-common/core/common/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion core/common/.kokoro/continuous/node18/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-common/core/common/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion core/common/.kokoro/presubmit/node18/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-common/core/common/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion core/common/.kokoro/release/docs-devsite.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ before_action {
# doc publications use a Python image.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}

# Download trampoline resources.
Expand Down
2 changes: 1 addition & 1 deletion core/common/.kokoro/release/docs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ before_action {
# doc publications use a Python image.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}

# Download trampoline resources.
Expand Down
2 changes: 1 addition & 1 deletion core/common/.kokoro/release/publish.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ build_file: "nodejs-common/core/common/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}

env_vars: {
Expand Down
54 changes: 50 additions & 4 deletions core/packages/retry-request/test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

const assert = require('assert');
const async = require('async');
const http = require('http');
const range = require('lodash.range');
const {describe, it, beforeEach} = require('mocha');
const {describe, it, before, after, beforeEach} = require('mocha');
const {PassThrough} = require('stream');
const {teenyRequest} = require('teeny-request');

Expand All @@ -12,9 +27,40 @@ const retryRequest = require('./index.js');
retryRequest.defaults.request = teenyRequest.defaults();

describe('retry-request', () => {
const URI_404 = 'http://google.com/theblahstore';
const URI_200 = 'http://google.com/';
const URI_NON_EXISTENT = 'http://theblahstore';
let server;
let URI_404;
let URI_200;
let URI_NON_EXISTENT;

before(done => {
server = http.createServer((req, res) => {
if (req.url === '/theblahstore') {
res.writeHead(404, {'Content-Type': 'text/plain'});
res.end('Not Found');
} else {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('OK');
}
});
server.listen(0, '127.0.0.1', () => {
const {port} = server.address();
URI_404 = `http://127.0.0.1:${port}/theblahstore`;
URI_200 = `http://127.0.0.1:${port}/`;

const unlisteningServer = http.createServer();
unlisteningServer.listen(0, '127.0.0.1', () => {
const unusedPort = unlisteningServer.address().port;
unlisteningServer.close(() => {
URI_NON_EXISTENT = `http://127.0.0.1:${unusedPort}`;
done();
});
});
});
});

after(done => {
server.close(done);
});
Comment thread
quirogas marked this conversation as resolved.

describe('streams', () => {
it('works with defaults in a stream', done => {
Expand Down
2 changes: 1 addition & 1 deletion core/paginator/.kokoro/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-paginator/core/paginator/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion core/paginator/.kokoro/continuous/node18/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-paginator/core/paginator/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion core/paginator/.kokoro/presubmit/node18/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-paginator/core/paginator/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion core/paginator/.kokoro/release/docs-devsite.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ before_action {
# doc publications use a Python image.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}

# Download trampoline resources.
Expand Down
2 changes: 1 addition & 1 deletion core/paginator/.kokoro/release/docs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ before_action {
# doc publications use a Python image.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}

# Download trampoline resources.
Expand Down
2 changes: 1 addition & 1 deletion core/paginator/.kokoro/release/publish.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ build_file: "nodejs-paginator/core/paginator/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}

env_vars: {
Expand Down
2 changes: 1 addition & 1 deletion core/precise-date/.kokoro/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-precise-date/core/precise-date/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion core/precise-date/.kokoro/continuous/node18/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-precise-date/core/precise-date/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion core/precise-date/.kokoro/presubmit/node18/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-precise-date/core/precise-date/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion core/precise-date/.kokoro/release/docs-devsite.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ before_action {
# doc publications use a Python image.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}

# Download trampoline resources.
Expand Down
2 changes: 1 addition & 1 deletion core/precise-date/.kokoro/release/docs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ before_action {
# doc publications use a Python image.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}

# Download trampoline resources.
Expand Down
2 changes: 1 addition & 1 deletion core/precise-date/.kokoro/release/publish.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ build_file: "nodejs-precise-date/core/precise-date/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}

env_vars: {
Expand Down
2 changes: 1 addition & 1 deletion core/projectify/.kokoro/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-projectify/core/projectify/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion core/projectify/.kokoro/continuous/node18/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-projectify/core/projectify/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion core/projectify/.kokoro/presubmit/node18/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-projectify/core/projectify/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion core/projectify/.kokoro/release/docs-devsite.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ before_action {
# doc publications use a Python image.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}

# Download trampoline resources.
Expand Down
2 changes: 1 addition & 1 deletion core/projectify/.kokoro/release/docs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ before_action {
# doc publications use a Python image.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}

# Download trampoline resources.
Expand Down
2 changes: 1 addition & 1 deletion core/projectify/.kokoro/release/publish.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ build_file: "nodejs-projectify/core/projectify/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}

env_vars: {
Expand Down
2 changes: 1 addition & 1 deletion core/promisify/.kokoro/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-promisify/core/promisify/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion core/promisify/.kokoro/continuous/node18/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-promisify/core/promisify/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion core/promisify/.kokoro/presubmit/node18/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-promisify/core/promisify/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
value: "gcr.io/cloud-devrel-kokoro-resources/node:22-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
Loading
Loading