fix: add detailed message in job error#1762
Conversation
| # [START bigquery_client_json_credentials] | ||
| from google.cloud import bigquery | ||
| from google.oauth2 import service_account | ||
| from google.oauth2 import service_account # type: ignore |
There was a problem hiding this comment.
Thanks for trying to enable the work to continue moving forward.
I saw an error in the mypy-samples nox session in my PR last night with this line of code.
I worry about this as a "fix" for the problem.
That line of code used to work and doesn't now... not only in this repo, but others so I am not comfortable with just ignoring that line without understanding more about the root cause.
I spoke with Anthonios last night. It appears that there is an issue with the types-protobuf library that causes the mypy-samples error. A change was recently made in that library which broke some things downstream.
I am gonna open a separate PR to set limitations for the types-protobuf module to avoid the problematic version of types-protobuf and provide a comment as to why that version is being avoided.
I am hoping that will fix the issue in a slightly more robust way than simply ignoring the error.
There was a problem hiding this comment.
PR 1764 was approved. I merged that code into main and into this branch. Hopefully that should clear up the mypy-samples error and we can delete the type: ignore comment.
There was a problem hiding this comment.
Thank you for explaining the issue in detail! It was indeed strange, because there wasn't much change in the imported module google.oauth2. I'll remove the ignore here.
chalmerlowe
left a comment
There was a problem hiding this comment.
See some comments in the code and a thought:
I recommend that we add a test to ensure that this code works as desired AND to help ensure that in the future if we modify this code, that we don't break anything.
Co-authored-by: Chalmer Lowe <chalmer.lowe@gmail.com>
Co-authored-by: Chalmer Lowe <chalmer.lowe@gmail.com>
|
I made a few changes/suggestions via the web interface to Github and my personal email address got associated with them so that is why the CLA error is showing up. |
|
It happened to me last time too! I just overrode it :) |
Temp fix of internal issue b/310544564.
Starting Oct 2023, customers have found that the error message with jobs have lacked exact cause info. This seems to have been caused by detailed errors being moved to a different part of the job message. This PR makes a temp fix by combining both error sources into the exception we raise.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: