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

pubsub: more eager to fail when calling .Receive in 1.10.2 #3986

Closed
ssp opened this issue Apr 22, 2021 · 2 comments
Closed

pubsub: more eager to fail when calling .Receive in 1.10.2 #3986

ssp opened this issue Apr 22, 2021 · 2 comments
Assignees
Labels
api: pubsub Issues related to the Pub/Sub API. triage me I really want to be triaged.

Comments

@ssp
Copy link

ssp commented Apr 22, 2021

Client
PubSub

Environment
Alpine Docker on GKE

Go Environment
$ go version
1.16.3
$ go env

Code

pubsubClient.Subscription("subscription-name").Receive(ctx, …)

Expected behavior
Up to version 1.10.1, the pubsub library seemed to be quite resilient against missing network connections when calling .Receive.

I would expect that resilience to remain present across a bugfix-update.

Actual behavior
Since version 1.10.2, calling .Receive on a Subscription returns an error when having no network access.

The retrieval of the configuration introduced here seems to trigger a remote call, returning an error if that fails.

Additional context

Waiting for a few seconds before calling .Receive worked around the issue for me (with the root cause probably being a delay introduced to the network connections being available by the istio configuration), so this change in behaviour will not be apparent when running locally.

As this seems to be a significant change in the behaviour of the library that I didn’t expect in a bugfix release, I thought you may want to be aware of it in case it wasn’t intended.

@ssp ssp added the triage me I really want to be triaged. label Apr 22, 2021
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Apr 22, 2021
@hongalex
Copy link
Member

Thanks for reporting. Yeah, resiliency to network issues isn't something we guarantee in our libraries. With that said, this behavior should be intact again in v1.10.3 (specifically this change), as I moved the config check further down so it's only used when we detect ordering keys in the messages received. Also, errors from that call are transparent now and won't be returned by the Receive call. Closing for now, but let me know if any of that needs clarification.

@ssp
Copy link
Author

ssp commented Apr 27, 2021

Thanks a lot for looking into this so quickly @hongalex . Version 1.10.3 does solve the issue we experienced!

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 Pub/Sub API. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants