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

#899: Harden 'Subscription.pull' against missing 'receivedMessages' in response #901

Merged
merged 1 commit into from
May 29, 2015
Merged

#899: Harden 'Subscription.pull' against missing 'receivedMessages' in response #901

merged 1 commit into from
May 29, 2015

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented May 29, 2015

Fixes #899.

Verified

This commit was signed with the committer’s verified signature.
targos Michaël Zasso
…onse.

Fixes #899.
@tseaver tseaver added the api: pubsub Issues related to the Pub/Sub API. label May 29, 2015
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 29, 2015
@dhermes
Copy link
Contributor

dhermes commented May 29, 2015

LGTM

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling b49a7c6 on tseaver:899-pubsub-subscription_pull_wo_receivedMessages into 6bc06ce on GoogleCloudPlatform:master.

tseaver added a commit that referenced this pull request May 29, 2015
…receivedMessages

#899: Harden 'Subscription.pull' against missing 'receivedMessages' in response
@tseaver tseaver merged commit c28fce8 into googleapis:master May 29, 2015
@tseaver tseaver deleted the 899-pubsub-subscription_pull_wo_receivedMessages branch May 29, 2015 20:14
@dhermes dhermes mentioned this pull request Aug 8, 2015
@dillona
Copy link

dillona commented May 1, 2016

I think this has been reintroduced. I'm seeing the following in version 0.13.0:

Exception in thread Thread-236:
Traceback (most recent call last):
File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner
self.run()
File ".\main.py", line 35, in run
worker_thread(self.thread_id)
File ".\main.py", line 161, in worker_thread
try:
File "C:\Python27\lib\site-packages\gcloud\pubsub\subscription.py", line 249, in pull
self.full_name, return_immediately, max_messages)
File "C:\Python27\lib\site-packages\gcloud\pubsub\connection.py", line 419, in subscription_pull
return response['receivedMessages']
KeyError: 'receivedMessages'

@tseaver
Copy link
Contributor Author

tseaver commented May 2, 2016

@dillona Thanks for the report! I've re-fixed it on master via dd38d66.

@weimingwill
Copy link

Hi, when are you going to release new version with this change?

@dhermes
Copy link
Contributor

dhermes commented May 9, 2016

We can cut a release this week. @tseaver WDYT?

@tseaver
Copy link
Contributor Author

tseaver commented May 9, 2016

Sure, no problem making a release soonish.

@weimingwill
Copy link

@tseaver It would be great that you will release in these few days. Thank you!

@weimingwill
Copy link

@tseaver @dhermes Are you going to release it today? Really need the fix in production

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. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subscription.pull() fails with KeyError
6 participants