fix(job): check for errorResult when polling jobs#387
fix(job): check for errorResult when polling jobs#387callmehiphop merged 3 commits intogoogleapis:masterfrom callmehiphop:dg--329
errorResult when polling jobs#387Conversation
Codecov Report
@@ Coverage Diff @@
## master #387 +/- ##
=======================================
Coverage 99.44% 99.44%
=======================================
Files 4 4
Lines 544 544
Branches 75 75
=======================================
Hits 541 541
Misses 2 2
Partials 1 1
Continue to review full report at Codecov.
|
|
It does seem correct to use status.errorResultsFinal error result of the job. If present, indicates that the job has completed and was unsuccessful. For more information, see troubleshooting errors. status.errors[]The first errors encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful. Although, I wonder what type of error could happen in |
|
@stephenplusplus so while investigating #329 I learned that you can set a |
bcoe
left a comment
There was a problem hiding this comment.
If I'm understanding this correctly, in the past if we received an error and a response we preferred the response? now error takes precedence?
This looks good to me; I'd probably lean towards calling it a breaking change? (wouldn't be shocked if people relied on the old behavior).
| beforeEach(() => { | ||
| job.getMetadata = (callback: Function) => { | ||
| callback(null, apiResponse, apiResponse); | ||
| callback(null, apiResponse); |
There was a problem hiding this comment.
nit: it would be cool if we could get a test case around this change in behavior.
There was a problem hiding this comment.
I actually thought this was a behavior change that wasn't pulled over to BigQuery correctly, but now that you said this I think we might have stumbled on to a bug in nodejs-common
There was a problem hiding this comment.
Oh, nevermind, my initial guess was right. There was a breaking change in common 0.28.0 and the fix apparently never found its way here.
tswast
left a comment
There was a problem hiding this comment.
Change to check for errorResult instead of any errors LGTM.
|
@bcoe somehow I missed your comment, but the response can contain 2 different error fields. |
|
@tswast so this error started popping up today
Is there something going on with the backend, or should we be preparing a fix for this?? |
|
This looks like a problem in the back end handling of query parameters, unrelated to this PR. Thanks for the heads up. Investigating. |
Fixes #329
Would like some confirmation from a BQ team member on this one.