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
Merged

Conversation

@hongalex
Copy link
Member

@hongalex hongalex commented Feb 28, 2021

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 a review from shollyman Feb 28, 2021
@hongalex hongalex requested review from as code owners Feb 28, 2021
@google-cla google-cla bot added the cla: yes 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
pubsub/iterator.go Show resolved Hide resolved
Loading
codyoss
codyoss approved these changes Mar 1, 2021
Copy link
Member

@codyoss codyoss left a comment

LGTM

Loading

pubsub/iterator.go Show resolved Hide resolved
Loading
@hongalex hongalex merged commit f88bdc8 into master Mar 4, 2021
3 checks passed
Loading
@hongalex hongalex deleted the pull-cancel-error branch Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants