Skip to content
This repository was archived by the owner on Aug 31, 2022. It is now read-only.

Commit 8d82f16

Browse files
committed
Reload BigQuery job after it is done in order to correctly capture errors.
In the case where a BigQuery job fails immediately (e.g. bucket does not exist in GCS) the job is never reloaded, and errors are lost. In this case the job is treated as DONE, whilst the returned JobInfo may still report that the job is RUNNING. By reloading the job after it is DONE, errors are captured and the true state of the job is returned from the library.
1 parent b24d7c5 commit 8d82f16

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

contrib/flo-bigquery/src/main/java/com/spotify/flo/contrib/bigquery/DefaultBigQueryClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public JobInfo job(JobInfo jobInfo, JobOption... options) {
7878
}
7979
job = job.reload();
8080
}
81+
job = job.reload();
8182

8283
final BigQueryError error = job.getStatus().getError();
8384
if (error != null) {

0 commit comments

Comments
 (0)