Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/python-api-core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.19.1
Choose a base ref
...
head repository: googleapis/python-api-core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.20.0
Choose a head ref
  • 3 commits
  • 39 files changed
  • 3 contributors

Commits on Jun 9, 2020

  1. Configuration menu
    Copy the full SHA
    945bafc View commit details
    Browse the repository at this point in the history
  2. feat: allow disabling response stream pre-fetch (#30)

    Closes #25.
    
    This PR adds the ability to disable automatically pre-fetching the first item of a stream returned by `*-Stream` gRPC callables. This hook will be used in PubSub to fix the [stalled stream issue](googleapis/python-pubsub#93), while also not affecting Firestore, since the default behavior is preserved.
    
    I realize the fix is far from ideal, but it's the least ugly among the approaches I tried, e.g. somehow passing the flag through `ResumableBidiRpc` (it's a messy rabbit hole). On the PubSub side monkeypatching the generated SubscriberClient will be needed, but it's a (relatively) clean one-liner:
    ```patch
    diff --git google/cloud/pubsub_v1/gapic/subscriber_client.py google/cloud/pubsub_v1/gapic/subscriber_client.py
    index e98a686..1d6c058 100644
    --- google/cloud/pubsub_v1/gapic/subscriber_client.py
    +++ google/cloud/pubsub_v1/gapic/subscriber_client.py
    @@ -1169,6 +1169,8 @@ class SubscriberClient(object):
                     default_timeout=self._method_configs["StreamingPull"].timeout,
                     client_info=self._client_info,
                 )
    +            # TODO: explain this monkeypatch!
    +            self.transport.streaming_pull._prefetch_first_result_ = False
     
             return self._inner_api_calls["streaming_pull"](
                 requests, retry=retry, timeout=timeout, metadata=metadata
    ```
    
    If/when we merge this, we should also release it, and then we can add `!= 1.17.0` to the `google-api-core` version pin in PubSub.
    
    ### PR checklist
    - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-api-core/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
    - [x] Ensure the tests and linter pass
    - [x] Code coverage does not decrease (if any source code was changed)
    - [x] Appropriate docs were updated (if necessary)
    plamut authored Jun 9, 2020
    Configuration menu
    Copy the full SHA
    74e0b0f View commit details
    Browse the repository at this point in the history
  3. chore: release 1.20.0 (#45)

    * updated CHANGELOG.md [ci skip]
    
    * updated setup.cfg [ci skip]
    
    * updated setup.py
    
    Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
    release-please[bot] authored Jun 9, 2020
    Configuration menu
    Copy the full SHA
    02d2579 View commit details
    Browse the repository at this point in the history
Loading