fix: BigQuery job error message - #34208
Merged
Merged
Conversation
nathadfield
force-pushed
the
bq_insert_job_terminated
branch
from
September 8, 2023 15:15
5a2ac28 to
1806f31
Compare
pankajastro
approved these changes
Sep 9, 2023
19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes: #34162
As mentioned on the issue, currently if a BigQuery job running in deferrable mode ends unsuccessfully during execution - perhaps by cancellation in the BigQuery UI or if the job runs out of resources - then the only message that is returned to logs is the rather unhelpful
This is due to the fact that the async function
get_job_statusonly returns the stringerrorand the actual error message is left behind.The change involved here is to return a dictionary object that contains both
statusand amessagewhich, when a BQ job is in aDONEstate but contains anerrorResult, then the specific error is carried through.This then results in the following error output when the job is cancelled from the UI.