-
Notifications
You must be signed in to change notification settings - Fork 98
DatabaseAdmin: on Duplicate name in Schema, gRPC FailedPrecondition status code is not handled and sent back as None #38
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
Labels
api: spanner
Issues related to the googleapis/python-spanner API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Comments
odeke-em
added a commit
to googleapis/python-spanner-django
that referenced
this issue
Mar 16, 2020
spanner-python has a bug due to improper status code extraction from long running operations as per googleapis/python-spanner#38 This change adds error translation for update_ddl invocations. While here, refactored common code for Connection present in both: * autocommit_off_connection.py * autocommit_on_connection.py which makes it easier to add error handling in one place instead of in 2 places. Fixes #344
odeke-em
added a commit
to googleapis/python-spanner-django
that referenced
this issue
Mar 16, 2020
spanner-python has a bug due to improper status code extraction from long running operations as per googleapis/python-spanner#38 This change adds error translation for update_ddl invocations. While here, refactored common code for Connection present in both: * autocommit_off_connection.py * autocommit_on_connection.py which makes it easier to add error handling in one place instead of in 2 places. Fixes #344
odeke-em
added a commit
to googleapis/python-spanner-django
that referenced
this issue
Mar 16, 2020
spanner-python has a bug due to improper status code extraction from long running operations as per googleapis/python-spanner#38 This change adds error translation for update_ddl invocations. While here, refactored common code for Connection present in both: * autocommit_off_connection.py * autocommit_on_connection.py which makes it easier to add error handling in one place instead of in 2 places. Fixes #344
The same issue exists when I try to create a new table whose casing is different from a table that exists already e.g. t1 being created, when T1 already exists google.api_core.exceptions.GoogleAPICallError: None Schema object names differ only in case: T1, t1. |
Thanks for filing this issue! This issue is due to a bug in another repo (python-api-core). I have made a bug in that repo and am close this one. |
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: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
If I have a table that already exists and try to create the same table, this package errors but its error code is None yet its message is
Duplicate name in schema:
.Reproduction
which unfortunately prints out
This bug presents an inconsistency in the error handling because we get an error with a
None
status code andNone
gRPC status code, yet it has a message.Comparison with Go
I can confirm that Cloud Spanner actually sends back the status code because the Go result actually has the status code, with this reproduction and by investigation the responses sent by the Spanner server
and prints out
Postulation
I think that the result of waiting on the long running operation isn't being properly used to retrieve the status code.
/cc @larkee @skuruppu, and for an FYI @bvandiver @timgraham
The text was updated successfully, but these errors were encountered: