Skip to content

Commit 92ed04a

Browse files
authored
fix(go): avoid google SDK badness causing hangs (#55)
## What's Changed - Bump to Go 1.25.5 - Update driverbase - Return rows affected - Don't use broken Wait in Google SDK Closes #57.
1 parent d4048fa commit 92ed04a

20 files changed

Lines changed: 468 additions & 232 deletions

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ repos:
3333
)$
3434
3535
- repo: https://github.com/golangci/golangci-lint
36-
rev: dc16cf43c85d53f03e00a2f7b93a5e03a1435793 # frozen: v2.6.2
36+
rev: e6ebea0145f385056bce15041d3244c0e5e15848 # frozen: v2.7.0
3737
hooks:
3838
- id: golangci-lint
3939
entry: bash -c 'cd go && golangci-lint run --fix --timeout 5m'

go/bulk_ingest.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ func (bi *bigqueryBulkIngestImpl) Copy(ctx context.Context, chunk driverbase.Bul
115115
if err != nil {
116116
return errToAdbcErr(adbc.StatusIO, err, "run loader")
117117
}
118-
status, err := job.Wait(ctx)
118+
status, err := safeWaitForJob(ctx, job)
119119
if err != nil {
120-
return errToAdbcErr(adbc.StatusIO, err, "load data")
120+
return err
121121
}
122122
if err := status.Err(); err != nil {
123123
return errToAdbcErr(adbc.StatusIO, err, "load data")
@@ -149,9 +149,9 @@ func (bi *bigqueryBulkIngestImpl) CreateTable(ctx context.Context, schema *arrow
149149
if err != nil {
150150
return err
151151
}
152-
js, err := job.Wait(ctx)
152+
js, err := safeWaitForJob(ctx, job)
153153
if err != nil {
154-
return errToAdbcErr(adbc.StatusInternal, err, "create table")
154+
return err
155155
} else if err = js.Err(); err != nil {
156156
return errToAdbcErr(adbc.StatusInternal, err, "create table")
157157
} else if !js.Done() {

go/connection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ func (c *connectionImpl) exec(ctx context.Context, stmt string, config func(*big
323323
if err != nil {
324324
return nil, err
325325
}
326-
status, err := job.Wait(ctx)
326+
status, err := safeWaitForJob(ctx, job)
327327
if err != nil {
328328
return nil, err
329329
} else if err := status.Err(); err != nil {

go/go.mod

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414

1515
module github.com/adbc-drivers/bigquery/go
1616

17-
go 1.25.0
17+
go 1.25.5
1818

1919
require (
2020
cloud.google.com/go/auth v0.17.0
2121
cloud.google.com/go/bigquery v1.72.0
22-
github.com/adbc-drivers/driverbase-go/driverbase v0.0.0-20250915235221-ebe7d7223ee5
22+
github.com/adbc-drivers/driverbase-go/driverbase v0.0.0-20251204005500-ef1acb8b4023
2323
github.com/apache/arrow-adbc/go/adbc v1.9.0
24-
github.com/apache/arrow-go/v18 v18.4.1
24+
github.com/apache/arrow-go/v18 v18.4.2-0.20251124222331-4b04248429bc
2525
github.com/google/uuid v1.6.0
2626
github.com/googleapis/gax-go/v2 v2.15.0
2727
github.com/stretchr/testify v1.11.1
@@ -35,7 +35,7 @@ require (
3535
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
3636
cloud.google.com/go/compute/metadata v0.9.0 // indirect
3737
cloud.google.com/go/iam v1.5.2 // indirect
38-
github.com/adbc-drivers/driverbase-go/testutil v0.0.0-20250716025443-c34d979de31c // indirect
38+
github.com/adbc-drivers/driverbase-go/testutil v0.0.0-20251204005500-ef1acb8b4023 // indirect
3939
github.com/andybalholm/brotli v1.2.0 // indirect
4040
github.com/apache/arrow/go/v15 v15.0.2 // indirect
4141
github.com/apache/thrift v0.22.0 // indirect
@@ -47,12 +47,12 @@ require (
4747
github.com/go-logr/stdr v1.2.2 // indirect
4848
github.com/goccy/go-json v0.10.5 // indirect
4949
github.com/golang/snappy v1.0.0 // indirect
50-
github.com/google/flatbuffers v25.2.10+incompatible // indirect
50+
github.com/google/flatbuffers v25.9.23+incompatible // indirect
5151
github.com/google/s2a-go v0.1.9 // indirect
5252
github.com/googleapis/enterprise-certificate-proxy v0.3.7 // indirect
53-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect
53+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 // indirect
5454
github.com/klauspost/asmfmt v1.3.2 // indirect
55-
github.com/klauspost/compress v1.18.0 // indirect
55+
github.com/klauspost/compress v1.18.2 // indirect
5656
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
5757
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 // indirect
5858
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 // indirect
@@ -70,21 +70,21 @@ require (
7070
go.opentelemetry.io/otel/metric v1.38.0 // indirect
7171
go.opentelemetry.io/otel/sdk v1.38.0 // indirect
7272
go.opentelemetry.io/otel/trace v1.38.0 // indirect
73-
go.opentelemetry.io/proto/otlp v1.8.0 // indirect
74-
golang.org/x/crypto v0.43.0 // indirect
75-
golang.org/x/exp v0.0.0-20250911091902-df9299821621 // indirect
76-
golang.org/x/mod v0.29.0 // indirect
77-
golang.org/x/net v0.46.0 // indirect
78-
golang.org/x/sys v0.37.0 // indirect
79-
golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8 // indirect
80-
golang.org/x/text v0.30.0 // indirect
73+
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
74+
golang.org/x/crypto v0.44.0 // indirect
75+
golang.org/x/exp v0.0.0-20251125195548-87e1e737ad39 // indirect
76+
golang.org/x/mod v0.30.0 // indirect
77+
golang.org/x/net v0.47.0 // indirect
78+
golang.org/x/sys v0.38.0 // indirect
79+
golang.org/x/telemetry v0.0.0-20251203150158-8fff8a5912fc // indirect
80+
golang.org/x/text v0.31.0 // indirect
8181
golang.org/x/time v0.14.0 // indirect
82-
golang.org/x/tools v0.38.0 // indirect
82+
golang.org/x/tools v0.39.0 // indirect
8383
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
8484
google.golang.org/genproto v0.0.0-20250908214217-97024824d090 // indirect
85-
google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090 // indirect
86-
google.golang.org/genproto/googleapis/rpc v0.0.0-20251103181224-f26f9409b101 // indirect
87-
google.golang.org/grpc v1.76.0 // indirect
85+
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect
86+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect
87+
google.golang.org/grpc v1.77.0 // indirect
8888
google.golang.org/protobuf v1.36.10 // indirect
8989
gopkg.in/yaml.v3 v3.0.1 // indirect
9090
)

0 commit comments

Comments
 (0)