GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(WaitForProcessing): Shutdown option `WaitForProcessing` never entered on subscription close by nico-kn · Pull Request #2118 · googleapis/nodejs-pubsub

This repository was archived by the owner on Oct 21, 2026. It is now read-only.

Conversation

@nico-kn

@nico-kn nico-kn commented Dec 9, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

As outlined in #2117, the condition to enter the WaitForProcessing closing behavior of a subscription was checking against an undefined field .isEmpty of the inventory instead of checking for the isEmpty() method of the inventory.

In unit tests this went unnoticed since the field was set accordingly in the class under test.

This implicitly changes the default behavior of the subscription close functionality since the previous PR that introduced this functionality (#2068) changed the default behavior without effect as the condition was never entered during close().


Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #2117 🦕

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nico-kn
fix(WaitForProcessing): change entry condition
bc0a9b5
@nico-kn
nico-kn requested review from a team December 9, 2025 09:04
@google-cla

google-cla Bot commented Dec 9, 2025

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@product-auto-label product-auto-label Bot added size: xs Pull request size is extra small. api: pubsub Issues related to the googleapis/nodejs-pubsub API. labels Dec 9, 2025
@nico-kn nico-kn mentioned this pull request Dec 9, 2025
fix(WaitForProcessing): Shutdown option WaitForProcessing never entered on subscription close nico-kn/nodejs-pubsub#1
Closed
1 of 4 tasks
@nico-kn
fix unit test to overwrite isEmpty() as a method instead of a getter
843d7bd
@nico-kn

nico-kn commented Dec 9, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@feywind would be great if you could review this change. Linting and tests pass locally.

However, the original WaitForProcessing feature was released as default behavior and this behavior change came with a minor version increment to 5.2.0. I would propose to release this as 6.0.0 or 5.3.0 instead of 5.2.1 since the default behavior change is a runtime relevant change for services consuming this client library.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nico-kn
add fired events to docstrings
e4c93a8
@product-auto-label product-auto-label Bot added size: s Pull request size is small. and removed size: xs Pull request size is extra small. labels Dec 10, 2025
feywind
feywind previously approved these changes Dec 19, 2025
View reviewed changes
@feywind

feywind commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

Thank you for this, that is a great catch. I feel like something should've caught this, but falsy is as falsy does...

nico-kn reacted with thumbs up emoji nico-kn reacted with laugh emoji
All reactions
  • 👍 1 reaction
  • 😄 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@feywind feywind added the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 19, 2025
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 19, 2025
@feywind

feywind commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

However, the original WaitForProcessing feature was released as default behavior and this behavior change came with a minor version increment to 5.2.0. I would propose to release this as 6.0.0 or 5.3.0 instead of 5.3.1 since the default behavior change is a runtime relevant change for services consuming this client library.

I'm okay with it being a patch release since it's a bug in the intended behaviour. The fix would actually bring it closer to where it was before the shutdown options change.

I will double-check though.

nico-kn reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@feywind feywind added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 19, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 19, 2025
kamalaboulhosn
kamalaboulhosn previously approved these changes Dec 19, 2025
View reviewed changes
sofisl
sofisl previously approved these changes Dec 19, 2025
View reviewed changes
@feywind

feywind commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

I was hoping to avoid having to merge, but the test looks stuck.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@feywind
Merge branch 'main' into fix-wait-for-processing-behavior
ab50eff
@feywind feywind added the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 19, 2025
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 19, 2025
@feywind feywind added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Dec 19, 2025
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 19, 2025
@feywind feywind added kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Dec 19, 2025
@feywind feywind added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 6, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 6, 2026
@feywind

feywind commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

I need to close and re-open this to get the security scan workflow to work, sorry.

nico-kn reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@feywind feywind closed this Jan 6, 2026
@feywind feywind reopened this Jan 6, 2026
@feywind
fix: change default to match existing behaviour
e4eaf47
@feywind feywind added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 6, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 6, 2026
@feywind feywind added the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 6, 2026
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 6, 2026
@feywind
Merge branch 'main' into fix-wait-for-processing-behavior
c951bac
@feywind feywind added the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 6, 2026
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 6, 2026
@feywind feywind added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 7, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 7, 2026
@feywind

feywind commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

Working on these system test issues has made me very aware that there some things that need fixing in the tests, which have nothing to do with this fix... so I'm going to go ahead and do that in another PR to avoid further polluting this one.

nico-kn reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@feywind

feywind commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

The system test updates are looking good together with this branch. I'll need to finish this up next week though.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@feywind feywind mentioned this pull request Jan 12, 2026
tests: clean up system tests with separate resources per test #2122
Merged
@feywind
chore: merge remote-tracking branch 'remotes/origin/main' into fix-wa…
d045b62
…it-for-processing-behavior
@feywind feywind added the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 13, 2026
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 13, 2026
@feywind feywind added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 13, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 13, 2026
feywind
feywind approved these changes Jan 14, 2026
View reviewed changes
danieljbruce
danieljbruce approved these changes Jan 14, 2026
View reviewed changes
@feywind
feywind merged commit e99b37e into googleapis:main Jan 14, 2026
@feywind

feywind commented Jan 14, 2026

Copy link
Copy Markdown
Contributor

🎉

nico-kn reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@release-please release-please Bot mentioned this pull request Jan 14, 2026
chore(main): release 5.2.2 #2123
Merged
@nico-kn
nico-kn deleted the fix-wait-for-processing-behavior branch January 15, 2026 08:54
@nico-kn

nico-kn commented Jan 15, 2026

Copy link
Copy Markdown
Contributor Author

🎉

thanks for taking care of the system tests improvements and therefore merging this PR! @feywind
I believe it was a good decision to let the default behavior stick to NackImmediately, this should hopefully cause less issues for lib consumers when upgrading and make it a conscious decision to move to WaitForProcessing.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

4 more reviewers
@danieljbruce danieljbruce danieljbruce approved these changes
@feywind feywind feywind approved these changes
@kamalaboulhosn kamalaboulhosn kamalaboulhosn left review comments
@sofisl sofisl sofisl left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: pubsub Issues related to the googleapis/nodejs-pubsub API. size: s Pull request size is small.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Shutdown option WaitForProcessing never entered on subscription close

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@nico-kn @feywind @kamalaboulhosn @danieljbruce @sofisl @yoshi-kokoro
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.