GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Requiring `trailing_metadata` is a breaking change · Issue #297 · googleapis/python-api-core

This repository was archived by the owner on Feb 23, 2026. It is now read-only.
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

Requiring trailing_metadata is a breaking change #297

Copy link
Copy link
Closed
#298
Closed
Requiring trailing_metadata is a breaking change#297
#298
Copy link
Assignees
tseaver
Labels
priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@tseaver
tseaver
opened on Oct 27, 2021
Issue body actions

PR #286 added support for showing error status details -- unfortunately, it also breaks Bigtable's unit tests:

___ Test_retry_read_rows_exception.test_w_deadline_exceeded_wrapped_in_grpc ____

self = <tests.unit.test_row_data.Test_retry_read_rows_exception testMethod=test_w_deadline_exceeded_wrapped_in_grpc>

    def test_w_deadline_exceeded_wrapped_in_grpc(self):
        from google.api_core.exceptions import DeadlineExceeded

        wrapped = DeadlineExceeded("testing")
        exception = self._make_grpc_call_error(wrapped)
>       self.assertTrue(self._call_fut(exception))

tests/unit/test_row_data.py:324:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/unit/test_row_data.py:268: in _call_fut
    return _retry_read_rows_exception(exc)
google/cloud/bigtable/row_data.py:333: in _retry_read_rows_exception
    exc = exceptions.from_grpc_error(exc)
.nox/unit-3-9/lib/python3.9/site-packages/google/api_core/exceptions.py:537: in from_grpc_error
    details=_parse_grpc_error_details(rpc_exc),
.nox/unit-3-9/lib/python3.9/site-packages/google/api_core/exceptions.py:490: in _parse_grpc_error_details
    status = rpc_status.from_call(rpc_exc)
.nox/unit-3-9/lib/python3.9/site-packages/grpc_status/rpc_status.py:48: in from_call
    if call.trailing_metadata() is None:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = TestingException(DeadlineExceeded('testing'))

    @abc.abstractmethod
    def trailing_metadata(self):
        """Accesses the trailing metadata sent by the server.

        This method blocks until the value is available.

        Returns:
          The trailing :term:`metadata`.
        """
>       raise NotImplementedError()
E       NotImplementedError

.nox/unit-3-9/lib/python3.9/site-packages/grpc/__init__.py:382: NotImplementedError
__________ Test_retry_read_rows_exception.test_w_miss_wrapped_in_grpc __________

self = <tests.unit.test_row_data.Test_retry_read_rows_exception testMethod=test_w_miss_wrapped_in_grpc>

    def test_w_miss_wrapped_in_grpc(self):
        from google.api_core.exceptions import Conflict

        wrapped = Conflict("testing")
        exception = self._make_grpc_call_error(wrapped)
>       self.assertFalse(self._call_fut(exception))

tests/unit/test_row_data.py:310:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/unit/test_row_data.py:268: in _call_fut
    return _retry_read_rows_exception(exc)
google/cloud/bigtable/row_data.py:333: in _retry_read_rows_exception
    exc = exceptions.from_grpc_error(exc)
.nox/unit-3-9/lib/python3.9/site-packages/google/api_core/exceptions.py:537: in from_grpc_error
    details=_parse_grpc_error_details(rpc_exc),
.nox/unit-3-9/lib/python3.9/site-packages/google/api_core/exceptions.py:490: in _parse_grpc_error_details
    status = rpc_status.from_call(rpc_exc)
.nox/unit-3-9/lib/python3.9/site-packages/grpc_status/rpc_status.py:48: in from_call
    if call.trailing_metadata() is None:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = TestingException(Conflict('testing'))

    @abc.abstractmethod
    def trailing_metadata(self):
        """Accesses the trailing metadata sent by the server.

        This method blocks until the value is available.

        Returns:
          The trailing :term:`metadata`.
        """
>       raise NotImplementedError()
E       NotImplementedError

.nox/unit-3-9/lib/python3.9/site-packages/grpc/__init__.py:382: NotImplementedError
__ Test_retry_read_rows_exception.test_w_service_unavailable_wrapped_in_grpc ___

self = <tests.unit.test_row_data.Test_retry_read_rows_exception testMethod=test_w_service_unavailable_wrapped_in_grpc>

    def test_w_service_unavailable_wrapped_in_grpc(self):
        from google.api_core.exceptions import ServiceUnavailable

        wrapped = ServiceUnavailable("testing")
        exception = self._make_grpc_call_error(wrapped)
>       self.assertTrue(self._call_fut(exception))

tests/unit/test_row_data.py:317:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/unit/test_row_data.py:268: in _call_fut
    return _retry_read_rows_exception(exc)
google/cloud/bigtable/row_data.py:333: in _retry_read_rows_exception
    exc = exceptions.from_grpc_error(exc)
.nox/unit-3-9/lib/python3.9/site-packages/google/api_core/exceptions.py:537: in from_grpc_error
    details=_parse_grpc_error_details(rpc_exc),
.nox/unit-3-9/lib/python3.9/site-packages/google/api_core/exceptions.py:490: in _parse_grpc_error_details
    status = rpc_status.from_call(rpc_exc)
.nox/unit-3-9/lib/python3.9/site-packages/grpc_status/rpc_status.py:48: in from_call
    if call.trailing_metadata() is None:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = TestingException(ServiceUnavailable('testing'))

    @abc.abstractmethod
    def trailing_metadata(self):
        """Accesses the trailing metadata sent by the server.

        This method blocks until the value is available.

        Returns:
          The trailing :term:`metadata`.
        """
>       raise NotImplementedError()
E       NotImplementedError

.nox/unit-3-9/lib/python3.9/site-packages/grpc/__init__.py:382: NotImplementedError

Activity

  1. tseaver
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    on Oct 27, 2021
  2. tseaver
    self-assigned this
    on Oct 27, 2021
  3. tseaver
    added a commit that references this issue on Oct 27, 2021

    fix: handle bare 'grpc.Call' in 'from_grpc_error'

    This issue will close once commit 3b00ec7 is merged into the 'main' branch.
    3b00ec7
  4. busunkim96
    closed this as completedin #298on Nov 3, 2021
  5. busunkim96
    added a commit that references this issue on Nov 3, 2021

    fix: handle bare 'grpc.Call' in 'from_grpc_error' (#298)

    This issue will close once commit 060b339 is merged into the 'main' branch.
    060b339
  6. parthea
    added a commit that references this issue on Sep 6, 2022

    feat: merge main branch into v1 (#438)

    This issue will close once commit a175ce5 is merged into the 'main' branch.
    a175ce5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @tseaver
    tseaver

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.