Skip to content

tests.system.test_session_api: test_partition_read_w_index failed #924

@flaky-bot

Description

@flaky-bot

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: e296edb
buildURL: Build Status, Sponge
status: failed

Test output
args = (session: "projects/precise-truck-742/instances/google-cloud-1680930197879/databases/test_sessions_1680930348212/sessi...n0dkUHZ_XJD2HeMFJOqDQ9Y1kLkVR4_UgwTXvB54YLBrHZGdEcWzr-0TzwX4FAggTmsrAA"
request_options {
}
data_boost_enabled: true
,)
kwargs = {'metadata': [('google-cloud-resource-prefix', 'projects/precise-truck-742/instances/google-cloud-1680930197879/databa...38ftBeXnyz46L2Q'), ('x-goog-api-client', 'gl-python/3.8.13 grpc/1.54.0rc1 gax/2.11.0 gccl/3.30.0')], 'timeout': 3600.0}
result = <_MultiThreadedRendezvous of RPC that terminated with:
	status = StatusCode.PERMISSION_DENIED
	details = "This instanc...ot allowed to use DataBoost at this time. Please contact cloud-spanner-sa-preview@google.com for more information."}"
>
prefetch_first = True
@functools.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
    try:
        result = callable_(*args, **kwargs)
        # Auto-fetching the first result causes PubSub client's streaming pull
        # to hang when re-opening the stream, thus we need examine the hacky
        # hidden flag to see if pre-fetching is disabled.
        # https://github.com/googleapis/python-pubsub/issues/93#issuecomment-630762257
        prefetch_first = getattr(callable_, "_prefetch_first_result_", True)
      return _StreamingResponseIterator(
            result, prefetch_first_result=prefetch_first
        )

.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/google/api_core/grpc_helpers.py:162:


self = <google.api_core.grpc_helpers._StreamingResponseIterator object at 0x7ff4e001d880>
wrapped = <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.PERMISSION_DENIED
details = "This instanc...ot allowed to use DataBoost at this time. Please contact cloud-spanner-sa-preview@google.com for more information."}"

prefetch_first_result = True

def __init__(self, wrapped, prefetch_first_result=True):
    self._wrapped = wrapped

    # This iterator is used in a retry context, and returned outside after init.
    # gRPC will not throw an exception until the stream is consumed, so we need
    # to retrieve the first result, in order to fail, in order to trigger a retry.
    try:
        if prefetch_first_result:
          self._stored_first_result = next(self._wrapped)

.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/google/api_core/grpc_helpers.py:88:


self = <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.PERMISSION_DENIED
details = "This instanc...ot allowed to use DataBoost at this time. Please contact cloud-spanner-sa-preview@google.com for more information."}"

def __next__(self):
  return self._next()

.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/grpc/_channel.py:475:


self = <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.PERMISSION_DENIED
details = "This instanc...ot allowed to use DataBoost at this time. Please contact cloud-spanner-sa-preview@google.com for more information."}"

def _next(self) -> Any:
    with self._state.condition:
        if self._state.code is None:
            event_handler = _event_handler(self._state,
                                           self._response_deserializer)
            self._state.due.add(cygrpc.OperationType.receive_message)
            operating = self._call.operate(
                (cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),),
                event_handler)
            if not operating:
                self._state.due.remove(cygrpc.OperationType.receive_message)
        elif self._state.code is grpc.StatusCode.OK:
            raise StopIteration()
        else:
            raise self

        def _response_ready():
            return (self._state.response is not None or
                    (cygrpc.OperationType.receive_message
                     not in self._state.due and
                     self._state.code is not None))

        _common.wait(self._state.condition.wait, _response_ready)
        if self._state.response is not None:
            response = self._state.response
            self._state.response = None
            return response
        elif cygrpc.OperationType.receive_message not in self._state.due:
            if self._state.code is grpc.StatusCode.OK:
                raise StopIteration()
            elif self._state.code is not None:
              raise self

E grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
E status = StatusCode.PERMISSION_DENIED
E details = "This instance (projects/precise-truck-742/instances/google-cloud-1680930197879) is not allowed to use DataBoost at this time. Please contact cloud-spanner-sa-preview@google.com for more information."
E debug_error_string = "UNKNOWN:Error received from peer ipv4:172.253.117.95:443 {created_time:"2023-04-08T05:07:51.182058526+00:00", grpc_status:7, grpc_message:"This instance (projects/precise-truck-742/instances/google-cloud-1680930197879) is not allowed to use DataBoost at this time. Please contact cloud-spanner-sa-preview@google.com for more information."}"
E >

.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/grpc/_channel.py:881: _MultiThreadedRendezvous

The above exception was the direct cause of the following exception:

sessions_database = <google.cloud.spanner_v1.database.Database object at 0x7ff4e01ef400>
not_emulator = None

def test_partition_read_w_index(sessions_database, not_emulator):
    sd = _sample_data
    row_count = 10
    columns = sd.COLUMNS[1], sd.COLUMNS[2]
    committed = _set_up_table(sessions_database, row_count)

    expected = [[row[1], row[2]] for row in _row_data(row_count)]
    union = []

    batch_txn = sessions_database.batch_snapshot(read_timestamp=committed)
    batches = batch_txn.generate_read_batches(
        sd.TABLE,
        columns,
        spanner_v1.KeySet(all_=True),
        index="name",
        data_boost_enabled=True,
    )
    for batch in batches:
        p_results_iter = batch_txn.process(batch)
      union.extend(list(p_results_iter))

tests/system/test_session_api.py:1897:


google/cloud/spanner_v1/streamed.py:145: in iter
self._consume_next()
google/cloud/spanner_v1/streamed.py:117: in _consume_next
response = next(self._response_iterator)
google/cloud/spanner_v1/snapshot.py:83: in _restart_on_unavailable
iterator = method(request=request)
google/cloud/spanner_v1/services/spanner/client.py:1531: in streaming_read
response = rpc(
.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/google/api_core/gapic_v1/method.py:113: in call
return wrapped_func(*args, **kwargs)
.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/google/api_core/timeout.py:120: in func_with_timeout
return func(*args, **kwargs)


args = (session: "projects/precise-truck-742/instances/google-cloud-1680930197879/databases/test_sessions_1680930348212/sessi...n0dkUHZ_XJD2HeMFJOqDQ9Y1kLkVR4_UgwTXvB54YLBrHZGdEcWzr-0TzwX4FAggTmsrAA"
request_options {
}
data_boost_enabled: true
,)
kwargs = {'metadata': [('google-cloud-resource-prefix', 'projects/precise-truck-742/instances/google-cloud-1680930197879/databa...38ftBeXnyz46L2Q'), ('x-goog-api-client', 'gl-python/3.8.13 grpc/1.54.0rc1 gax/2.11.0 gccl/3.30.0')], 'timeout': 3600.0}
result = <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.PERMISSION_DENIED
details = "This instanc...ot allowed to use DataBoost at this time. Please contact cloud-spanner-sa-preview@google.com for more information."}"

prefetch_first = True

@functools.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
    try:
        result = callable_(*args, **kwargs)
        # Auto-fetching the first result causes PubSub client's streaming pull
        # to hang when re-opening the stream, thus we need examine the hacky
        # hidden flag to see if pre-fetching is disabled.
        # https://github.com/googleapis/python-pubsub/issues/93#issuecomment-630762257
        prefetch_first = getattr(callable_, "_prefetch_first_result_", True)
        return _StreamingResponseIterator(
            result, prefetch_first_result=prefetch_first
        )
    except grpc.RpcError as exc:
      raise exceptions.from_grpc_error(exc) from exc

E google.api_core.exceptions.PermissionDenied: 403 This instance (projects/precise-truck-742/instances/google-cloud-1680930197879) is not allowed to use DataBoost at this time. Please contact cloud-spanner-sa-preview@google.com for more information.

.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/google/api_core/grpc_helpers.py:166: PermissionDenied

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the googleapis/python-spanner API.flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.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