Skip to content

Revert "Re-enable bundling (for consideration)" - #1954

Merged
tseaver merged 1 commit into
masterfrom
revert-1950-enable-pubsub-bundling
Jul 8, 2016
Merged

Revert "Re-enable bundling (for consideration)"#1954
tseaver merged 1 commit into
masterfrom
revert-1950-enable-pubsub-bundling

Conversation

@tseaver

Copy link
Copy Markdown
Contributor

Reverts #1950

Apparently, we have a much tinier fix possible.

@tseavertseaver added api: pubsub Issues related to the Pub/Sub API. grpc labels Jul 1, 2016
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 1, 2016
@daspecster

Copy link
Copy Markdown
Contributor

Ah, this still has to be confirmed right?

@tseaver

Copy link
Copy Markdown
ContributorAuthor

Yup. But I wanted to get ready, as my memory of something @geigerj said a week ago makes me think we're going to back it out.

@tseaver

Copy link
Copy Markdown
ContributorAuthor

@geigerj, @bjwatson

options=CallOptions(is_bundling=True)
message_pbs= [_message_pb_from_dict(message)
formessageinmessages]
try:
result=self._gax_api.publish(topic_path, message_pbs,
options=options)
exceptGaxErrorasexc:
ifexc_to_code(exc.cause) ==StatusCode.NOT_FOUND:
raiseNotFound(topic_path)
raisereturnresult.message_ids

fails because the GAX publish wrapper returns an Event object when is_bundling is set True:

======================================================================
ERROR: test_message_pull_mode_e2e (pubsub.TestPubsub)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/system_tests/pubsub.py", line 157, in test_message_pull_mode_e2e
topic.publish(MESSAGE_1, extra=EXTRA_1)
File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/gcloud/pubsub/topic.py", line 246, in publish
message_ids = api.topic_publish(self.full_name, [message_data])
File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/gcloud/pubsub/_gax.py", line 175, in topic_publish
return result.message_ids
AttributeError: 'Event' object has no attribute 'message_ids'

@tseaver

Copy link
Copy Markdown
ContributorAuthor

@bjwatson I believe we actually want _gax._PublisherAPI.topic_publish to disable bundling: it needs to remain semantically equivalent to the JSON-over-API version (i.e, returning the message_ids), which makes the async bundling bit less useful.

@tseaver

Copy link
Copy Markdown
ContributorAuthor

@daspecster I think we should go ahead and merge the revert.

@daspecster

Copy link
Copy Markdown
Contributor

@tseaver ok, LGTM!

@tseaver
tseaver merged commit 6b4704b into masterJul 8, 2016
@tseaver
tseaver deleted the revert-1950-enable-pubsub-bundling branch July 8, 2016 18:38
This was referenced Aug 3, 2016
parthea pushed a commit that referenced this pull request Mar 6, 2026
* chore(deps): update all dependencies
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* Update samples/geography/requirements.txt
* Update samples/geography/requirements.txt
---------
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Chalmer Lowe <chalmerlowe@google.com>
parthea pushed a commit that referenced this pull request Apr 1, 2026
* test: fix multimodal tests
* fix
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsubIssues related to the Pub/Sub API.cla: yesThis human has signed the Contributor License Agreement.grpc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@tseaver@daspecster@googlebot