Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples.samples.snippets_test: test_query_data_with_index failed #404

Closed
flaky-bot bot opened this issue Jul 9, 2021 · 1 comment
Closed

samples.samples.snippets_test: test_query_data_with_index failed #404

flaky-bot bot opened this issue Jul 9, 2021 · 1 comment
Assignees
Labels
api: spanner Issues related to the googleapis/python-spanner API. flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. samples Issues that are directly related to samples. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@flaky-bot
Copy link

flaky-bot bot commented Jul 9, 2021

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: 7b8d856
buildURL: Build Status, Sponge
status: failed

Test output
args = (session: "projects/python-docs-samples-tests/instances/test-instance-de336724ab/databases/test-db-b65db26a15/sessions...ey: "end_title"
  value {
    code: STRING
  }
}
param_types {
  key: "start_title"
  value {
    code: STRING
  }
}
,)
kwargs = {'metadata': [('google-cloud-resource-prefix', 'projects/python-docs-samples-tests/instances/test-instance-de336724ab/...S_aKJxWE75Er_B33IVBw'), ('x-goog-api-client', 'gl-python/3.8.8 grpc/1.38.1 gax/1.30.0 gccl/3.6.0')], 'timeout': 3600.0}
result = <_MultiThreadedRendezvous of RPC that terminated with:
	status = StatusCode.INVALID_ARGUMENT
	details = "The index Alb..._line":1066,"grpc_message":"The index AlbumsByAlbumTitle cannot be used because it is in backfill.","grpc_status":3}"
>
prefetch_first = True
@general_helpers.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/py-3-8/lib/python3.8/site-packages/google/api_core/grpc_helpers.py:160:


self = <google.api_core.grpc_helpers._StreamingResponseIterator object at 0x7f9e23554880>
wrapped = <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "The index Alb..._line":1066,"grpc_message":"The index AlbumsByAlbumTitle cannot be used because it is in backfill.","grpc_status":3}"

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 = six.next(self._wrapped)

.nox/py-3-8/lib/python3.8/site-packages/google/api_core/grpc_helpers.py:83:


self = <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "The index Alb..._line":1066,"grpc_message":"The index AlbumsByAlbumTitle cannot be used because it is in backfill.","grpc_status":3}"

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

.nox/py-3-8/lib/python3.8/site-packages/grpc/_channel.py:426:


self = <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "The index Alb..._line":1066,"grpc_message":"The index AlbumsByAlbumTitle cannot be used because it is in backfill.","grpc_status":3}"

def _next(self):
    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.INVALID_ARGUMENT
E details = "The index AlbumsByAlbumTitle cannot be used because it is in backfill."
E debug_error_string = "{"created":"@1625830260.472572240","description":"Error received from peer ipv4:74.125.142.95:443","file":"src/core/lib/surface/call.cc","file_line":1066,"grpc_message":"The index AlbumsByAlbumTitle cannot be used because it is in backfill.","grpc_status":3}"
E >

.nox/py-3-8/lib/python3.8/site-packages/grpc/_channel.py:826: _MultiThreadedRendezvous

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

capsys = <_pytest.capture.CaptureFixture object at 0x7f9e201b7370>

def test_query_data_with_index(capsys):
  snippets.query_data_with_index(INSTANCE_ID, DATABASE_ID)

snippets_test.py:146:


snippets.py:356: in query_data_with_index
for row in results:
../../google/cloud/spanner_v1/streamed.py:149: in iter
self._consume_next()
../../google/cloud/spanner_v1/streamed.py:121: in _consume_next
response = six.next(self._response_iterator)
../../google/cloud/spanner_v1/snapshot.py:59: in _restart_on_unavailable
iterator = method(request=request)
../../google/cloud/spanner_v1/services/spanner/client.py:884: in execute_streaming_sql
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
.nox/py-3-8/lib/python3.8/site-packages/google/api_core/gapic_v1/method.py:145: in call
return wrapped_func(*args, **kwargs)
.nox/py-3-8/lib/python3.8/site-packages/google/api_core/timeout.py:102: in func_with_timeout
return func(*args, **kwargs)
.nox/py-3-8/lib/python3.8/site-packages/google/api_core/grpc_helpers.py:162: in error_remapped_callable
six.raise_from(exceptions.from_grpc_error(exc), exc)


value = None
from_value = <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "The index Alb..._line":1066,"grpc_message":"The index AlbumsByAlbumTitle cannot be used because it is in backfill.","grpc_status":3}"

???
E google.api_core.exceptions.InvalidArgument: 400 The index AlbumsByAlbumTitle cannot be used because it is in backfill.

:3: InvalidArgument

@flaky-bot flaky-bot bot added flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jul 9, 2021
@product-auto-label product-auto-label bot added api: spanner Issues related to the googleapis/python-spanner API. samples Issues that are directly related to samples. labels Jul 9, 2021
@flaky-bot
Copy link
Author

flaky-bot bot commented Jul 10, 2021

Looks like this issue is flaky. 😟

I'm going to leave this open and stop commenting.

A human should fix and close this.


When run at the same commit (7b8d856), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).

@flaky-bot flaky-bot bot added the flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. label Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner API. flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. samples Issues that are directly related to samples. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants