Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: block until the streaming pull shuts down #424

Merged
merged 1 commit into from Jun 14, 2021

Conversation

plamut
Copy link
Contributor

@plamut plamut commented Jun 3, 2021

Fixes #423.

If subscriber client is used as a context manager, we need to block until the shutdown is complete before leaving the with block. See the issue description for more details.

PR checklist:

  • 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)

If subscriber client is used as a context manager, we need to block
until the shutdown is complete before leaving the `with` block.
If not, errors can occur if the underlying gRPC channel is closed before
subscriber client makes the final RPC requests to the server (e.g. auto
NACK anny remaining messages).
@plamut plamut requested a review from anguillanneuf June 3, 2021 09:25
@plamut plamut requested review from a team as code owners June 3, 2021 09:25
@plamut plamut requested review from busunkim96 and removed request for a team June 3, 2021 09:25
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 3, 2021
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/python-pubsub API. label Jun 3, 2021
@plamut plamut added samples Issues that are directly related to samples. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 3, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 3, 2021
@plamut plamut requested a review from pradn June 8, 2021 11:40
Copy link
Contributor

@pradn pradn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@plamut plamut added kokoro:force-run Add this label to force Kokoro to re-run the tests. automerge Merge the pull request once unit tests and other checks pass. labels Jun 14, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 14, 2021
@plamut plamut added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 14, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 14, 2021
@plamut plamut added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 14, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 14, 2021
@gcf-merge-on-green gcf-merge-on-green bot merged commit d0d0b70 into googleapis:master Jun 14, 2021
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jun 14, 2021
@plamut plamut deleted the iss-423 branch June 14, 2021 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Race conditions in streaming pull samples
3 participants