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_with_encryption_key failed #410

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

Test output
args = (parent: "projects/python-docs-samples-tests/instances/test-instance-4deefb9cfa"
database_id: "test-db-e1952e6bf1"
bac...ojects/python-docs-samples-tests/locations/us-central1/keyRings/spanner-test-keyring/cryptoKeys/spanner-test-cmek"
}
,)
kwargs = {'metadata': [('google-cloud-resource-prefix', 'projects/python-docs-samples-tests/instances/test-instance-4deefb9cfa/...sts/instances/test-instance-4deefb9cfa'), ('x-goog-api-client', 'gl-python/3.6.13 grpc/1.38.1 gax/1.31.0 gccl/3.6.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:67:


self = <grpc._channel._UnaryUnaryMultiCallable object at 0x7fb9f6c81898>
request = parent: "projects/python-docs-samples-tests/instances/test-instance-4deefb9cfa"
database_id: "test-db-e1952e6bf1"
back...projects/python-docs-samples-tests/locations/us-central1/keyRings/spanner-test-keyring/cryptoKeys/spanner-test-cmek"
}

timeout = None
metadata = [('google-cloud-resource-prefix', 'projects/python-docs-samples-tests/instances/test-instance-4deefb9cfa/databases/tes...ests/instances/test-instance-4deefb9cfa'), ('x-goog-api-client', 'gl-python/3.6.13 grpc/1.38.1 gax/1.31.0 gccl/3.6.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:946:


state = <grpc._channel._RPCState object at 0x7fb9f6c812b0>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x7fb9df7f6d48>
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 = "Backup not found: projects/python-docs-samples-tests/instances/test-instance-4deefb9cfa/backups/test-backup-073212d0df"
E debug_error_string = "{"created":"@1626168611.159729387","description":"Error received from peer ipv4:74.125.142.95:443","file":"src/core/lib/surface/call.cc","file_line":1066,"grpc_message":"Backup not found: projects/python-docs-samples-tests/instances/test-instance-4deefb9cfa/backups/test-backup-073212d0df","grpc_status":5}"
E >

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

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

capsys = <_pytest.capture.CaptureFixture object at 0x7fb9f40d0828>
spanner_instance = <google.cloud.spanner_v1.instance.Instance object at 0x7fb9f6bc48d0>

@RetryErrors(exception=DeadlineExceeded, max_tries=2)
def test_restore_database_with_encryption_key(capsys, spanner_instance):
    kms_key_name = "projects/{}/locations/{}/keyRings/{}/cryptoKeys/{}".format(
        spanner_instance._client.project, "us-central1", "spanner-test-keyring", "spanner-test-cmek"
    )
  backup_sample.restore_database_with_encryption_key(INSTANCE_ID, CMEK_RESTORE_DB_ID, CMEK_BACKUP_ID, kms_key_name)

backup_sample_test.py:114:


backup_sample.py:141: in restore_database_with_encryption_key
operation = new_database.restore(backup)
../../google/cloud/spanner_v1/database.py:688: in restore
future = api.restore_database(request=request, metadata=metadata,)
../../google/cloud/spanner_admin_database_v1/services/database_admin/client.py:1862: 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:69: 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 = "Backup not found: projects/...ojects/python-docs-samples-tests/instances/test-instance-4deefb9cfa/backups/test-backup-073212d0df","grpc_status":5}"

???
E google.api_core.exceptions.NotFound: 404 Backup not found: projects/python-docs-samples-tests/instances/test-instance-4deefb9cfa/backups/test-backup-073212d0df

: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 Jul 13, 2021
  2. added
    api: spannerIssues related to the googleapis/python-spanner API.
    samplesIssues that are directly related to samples.
    on Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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.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