This repository was archived by the owner on Mar 17, 2026. It is now read-only.
fix: deprecate maxExtension in favour of maxExtensionMinutes#1402
Merged
feywind merged 3 commits intogoogleapis:mainfrom Sep 27, 2021
Merged
fix: deprecate maxExtension in favour of maxExtensionMinutes#1402feywind merged 3 commits intogoogleapis:mainfrom
feywind merged 3 commits intogoogleapis:mainfrom
Conversation
Background: maxExtension was incorrectly interpreted as seconds in the LeaseManager. This means that if users were relying on client side lease extension in subscribers, they would not actually extend leases for 60 minutes, but only 60 seconds. Also if the user passed in values, they'd be interpreted incorrectly. This PR deprecates the old field in favour of a new one that's explicitly named like the defaults, but also converts the old value if needed.
anguillanneuf
approved these changes
Sep 24, 2021
Contributor
anguillanneuf
left a comment
There was a problem hiding this comment.
LGTM. Looks like the Node.js sample just uses maxMessages. Can you think of any other places we need to update?
JustinBeckwith
approved these changes
Sep 27, 2021
| setOptions(options: FlowControlOptions): void { | ||
| // Convert the old deprecated maxExtension to avoid breaking clients. | ||
| if ( | ||
| options.maxExtension !== undefined && |
Contributor
There was a problem hiding this comment.
What happens if both are defined?
Collaborator
Author
I think this is maxMessages rather than maxExtension, should be unchanged. |
gcf-merge-on-green Bot
pushed a commit
that referenced
this pull request
Sep 27, 2021
🤖 I have created a release \*beep\* \*boop\* --- ### [2.18.1](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.18.0...v2.18.1) (2021-09-27) ### Bug Fixes * deprecate maxExtension in favour of maxExtensionMinutes ([#1402](https://www.github.com/googleapis/nodejs-pubsub/issues/1402)) ([46b83ba](https://www.github.com/googleapis/nodejs-pubsub/commit/46b83ba14e954cc6bec3f03ca7c3e0bcdfb7597c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
feywind
pushed a commit
to feywind/nodejs-pubsub
that referenced
this pull request
Nov 12, 2024
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Background: maxExtension was incorrectly interpreted as seconds in the LeaseManager. This means that if users were relying on client side lease extension in subscribers, they would not actually extend leases for 60 minutes, but only 60 seconds. Also if the user passed in values, they'd be interpreted incorrectly. This PR deprecates the old field in favour of a new one that's explicitly named like the defaults, but also converts the old value if needed.
Fixes: #1208