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

fix(pubsub): hide context.Cancelled error in sync pull #3752

Merged
merged 5 commits into from Mar 4, 2021

Conversation

hongalex
Copy link
Member

As described, in the linked bug below, sub.Receive should not propagate errors from user cancellations. This is true for streaming pull but not synchronous pull.
This PR adds a simple switch case as suggested by @mgabeler-lee-6rs and includes tests to guard against this.

Fixes #3746

@hongalex hongalex requested review from a team as code owners February 28, 2021 23:06
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Feb 28, 2021
@codyoss codyoss changed the title fix: hide context.Cancelled error in sync pull fix(pubsub): hide context.Cancelled error in sync pull Mar 1, 2021
Copy link
Member

@codyoss codyoss left a comment

Choose a reason for hiding this comment

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

LGTM

pubsub/iterator.go Show resolved Hide resolved
@hongalex hongalex merged commit f88bdc8 into master Mar 4, 2021
@hongalex hongalex deleted the pull-cancel-error branch March 4, 2021 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pubsub: Receive fails to hide context.Canceled error when using synchronous pull
2 participants