Skip to content

list_instances is not returning expected Instance type #257

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

Closed
gzamb opened this issue Mar 9, 2021 · 2 comments · Fixed by #259
Closed

list_instances is not returning expected Instance type #257

gzamb opened this issue Mar 9, 2021 · 2 comments · Fixed by #259
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. type: docs Improvement to the documentation for an API.

Comments

@gzamb
Copy link

gzamb commented Mar 9, 2021

I'm migrating from 1.9 to 3.1 and I noticed that the list_instances() method used to return type Instance<google.cloud.spanner_v1.instance.Instance> but with the latest it actually returns the spanner admin instance<google.cloud.spanner_admin_instance_v1.types.spanner_instance_admin.Instance> which does not have the instance_id. Thus I now get an AttributeError.

I'm unsure if this is a bug or if the documentation just hasn't been updated.

@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner API. label Mar 9, 2021
@larkee larkee added type: docs Improvement to the documentation for an API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Mar 9, 2021
@larkee
Copy link
Contributor

larkee commented Mar 9, 2021

Thank you for filing this issue! As part of the migration from 1.x to 2.x, list_instances(), list_databases(), and list_backups() now all return the protos rather than the wrapper classes. So this is not a bug, but rather the documentation being out of date. I will make sure this is fixed for the next release 👍

@gzamb
Copy link
Author

gzamb commented Mar 9, 2021

Ok, good to know. Thanks for the response.

@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Mar 14, 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. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 🚨 This issue needs some love. type: docs Improvement to the documentation for an API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants