From dd4b282ec65434ec51765864c43c44f1b398f04c Mon Sep 17 00:00:00 2001 From: Santiago Quiroga Date: Tue, 10 Mar 2026 13:36:19 -0700 Subject: [PATCH 1/9] fix(gaxios): add undici-types as a direct dependency --- packages/gaxios/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/gaxios/package.json b/packages/gaxios/package.json index 6af4838ef..a06e5f4e8 100644 --- a/packages/gaxios/package.json +++ b/packages/gaxios/package.json @@ -101,7 +101,8 @@ "dependencies": { "extend": "^3.0.2", "https-proxy-agent": "^7.0.1", - "node-fetch": "^3.3.2" + "node-fetch": "^3.3.2", + "undici-types": "^7.22.0" }, "homepage": "https://github.com/googleapis/google-cloud-node-core/tree/main/packages/gaxios" } From 120d29810fea8b1e65a8fb7b8565993394bad35e Mon Sep 17 00:00:00 2001 From: Santiago Quiroga Date: Wed, 11 Mar 2026 09:30:12 -0700 Subject: [PATCH 2/9] chore: fix syncpack CI by using local dependency instead of latest global --- .github/workflows/syncpack.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/syncpack.yaml b/.github/workflows/syncpack.yaml index 9160d2b82..c561dbc6a 100644 --- a/.github/workflows/syncpack.yaml +++ b/.github/workflows/syncpack.yaml @@ -15,5 +15,4 @@ jobs: with: node-version: 18 - run: npm install - - run: npm install -g syncpack - - run: syncpack list-mismatches + - run: npx syncpack list-mismatches From 309893c1d08bb77a63f7c010aa3fa2a5e66f70bd Mon Sep 17 00:00:00 2001 From: Santiago Quiroga Date: Thu, 12 Mar 2026 11:52:44 -0700 Subject: [PATCH 3/9] test(gaxios): fix InterceptorError in timeout retry test Replaced nock delay with an async reply that hangs so that the client aborts via timeout without causing Nock to incorrectly respond to an already aborted request. --- packages/gaxios/test/test.retry.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/gaxios/test/test.retry.ts b/packages/gaxios/test/test.retry.ts index ab858ff52..efadd7ffc 100644 --- a/packages/gaxios/test/test.retry.ts +++ b/packages/gaxios/test/test.retry.ts @@ -30,6 +30,7 @@ function getConfig(err: Error) { afterEach(() => { nock.cleanAll(); + nock.abortPendingRequests(); }); describe('🛸 retry & exponential backoff', () => { @@ -367,7 +368,15 @@ describe('🛸 retry & exponential backoff', () => { }); it('should retry on `timeout`', async () => { - const scope = nock(url).get('/').delay(500).reply(400).get('/').reply(204); + const scope = nock(url) + .get('/') + .reply(async () => { + // Never resolve this promise. The client will abort after 100ms due to timeout. + // This avoids Nock 14's InterceptorError where it tries to respond to an aborted request. + return new Promise(() => {}); + }) + .get('/') + .reply(204); const gaxios = new Gaxios(); const timeout = 100; From a63203ecdec18328ce6aaa1b2dfc7c9df195bdbb Mon Sep 17 00:00:00 2001 From: Santiago Quiroga Date: Thu, 12 Mar 2026 15:27:06 -0700 Subject: [PATCH 4/9] Revert "test(gaxios): fix InterceptorError in timeout retry test" This reverts commit 309893c1d08bb77a63f7c010aa3fa2a5e66f70bd. --- packages/gaxios/test/test.retry.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/gaxios/test/test.retry.ts b/packages/gaxios/test/test.retry.ts index efadd7ffc..ab858ff52 100644 --- a/packages/gaxios/test/test.retry.ts +++ b/packages/gaxios/test/test.retry.ts @@ -30,7 +30,6 @@ function getConfig(err: Error) { afterEach(() => { nock.cleanAll(); - nock.abortPendingRequests(); }); describe('🛸 retry & exponential backoff', () => { @@ -368,15 +367,7 @@ describe('🛸 retry & exponential backoff', () => { }); it('should retry on `timeout`', async () => { - const scope = nock(url) - .get('/') - .reply(async () => { - // Never resolve this promise. The client will abort after 100ms due to timeout. - // This avoids Nock 14's InterceptorError where it tries to respond to an aborted request. - return new Promise(() => {}); - }) - .get('/') - .reply(204); + const scope = nock(url).get('/').delay(500).reply(400).get('/').reply(204); const gaxios = new Gaxios(); const timeout = 100; From d70b41a962e5f6cc8b3ffccd6cfdf187cd4befb1 Mon Sep 17 00:00:00 2001 From: Santiago Quiroga Date: Thu, 12 Mar 2026 15:27:57 -0700 Subject: [PATCH 5/9] Reapply "test(gaxios): fix InterceptorError in timeout retry test" This reverts commit a63203ecdec18328ce6aaa1b2dfc7c9df195bdbb. --- packages/gaxios/test/test.retry.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/gaxios/test/test.retry.ts b/packages/gaxios/test/test.retry.ts index ab858ff52..efadd7ffc 100644 --- a/packages/gaxios/test/test.retry.ts +++ b/packages/gaxios/test/test.retry.ts @@ -30,6 +30,7 @@ function getConfig(err: Error) { afterEach(() => { nock.cleanAll(); + nock.abortPendingRequests(); }); describe('🛸 retry & exponential backoff', () => { @@ -367,7 +368,15 @@ describe('🛸 retry & exponential backoff', () => { }); it('should retry on `timeout`', async () => { - const scope = nock(url).get('/').delay(500).reply(400).get('/').reply(204); + const scope = nock(url) + .get('/') + .reply(async () => { + // Never resolve this promise. The client will abort after 100ms due to timeout. + // This avoids Nock 14's InterceptorError where it tries to respond to an aborted request. + return new Promise(() => {}); + }) + .get('/') + .reply(204); const gaxios = new Gaxios(); const timeout = 100; From 36969661924d89fedcd655e35ab6133cb6c15ddd Mon Sep 17 00:00:00 2001 From: Santiago Quiroga Date: Thu, 12 Mar 2026 16:15:59 -0700 Subject: [PATCH 6/9] Revert "test(gaxios): fix InterceptorError in timeout retry test" This reverts commit 309893c1d08bb77a63f7c010aa3fa2a5e66f70bd. --- packages/gaxios/test/test.retry.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/gaxios/test/test.retry.ts b/packages/gaxios/test/test.retry.ts index efadd7ffc..ab858ff52 100644 --- a/packages/gaxios/test/test.retry.ts +++ b/packages/gaxios/test/test.retry.ts @@ -30,7 +30,6 @@ function getConfig(err: Error) { afterEach(() => { nock.cleanAll(); - nock.abortPendingRequests(); }); describe('🛸 retry & exponential backoff', () => { @@ -368,15 +367,7 @@ describe('🛸 retry & exponential backoff', () => { }); it('should retry on `timeout`', async () => { - const scope = nock(url) - .get('/') - .reply(async () => { - // Never resolve this promise. The client will abort after 100ms due to timeout. - // This avoids Nock 14's InterceptorError where it tries to respond to an aborted request. - return new Promise(() => {}); - }) - .get('/') - .reply(204); + const scope = nock(url).get('/').delay(500).reply(400).get('/').reply(204); const gaxios = new Gaxios(); const timeout = 100; From 2c8520ff92280c868aa345574673581111ffd17a Mon Sep 17 00:00:00 2001 From: Santiago Quiroga Date: Thu, 12 Mar 2026 16:16:48 -0700 Subject: [PATCH 7/9] chore(gaxios): pin nock to 14.0.10 to bypass InterceptorError regression --- packages/gaxios/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gaxios/package.json b/packages/gaxios/package.json index 56647cca3..d8546b62d 100644 --- a/packages/gaxios/package.json +++ b/packages/gaxios/package.json @@ -86,7 +86,7 @@ "multiparty": "^4.2.1", "mv": "^2.1.1", "ncp": "^2.0.0", - "nock": "14.0.5", + "nock": "^14.0.10", "null-loader": "^4.0.1", "pack-n-play": "^4.0.0", "puppeteer": "^24.0.0", From 06e022203e67cf4c6ad935080c4518b13c2f7a64 Mon Sep 17 00:00:00 2001 From: Santiago Quiroga Date: Thu, 12 Mar 2026 16:38:43 -0700 Subject: [PATCH 8/9] Revert "chore: fix syncpack CI by using local dependency instead of latest global" This reverts commit 120d29810fea8b1e65a8fb7b8565993394bad35e. --- .github/workflows/syncpack.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/syncpack.yaml b/.github/workflows/syncpack.yaml index c561dbc6a..9160d2b82 100644 --- a/.github/workflows/syncpack.yaml +++ b/.github/workflows/syncpack.yaml @@ -15,4 +15,5 @@ jobs: with: node-version: 18 - run: npm install - - run: npx syncpack list-mismatches + - run: npm install -g syncpack + - run: syncpack list-mismatches From 855364a856581ddf3ac347d2d24cae18ae80f1b3 Mon Sep 17 00:00:00 2001 From: Santiago Quiroga Date: Thu, 12 Mar 2026 17:36:17 -0700 Subject: [PATCH 9/9] chore(gaxios): strictly pin nock to 14.0.10 to bypass InterceptorError regression --- packages/gaxios/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gaxios/package.json b/packages/gaxios/package.json index d8546b62d..a792afb16 100644 --- a/packages/gaxios/package.json +++ b/packages/gaxios/package.json @@ -86,7 +86,7 @@ "multiparty": "^4.2.1", "mv": "^2.1.1", "ncp": "^2.0.0", - "nock": "^14.0.10", + "nock": "14.0.10", "null-loader": "^4.0.1", "pack-n-play": "^4.0.0", "puppeteer": "^24.0.0",