-
Notifications
You must be signed in to change notification settings - Fork 233
Description
Please make sure you have searched for information in the following guides.
- Search the issues already opened: https://github.com/GoogleCloudPlatform/google-cloud-node/issues
- Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js
- Check our Troubleshooting guide: https://github.com/googleapis/google-cloud-node/blob/main/docs/troubleshooting.md
- Check our FAQ: https://github.com/googleapis/google-cloud-node/blob/main/docs/faq.md
- Check our libraries HOW-TO: https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md
- Check out our authentication guide: https://github.com/googleapis/google-auth-library-nodejs
- Check out handwritten samples for many of our APIs: https://github.com/GoogleCloudPlatform/nodejs-docs-samples
A screenshot that you have tested with "Try this API".
TL;DR: When initializing a Subscription with a custom maxExtensionTime, the value is silently ignored and the default one (1h) is used instead.
Longer Story:
In this PR, maxExtensionMinutes was refactored to Subscriber.maxExtensionTime. However, the logic that handled custom values via setOptions was not carried over.
As a result, subscriber always uses the default maxExtensionTime from the constructor. When a custom maxExtensionTime is passed, it’s not applied, because Subscriber.setOptions doesn’t override the default.
Link to the code that reproduces this issue. A link to a public Github Repository or gist with a minimal reproduction.
https://gist.github.com/AlessandroSteri/67f0139cff1b92a5d31e47b5d99df99f
A step-by-step description of how to reproduce the issue, based on the linked reproduction.
- Create a pubsub
SubscriptionpassingmaxExtensionTimedifferent from the default 1h as option - Observe that
subscription._subscriber.maxExtensionTimeis 1h and not the custom one
A clear and concise description of what the bug is, and what you expected to happen.
Bug: When initializing a Subscription with a custom maxExtensionTime, the value is silently ignored and the default one (1h) is used instead.
Expectation: Subscriber.setOptions should set the custom maxExtensionTime
A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **
- It's a bug introduced in the aforementioned refactor
- It's clear that the behaviour of that option is to configure the underlining subscriber