From b8b1e9a6404c344ada4e0972dc62c15680556838 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 30 Jan 2026 17:42:25 -0500 Subject: [PATCH 1/3] chore: fix lint failures (#2116) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: fix lint failures Source-Link: https://github.com/googleapis/synthtool/commit/36ebc332605b7da44be489e597e4a048e4d79e0a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:1c50961ec998cd24968d5b2628e8d88a36b612ea881e71bfd171c93cc9d08b9e * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: feywind <57276408+feywind@users.noreply.github.com> --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/lint.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 3a1abb941..24f126d88 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:a1e45c1b53fceb5fa7fd5c49cf898048c210eb07001a3355548e7a4545200ee8 -# created: 2025-11-21T20:24:19.347250905Z + digest: sha256:1c50961ec998cd24968d5b2628e8d88a36b612ea881e71bfd171c93cc9d08b9e +# created: 2025-12-02T19:51:56.208302619Z diff --git a/.kokoro/lint.sh b/.kokoro/lint.sh index f994f2767..c7ffa6438 100755 --- a/.kokoro/lint.sh +++ b/.kokoro/lint.sh @@ -20,7 +20,7 @@ export NPM_CONFIG_PREFIX=${HOME}/.npm-global export PATH="${NPM_CONFIG_PREFIX}/bin:${PATH}" # Ensure the npm global directory is writable, otherwise rebuild `npm` -mkdir -p ${NPM_CONFIG_PREFIX} +mkdir -p ${NPM_CONFIG_PREFIX}/lib npm config -g ls || npm i -g npm@`npm --version` cd $(dirname $0)/.. From c22471de60c63d9420c037ca3269af8b7dbf9d92 Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Wed, 11 Feb 2026 13:03:34 -0500 Subject: [PATCH 2/3] fix: clean up earlier refactor issues with maxExtensionTime (#2127) --- src/lease-manager.ts | 2 -- src/subscriber.ts | 4 ++++ test/subscriber.ts | 11 +++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/lease-manager.ts b/src/lease-manager.ts index 32b1102cc..d8afdb11a 100644 --- a/src/lease-manager.ts +++ b/src/lease-manager.ts @@ -51,8 +51,6 @@ export interface FlowControlOptions { * @property {number} [maxBytes=104857600] The desired amount of memory to * allow message data to consume. (Default: 100MB) It's possible that this * value will be exceeded, since messages are received in batches. - * @property {number} [maxExtensionMinutes=60] The maximum duration (in minutes) - * to extend the message deadline before redelivering. * @property {number} [maxMessages=1000] The desired number of messages to allow * in memory before pausing the message stream. Unless allowExcessMessages * is set to false, it is very likely that this value will be exceeded since diff --git a/src/subscriber.ts b/src/subscriber.ts index 1989e11d6..a08dc6d66 100644 --- a/src/subscriber.ts +++ b/src/subscriber.ts @@ -1231,6 +1231,10 @@ export class Subscriber extends EventEmitter { ); } + if (this._options.maxExtensionTime) { + this.maxExtensionTime = this._options.maxExtensionTime; + } + if (this._inventory) { this._inventory.setOptions(this._options.flowControl!); } diff --git a/test/subscriber.ts b/test/subscriber.ts index fce888a4e..5cf205cfd 100644 --- a/test/subscriber.ts +++ b/test/subscriber.ts @@ -1108,6 +1108,17 @@ describe('Subscriber', () => { assert.strictEqual(stream.options.maxStreams, maxMessages); }); + + it('should pass through the max extension time', () => { + const maxExtensionTime = Duration.from({seconds: 1232}); + subscriber.setOptions({ + maxExtensionTime, + }); + assert.strictEqual( + subscriber.maxExtensionTime.seconds, + maxExtensionTime.seconds, + ); + }); }); describe('OpenTelemetry tracing', () => { From 7da8e623e82432b551219ffd6ccb73c31ae73a0a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 13:42:53 -0500 Subject: [PATCH 3/3] chore(main): release 5.2.3 (#2128) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ package.json | 2 +- samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b52672b5e..b57676a49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/pubsub?activeTab=versions +## [5.2.3](https://github.com/googleapis/nodejs-pubsub/compare/v5.2.2...v5.2.3) (2026-02-11) + + +### Bug Fixes + +* Clean up earlier refactor issues with maxExtensionTime ([#2127](https://github.com/googleapis/nodejs-pubsub/issues/2127)) ([c22471d](https://github.com/googleapis/nodejs-pubsub/commit/c22471de60c63d9420c037ca3269af8b7dbf9d92)) + ## [5.2.2](https://github.com/googleapis/nodejs-pubsub/compare/v5.2.1...v5.2.2) (2026-01-14) diff --git a/package.json b/package.json index 2f97fb7a2..507fc90fe 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/pubsub", "description": "Cloud Pub/Sub Client Library for Node.js", - "version": "5.2.2", + "version": "5.2.3", "license": "Apache-2.0", "author": "Google Inc.", "engines": { diff --git a/samples/package.json b/samples/package.json index f0c93cc11..52adf1a4a 100644 --- a/samples/package.json +++ b/samples/package.json @@ -25,7 +25,7 @@ }, "dependencies": { "@google-cloud/opentelemetry-cloud-trace-exporter": "^2.0.0", - "@google-cloud/pubsub": "^5.2.2", + "@google-cloud/pubsub": "^5.2.3", "@google-cloud/storage": "^7.11.1", "@opentelemetry/api": "^1.6.0", "@opentelemetry/resources": "^1.17.0",