You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
because instance is the protobuf type google.cloud.spanner_admin_instance_v1.types.spanner_instance_admin.Instance instead of google.cloud.spanner_v1.instance.Instance. This is causing the following error in CI:
During handling of the above exception, another exception occurred:
def setUpModule():
if USE_EMULATOR:
from google.auth.credentials import AnonymousCredentials
emulator_project = os.getenv("GCLOUD_PROJECT", "emulator-test-project")
Config.CLIENT = Client(
project=emulator_project, credentials=AnonymousCredentials()
)
else:
Config.CLIENT = Client()
retry = RetryErrors(exceptions.ServiceUnavailable)
configs = list(retry(Config.CLIENT.list_instance_configs)())
instances = retry(_list_instances)()
EXISTING_INSTANCES[:] = instances
# Delete test instances that are older than an hour.
cutoff = int(time.time()) - 1 * 60 * 60
for instance in Config.CLIENT.list_instances("labels.python-spanner-systests:true"):
if "created" not in instance.labels:
continue
create_time = int(instance.labels["created"])
if create_time > cutoff:
continue
# Instance cannot be deleted while backups exist.
> for backup in instance.list_backups():
tests/system/test_system.py:125:
instance.list_backups
fails at this line:python-spanner/tests/system/test_system.py
Line 125 in 2b74f9c
because
instance
is the protobuf typegoogle.cloud.spanner_admin_instance_v1.types.spanner_instance_admin.Instance
instead ofgoogle.cloud.spanner_v1.instance.Instance
. This is causing the following error in CI:See e.g. this failing test run.
It looks like it was introduced in #195, but the tests passed for that PR. The API changes to
list_instances
andlist_backups
that would have caused this happened back in #147 (see https://github.com/googleapis/python-spanner/pull/147/files#diff-f9e7537fc73135ee5d350541c1147e8ce8c71c505b01c9ea1187f9ee80540b19R328-R356), so I'm not sure why we're only seeing this issue now.The text was updated successfully, but these errors were encountered: