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.backup_sample_test: test_restore_database failed #175

Closed
flaky-bot bot opened this issue Nov 26, 2020 · 4 comments
Closed

samples.samples.backup_sample_test: test_restore_database failed #175

flaky-bot bot opened this issue Nov 26, 2020 · 4 comments
Assignees
Labels
api: spanner Issues related to the googleapis/python-spanner API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 🚨 This issue needs some love. 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 Nov 26, 2020

Note: #158 was also for this test, but it was closed more than 10 days ago. So, I didn't mark it flaky.


commit: 6053f4a
buildURL: Build Status, Sponge
status: failed

Test output
args = (parent: "projects/python-docs-samples-tests/instances/test-instance-ea2482b380"
database_id: "test-db-652111f0ff"
backup: "projects/python-docs-samples-tests/instances/test-instance-ea2482b380/backups/test-backup-c150364a3e"
,)
kwargs = {'metadata': [('google-cloud-resource-prefix', 'projects/python-docs-samples-tests/instances/test-instance-ea2482b380/...sts/instances/test-instance-ea2482b380'), ('x-goog-api-client', 'gl-python/3.6.10 grpc/1.33.2 gax/1.23.0 gccl/2.0.0')]}
@six.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
    try:
      return callable_(*args, **kwargs)

.nox/py-3-6/lib/python3.6/site-packages/google/api_core/grpc_helpers.py:57:


self = <grpc._channel._UnaryUnaryMultiCallable object at 0x7fa8776fdc18>
request = parent: "projects/python-docs-samples-tests/instances/test-instance-ea2482b380"
database_id: "test-db-652111f0ff"
backup: "projects/python-docs-samples-tests/instances/test-instance-ea2482b380/backups/test-backup-c150364a3e"

timeout = None
metadata = [('google-cloud-resource-prefix', 'projects/python-docs-samples-tests/instances/test-instance-ea2482b380/databases/tes...ests/instances/test-instance-ea2482b380'), ('x-goog-api-client', 'gl-python/3.6.10 grpc/1.33.2 gax/1.23.0 gccl/2.0.0')]
credentials = None, wait_for_ready = None, compression = None

def __call__(self,
             request,
             timeout=None,
             metadata=None,
             credentials=None,
             wait_for_ready=None,
             compression=None):
    state, call, = self._blocking(request, timeout, metadata, credentials,
                                  wait_for_ready, compression)
  return _end_unary_response_blocking(state, call, False, None)

.nox/py-3-6/lib/python3.6/site-packages/grpc/_channel.py:923:


state = <grpc._channel._RPCState object at 0x7fa8776fdd30>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x7fa877630788>
with_call = False, deadline = None

def _end_unary_response_blocking(state, call, with_call, deadline):
    if state.code is grpc.StatusCode.OK:
        if with_call:
            rendezvous = _MultiThreadedRendezvous(state, call, None, deadline)
            return state.response, rendezvous
        else:
            return state.response
    else:
      raise _InactiveRpcError(state)

E grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
E status = StatusCode.FAILED_PRECONDITION
E details = "Cannot create database projects/python-docs-samples-tests/instances/test-instance-ea2482b380/databases/test-db-652111f0ff from backup projects/python-docs-samples-tests/instances/test-instance-ea2482b380/backups/test-backup-c150364a3e because the backup is still being created. Please retry the operation once the pending backup is complete."
E debug_error_string = "{"created":"@1606386594.850508711","description":"Error received from peer ipv4:74.125.197.95:443","file":"src/core/lib/surface/call.cc","file_line":1061,"grpc_message":"Cannot create database projects/python-docs-samples-tests/instances/test-instance-ea2482b380/databases/test-db-652111f0ff from backup projects/python-docs-samples-tests/instances/test-instance-ea2482b380/backups/test-backup-c150364a3e because the backup is still being created. Please retry the operation once the pending backup is complete.","grpc_status":9}"
E >

.nox/py-3-6/lib/python3.6/site-packages/grpc/_channel.py:826: _InactiveRpcError

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

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

@RetryErrors(exception=DeadlineExceeded, max_tries=2)
def test_restore_database(capsys):
  backup_sample.restore_database(INSTANCE_ID, RESTORE_DB_ID, BACKUP_ID)

backup_sample_test.py:75:


backup_sample.py:69: in restore_database
operation = new_database.restore(backup)
../../google/cloud/spanner_v1/database.py:551: in restore
metadata=metadata,
../../google/cloud/spanner_admin_database_v1/services/database_admin/client.py:1835: in restore_database
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/gapic_v1/method.py:145: in call
return wrapped_func(*args, **kwargs)
.nox/py-3-6/lib/python3.6/site-packages/google/api_core/grpc_helpers.py:59: in error_remapped_callable
six.raise_from(exceptions.from_grpc_error(exc), exc)


value = None
from_value = <_InactiveRpcError of RPC that terminated with:
status = StatusCode.FAILED_PRECONDITION
details = "Cannot create dat...the backup is still being created. Please retry the operation once the pending backup is complete.","grpc_status":9}"

???
E google.api_core.exceptions.FailedPrecondition: 400 Cannot create database projects/python-docs-samples-tests/instances/test-instance-ea2482b380/databases/test-db-652111f0ff from backup projects/python-docs-samples-tests/instances/test-instance-ea2482b380/backups/test-backup-c150364a3e because the backup is still being created. Please retry the operation once the pending backup is complete.

:3: FailedPrecondition

@flaky-bot flaky-bot bot added buildcop: issue 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 Nov 26, 2020
@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 Nov 26, 2020
@flaky-bot
Copy link
Author

flaky-bot bot commented Nov 26, 2020

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 (6053f4a), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).

@larkee
Copy link
Contributor

larkee commented Nov 27, 2020

Failed due to test_create_backup failing. See #157

@larkee larkee closed this as completed Nov 27, 2020
@flaky-bot
Copy link
Author

flaky-bot bot commented Dec 1, 2020

Oops! Looks like this issue is still flaky. It failed again. 😬

I reopened the issue, but a human will need to close it again.


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

Test output
args = (parent: "projects/python-docs-samples-tests/instances/test-instance-02a97310cb"
database_id: "test-db-4e003f3de6"
backup: "projects/python-docs-samples-tests/instances/test-instance-02a97310cb/backups/test-backup-ac366fde98"
,)
kwargs = {'metadata': [('google-cloud-resource-prefix', 'projects/python-docs-samples-tests/instances/test-instance-02a97310cb/...ests/instances/test-instance-02a97310cb'), ('x-goog-api-client', 'gl-python/3.8.3 grpc/1.33.2 gax/1.23.0 gccl/2.0.0')]}
@six.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
    try:
      return callable_(*args, **kwargs)

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


self = <grpc._channel._UnaryUnaryMultiCallable object at 0x7f662e376f10>
request = parent: "projects/python-docs-samples-tests/instances/test-instance-02a97310cb"
database_id: "test-db-4e003f3de6"
backup: "projects/python-docs-samples-tests/instances/test-instance-02a97310cb/backups/test-backup-ac366fde98"

timeout = None
metadata = [('google-cloud-resource-prefix', 'projects/python-docs-samples-tests/instances/test-instance-02a97310cb/databases/tes...tests/instances/test-instance-02a97310cb'), ('x-goog-api-client', 'gl-python/3.8.3 grpc/1.33.2 gax/1.23.0 gccl/2.0.0')]
credentials = None, wait_for_ready = None, compression = None

def __call__(self,
             request,
             timeout=None,
             metadata=None,
             credentials=None,
             wait_for_ready=None,
             compression=None):
    state, call, = self._blocking(request, timeout, metadata, credentials,
                                  wait_for_ready, compression)
  return _end_unary_response_blocking(state, call, False, None)

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


state = <grpc._channel._RPCState object at 0x7f662e4dfdc0>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x7f662e5103c0>
with_call = False, deadline = None

def _end_unary_response_blocking(state, call, with_call, deadline):
    if state.code is grpc.StatusCode.OK:
        if with_call:
            rendezvous = _MultiThreadedRendezvous(state, call, None, deadline)
            return state.response, rendezvous
        else:
            return state.response
    else:
      raise _InactiveRpcError(state)

E grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
E status = StatusCode.FAILED_PRECONDITION
E details = "Cannot create database projects/python-docs-samples-tests/instances/test-instance-02a97310cb/databases/test-db-4e003f3de6 from backup projects/python-docs-samples-tests/instances/test-instance-02a97310cb/backups/test-backup-ac366fde98 because the backup is still being created. Please retry the operation once the pending backup is complete."
E debug_error_string = "{"created":"@1606825363.310284420","description":"Error received from peer ipv4:74.125.20.95:443","file":"src/core/lib/surface/call.cc","file_line":1061,"grpc_message":"Cannot create database projects/python-docs-samples-tests/instances/test-instance-02a97310cb/databases/test-db-4e003f3de6 from backup projects/python-docs-samples-tests/instances/test-instance-02a97310cb/backups/test-backup-ac366fde98 because the backup is still being created. Please retry the operation once the pending backup is complete.","grpc_status":9}"
E >

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

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

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

@RetryErrors(exception=DeadlineExceeded, max_tries=2)
def test_restore_database(capsys):
  backup_sample.restore_database(INSTANCE_ID, RESTORE_DB_ID, BACKUP_ID)

backup_sample_test.py:75:


backup_sample.py:69: in restore_database
operation = new_database.restore(backup)
../../google/cloud/spanner_v1/database.py:547: in restore
future = api.restore_database(
../../google/cloud/spanner_admin_database_v1/services/database_admin/client.py:1835: in restore_database
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/grpc_helpers.py:59: in error_remapped_callable
six.raise_from(exceptions.from_grpc_error(exc), exc)


value = None
from_value = <_InactiveRpcError of RPC that terminated with:
status = StatusCode.FAILED_PRECONDITION
details = "Cannot create dat...the backup is still being created. Please retry the operation once the pending backup is complete.","grpc_status":9}"

???
E google.api_core.exceptions.FailedPrecondition: 400 Cannot create database projects/python-docs-samples-tests/instances/test-instance-02a97310cb/databases/test-db-4e003f3de6 from backup projects/python-docs-samples-tests/instances/test-instance-02a97310cb/backups/test-backup-ac366fde98 because the backup is still being created. Please retry the operation once the pending backup is complete.

:3: FailedPrecondition

@flaky-bot flaky-bot bot reopened this Dec 1, 2020
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Dec 3, 2020
@larkee
Copy link
Contributor

larkee commented Dec 15, 2020

Failed due to test_create_backup failing. See #157

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. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 🚨 This issue needs some love. 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