Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

samples.samples.backup_sample_test: test_restore_database failed #265

Closed

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

Test output
args = (parent: "projects/python-docs-samples-tests/instances/test-instance-a3beb9e7d1"
database_id: "test-db-ba70cb85d9"
backup: "projects/python-docs-samples-tests/instances/test-instance-a3beb9e7d1/backups/test-backup-449595556b"
,)
kwargs = {'metadata': [('google-cloud-resource-prefix', 'projects/python-docs-samples-tests/instances/test-instance-a3beb9e7d1/...sts/instances/test-instance-a3beb9e7d1'), ('x-goog-api-client', 'gl-python/3.7.10 grpc/1.36.1 gax/1.26.1 gccl/3.2.0')]}
@six.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
    try:
      return callable_(*args, **kwargs)

.nox/py-3-7/lib/python3.7/site-packages/google/api_core/grpc_helpers.py:73:


self = <grpc._channel._UnaryUnaryMultiCallable object at 0x7fc0017b7050>
request = parent: "projects/python-docs-samples-tests/instances/test-instance-a3beb9e7d1"
database_id: "test-db-ba70cb85d9"
backup: "projects/python-docs-samples-tests/instances/test-instance-a3beb9e7d1/backups/test-backup-449595556b"

timeout = None
metadata = [('google-cloud-resource-prefix', 'projects/python-docs-samples-tests/instances/test-instance-a3beb9e7d1/databases/tes...ests/instances/test-instance-a3beb9e7d1'), ('x-goog-api-client', 'gl-python/3.7.10 grpc/1.36.1 gax/1.26.1 gccl/3.2.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-7/lib/python3.7/site-packages/grpc/_channel.py:923:


state = <grpc._channel._RPCState object at 0x7fc0017b7ad0>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x7fc001561280>
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.NOT_FOUND
E details = "Instance not found: projects/python-docs-samples-tests/instances/test-instance-a3beb9e7d1"
E debug_error_string = "{"created":"@1615460581.748006329","description":"Error received from peer ipv4:74.125.195.95:443","file":"src/core/lib/surface/call.cc","file_line":1067,"grpc_message":"Instance not found: projects/python-docs-samples-tests/instances/test-instance-a3beb9e7d1","grpc_status":5}"
E >

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

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

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

@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:83:


backup_sample.py:69: in restore_database
operation = new_database.restore(backup)
../../google/cloud/spanner_v1/database.py:610: in restore
metadata=metadata,
../../google/cloud/spanner_admin_database_v1/services/database_admin/client.py:1846: in restore_database
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
.nox/py-3-7/lib/python3.7/site-packages/google/api_core/gapic_v1/method.py:145: in call
return wrapped_func(*args, **kwargs)
.nox/py-3-7/lib/python3.7/site-packages/google/api_core/grpc_helpers.py:75: 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.NOT_FOUND
details = "Instance not found: project...essage":"Instance not found: projects/python-docs-samples-tests/instances/test-instance-a3beb9e7d1","grpc_status":5}"

???
E google.api_core.exceptions.NotFound: 404 Instance not found: projects/python-docs-samples-tests/instances/test-instance-a3beb9e7d1

:3: NotFound

Activity

  1. added
    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.
    on Mar 11, 2021
  2. added
    api: spannerIssues related to the googleapis/python-spanner API.
    samplesIssues that are directly related to samples.
    on Mar 11, 2021
  3. flaky-bot commented on Mar 14, 2021

    @flaky-bot
    Author

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

  4. added
    flakybot: flakyTells the Flaky Bot not to close or comment on this issue.
    on Mar 14, 2021
  5. larkee commented on Mar 15, 2021

    @larkee
    Contributor

    This was a transient issue. See #272 for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: spannerIssues related to the googleapis/python-spanner API.flakybot: flakyTells the Flaky Bot not to close or comment on this issue.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.samplesIssues that are directly related to samples.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