FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Revert "Re-enable bundling (for consideration)" by tseaver · Pull Request #1954 · googleapis/google-cloud-python · GitHub

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 commented Jul 1, 2016

Copy link
Copy Markdown
Contributor

Reverts #1950

Apparently, we have a much tinier fix possible.

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

Copy link
Copy Markdown
Contributor

Ah, this still has to be confirmed right?

tseaver commented Jul 1, 2016

Copy link
Copy Markdown
Contributor Author

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 commented Jul 5, 2016

Copy link
Copy Markdown
Contributor Author

@geigerj, @bjwatson

        options = CallOptions(is_bundling=True)
        message_pbs = [_message_pb_from_dict(message)
                       for message in messages]
        try:
            result = self._gax_api.publish(topic_path, message_pbs,
                                           options=options)
        except GaxError as exc:
            if exc_to_code(exc.cause) == StatusCode.NOT_FOUND:
                raise NotFound(topic_path)
            raise
        return result.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 commented Jul 8, 2016

Copy link
Copy Markdown
Contributor Author

@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 commented Jul 8, 2016

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor

@tseaver ok, LGTM!

tseaver merged commit 6b4704b into master Jul 8, 2016
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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. grpc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL