Skip to content

Commit a8e98f1

Browse files
dependabot[bot]lidavidmzeroshade
authored
chore(go/adbc): bump google.golang.org/api from 0.227.0 to 0.228.0 in /go/adbc (#2659)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.227.0 to 0.228.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/googleapis/google-api-go-client/releases">google.golang.org/api's releases</a>.</em></p> <blockquote> <h2>v0.228.0</h2> <h2><a href="https://github.com/googleapis/google-api-go-client/compare/v0.227.0...v0.228.0">0.228.0</a> (2025-03-25)</h2> <h3>Features</h3> <ul> <li><strong>all:</strong> Auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3072">#3072</a>) (<a href="https://github.com/googleapis/google-api-go-client/commit/1987dc98a165f1903aa196b1e1168fbfab57d589">1987dc9</a>)</li> <li><strong>all:</strong> Auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3076">#3076</a>) (<a href="https://github.com/googleapis/google-api-go-client/commit/b04196929868221b7008cd2044eced383709967c">b041969</a>)</li> <li><strong>all:</strong> Auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3077">#3077</a>) (<a href="https://github.com/googleapis/google-api-go-client/commit/e5c4d37cb6d560bd38cb8328723ae0555ba7e468">e5c4d37</a>)</li> <li><strong>all:</strong> Auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3078">#3078</a>) (<a href="https://github.com/googleapis/google-api-go-client/commit/2eb98950640fec46384087222d97e15403d9d9a3">2eb9895</a>)</li> <li><strong>all:</strong> Auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3080">#3080</a>) (<a href="https://github.com/googleapis/google-api-go-client/commit/d67a10510ebdbb87f0fd7744178e3008bcdf1d9b">d67a105</a>)</li> <li><strong>all:</strong> Auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3081">#3081</a>) (<a href="https://github.com/googleapis/google-api-go-client/commit/d7215475a626266ad21f6d6537041b38212a54cc">d721547</a>)</li> </ul> <h3>Bug Fixes</h3> <ul> <li><strong>googleapi:</strong> Add JSON array support to CheckResponseWithBody (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3075">#3075</a>) (<a href="https://github.com/googleapis/google-api-go-client/commit/ffcba91d985f21009b0a3186f006e7e6407c2478">ffcba91</a>)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md">google.golang.org/api's changelog</a>.</em></p> <blockquote> <h2><a href="https://github.com/googleapis/google-api-go-client/compare/v0.227.0...v0.228.0">0.228.0</a> (2025-03-25)</h2> <h3>Features</h3> <ul> <li><strong>all:</strong> Auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3072">#3072</a>) (<a href="https://github.com/googleapis/google-api-go-client/commit/1987dc98a165f1903aa196b1e1168fbfab57d589">1987dc9</a>)</li> <li><strong>all:</strong> Auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3076">#3076</a>) (<a href="https://github.com/googleapis/google-api-go-client/commit/b04196929868221b7008cd2044eced383709967c">b041969</a>)</li> <li><strong>all:</strong> Auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3077">#3077</a>) (<a href="https://github.com/googleapis/google-api-go-client/commit/e5c4d37cb6d560bd38cb8328723ae0555ba7e468">e5c4d37</a>)</li> <li><strong>all:</strong> Auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3078">#3078</a>) (<a href="https://github.com/googleapis/google-api-go-client/commit/2eb98950640fec46384087222d97e15403d9d9a3">2eb9895</a>)</li> <li><strong>all:</strong> Auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3080">#3080</a>) (<a href="https://github.com/googleapis/google-api-go-client/commit/d67a10510ebdbb87f0fd7744178e3008bcdf1d9b">d67a105</a>)</li> <li><strong>all:</strong> Auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3081">#3081</a>) (<a href="https://github.com/googleapis/google-api-go-client/commit/d7215475a626266ad21f6d6537041b38212a54cc">d721547</a>)</li> </ul> <h3>Bug Fixes</h3> <ul> <li><strong>googleapi:</strong> Add JSON array support to CheckResponseWithBody (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3075">#3075</a>) (<a href="https://github.com/googleapis/google-api-go-client/commit/ffcba91d985f21009b0a3186f006e7e6407c2478">ffcba91</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/googleapis/google-api-go-client/commit/bac81c61de0c586306eb621dcabca1687fb99753"><code>bac81c6</code></a> chore(main): release 0.228.0 (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3074">#3074</a>)</li> <li><a href="https://github.com/googleapis/google-api-go-client/commit/d7215475a626266ad21f6d6537041b38212a54cc"><code>d721547</code></a> feat(all): auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3081">#3081</a>)</li> <li><a href="https://github.com/googleapis/google-api-go-client/commit/a420b427cfb8dcc8dc6923fa207388a06b4d3fd6"><code>a420b42</code></a> chore(all): update all (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3079">#3079</a>)</li> <li><a href="https://github.com/googleapis/google-api-go-client/commit/d67a10510ebdbb87f0fd7744178e3008bcdf1d9b"><code>d67a105</code></a> feat(all): auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3080">#3080</a>)</li> <li><a href="https://github.com/googleapis/google-api-go-client/commit/2eb98950640fec46384087222d97e15403d9d9a3"><code>2eb9895</code></a> feat(all): auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3078">#3078</a>)</li> <li><a href="https://github.com/googleapis/google-api-go-client/commit/e5c4d37cb6d560bd38cb8328723ae0555ba7e468"><code>e5c4d37</code></a> feat(all): auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3077">#3077</a>)</li> <li><a href="https://github.com/googleapis/google-api-go-client/commit/ffcba91d985f21009b0a3186f006e7e6407c2478"><code>ffcba91</code></a> fix(googleapi): add JSON array support to CheckResponseWithBody (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3075">#3075</a>)</li> <li><a href="https://github.com/googleapis/google-api-go-client/commit/b04196929868221b7008cd2044eced383709967c"><code>b041969</code></a> feat(all): auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3076">#3076</a>)</li> <li><a href="https://github.com/googleapis/google-api-go-client/commit/1987dc98a165f1903aa196b1e1168fbfab57d589"><code>1987dc9</code></a> feat(all): auto-regenerate discovery clients (<a href="https://redirect.github.com/googleapis/google-api-go-client/issues/3072">#3072</a>)</li> <li>See full diff in <a href="https://github.com/googleapis/google-api-go-client/compare/v0.227.0...v0.228.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/api&package-manager=go_modules&previous-version=0.227.0&new-version=0.228.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: David Li <li.davidm96@gmail.com> Co-authored-by: Matt Topol <zotthewizard@gmail.com> Co-authored-by: Matt Topol <zeroshade@apache.org>
1 parent 01fe15a commit a8e98f1

28 files changed

+352
-210
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ MANYLINUX=2014
3333
MAVEN=3.6.3
3434
PLATFORM=linux/amd64
3535
PYTHON=3.9
36-
GO=1.23.6
36+
GO=1.24.1
3737
ARROW_MAJOR_VERSION=18
3838
DOTNET=8.0
3939

.github/workflows/dev.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,12 @@ jobs:
4343
fetch-depth: 0
4444
persist-credentials: false
4545

46+
- name: Get required Go version
47+
run: |
48+
(. .env && echo "GO_VERSION=${GO}") >> $GITHUB_ENV
4649
- uses: actions/setup-go@v5
4750
with:
48-
go-version-file: 'go/adbc/go.mod'
51+
go-version: "${{ env.GO_VERSION }}"
4952
check-latest: true
5053
- uses: actions/setup-python@v5
5154
with:

.github/workflows/native-unix.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,14 @@ jobs:
396396
continue-on-error: true # if auth fails, bigquery driver tests should skip
397397
with:
398398
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
399+
# XXX: https://github.com/actions/setup-go/issues/457
400+
# We can't use go-version-file for setup-go because it doesn't understand
401+
# the 'toolchain' parameter and staticcheck tends to need the latest Go
402+
- id: toolchain
403+
run: echo "GO_VERSION=$(sed -n 's/^toolchain go//p' go/adbc/go.mod)" >> "$GITHUB_OUTPUT"
399404
- uses: actions/setup-go@v5
400405
with:
401-
go-version-file: "go/adbc/go.mod"
406+
go-version: ${{ steps.toolchain.outputs.GO_VERSION }}
402407
check-latest: true
403408
cache: true
404409
cache-dependency-path: go/adbc/go.sum

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ repos:
6060
- "--linelength=90"
6161
- "--verbose=2"
6262
- repo: https://github.com/golangci/golangci-lint
63-
rev: 0a603e49e5e9870f5f9f2035bcbe42cd9620a9d5 # v1.64.5
63+
rev: 2b224c2cf4c9f261c22a16af7f8ca6408467f338 # v2.0.2
6464
hooks:
6565
- id: golangci-lint
6666
entry: bash -c 'cd go/adbc && golangci-lint run --fix --timeout 5m'

go/adbc/driver/bigquery/connection.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,11 +504,12 @@ func (c *connectionImpl) newClient(ctx context.Context) error {
504504
switch c.authType {
505505
case OptionValueAuthTypeJSONCredentialFile, OptionValueAuthTypeJSONCredentialString, OptionValueAuthTypeUserAuthentication:
506506
var credentials option.ClientOption
507-
if c.authType == OptionValueAuthTypeJSONCredentialFile {
507+
switch c.authType {
508+
case OptionValueAuthTypeJSONCredentialFile:
508509
credentials = option.WithCredentialsFile(c.credentials)
509-
} else if c.authType == OptionValueAuthTypeJSONCredentialString {
510+
case OptionValueAuthTypeJSONCredentialString:
510511
credentials = option.WithCredentialsJSON([]byte(c.credentials))
511-
} else {
512+
default:
512513
if c.clientID == "" {
513514
return adbc.Error{
514515
Code: adbc.StatusInvalidArgument,

go/adbc/driver/bigquery/driver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ var (
8585
func init() {
8686
if info, ok := debug.ReadBuildInfo(); ok {
8787
for _, dep := range info.Deps {
88-
switch {
89-
case dep.Path == "cloud.google.com/go/bigquery":
88+
switch dep.Path {
89+
case "cloud.google.com/go/bigquery":
9090
infoVendorVersion = dep.Version
9191
}
9292
}

go/adbc/driver/bigquery/driver_test.go

Lines changed: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type BigQueryQuirks struct {
5252
schemaName string
5353
}
5454

55-
func (q *BigQueryQuirks) CreateSampleTable(tableName string, r arrow.Record) error {
55+
func (q *BigQueryQuirks) CreateSampleTable(tableName string, r arrow.Record) (err error) {
5656
var buf bytes.Buffer
5757

5858
w, err := pqarrow.NewFileWriter(
@@ -64,7 +64,9 @@ func (q *BigQueryQuirks) CreateSampleTable(tableName string, r arrow.Record) err
6464
if err != nil {
6565
return err
6666
}
67-
defer w.Close()
67+
defer func() {
68+
err = errors.Join(err, w.Close())
69+
}()
6870

6971
if err = w.Write(r); err != nil {
7072
return err
@@ -170,19 +172,34 @@ func (q *BigQueryQuirks) CreateSampleTableWithRecords(tableName string, r arrow.
170172
if err != nil {
171173
panic(err)
172174
}
173-
defer db.Close()
175+
defer func() {
176+
err := db.Close()
177+
if err != nil {
178+
panic(err)
179+
}
180+
}()
174181

175182
cnxn, err := db.Open(ctx)
176183
if err != nil {
177184
panic(err)
178185
}
179-
defer cnxn.Close()
186+
defer func() {
187+
err := cnxn.Close()
188+
if err != nil {
189+
panic(err)
190+
}
191+
}()
180192

181193
stmt, err := cnxn.NewStatement()
182194
if err != nil {
183195
panic(err)
184196
}
185-
defer stmt.Close()
197+
defer func() {
198+
err := stmt.Close()
199+
if err != nil {
200+
panic(err)
201+
}
202+
}()
186203

187204
err = stmt.SetOption(driver.OptionBoolQueryUseLegacySQL, "false")
188205
if err != nil {
@@ -248,19 +265,34 @@ func (q *BigQueryQuirks) CreateSampleTableWithStreams(tableName string, rdr arra
248265
if err != nil {
249266
panic(err)
250267
}
251-
defer db.Close()
268+
defer func() {
269+
err := db.Close()
270+
if err != nil {
271+
panic(err)
272+
}
273+
}()
252274

253275
cnxn, err := db.Open(ctx)
254276
if err != nil {
255277
panic(err)
256278
}
257-
defer cnxn.Close()
279+
defer func() {
280+
err := cnxn.Close()
281+
if err != nil {
282+
panic(err)
283+
}
284+
}()
258285

259286
stmt, err := cnxn.NewStatement()
260287
if err != nil {
261288
panic(err)
262289
}
263-
defer stmt.Close()
290+
defer func() {
291+
err := stmt.Close()
292+
if err != nil {
293+
panic(err)
294+
}
295+
}()
264296

265297
err = stmt.SetOption(driver.OptionBoolQueryUseLegacySQL, "false")
266298
if err != nil {
@@ -307,7 +339,11 @@ func (q *BigQueryQuirks) DropTable(cnxn adbc.Connection, tblname string) error {
307339
if err != nil {
308340
return err
309341
}
310-
defer stmt.Close()
342+
defer func() {
343+
if err = stmt.Close(); err != nil {
344+
panic(err)
345+
}
346+
}()
311347

312348
if err = stmt.SetSqlQuery(`DROP TABLE IF EXISTS ` + q.quoteTblName(tblname)); err != nil {
313349
return err
@@ -638,7 +674,7 @@ func (suite *BigQueryTests) TestNewDatabaseGetSetOptions() {
638674
})
639675
suite.NoError(err)
640676
suite.NotNil(db)
641-
defer suite.NoError(db.Close())
677+
defer validation.CheckedClose(suite.T(), db)
642678

643679
getSetDB, ok := db.(adbc.GetSetOptions)
644680
suite.True(ok)

go/adbc/driver/bigquery/record_reader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func queryRecordWithSchemaCallback(ctx context.Context, group *errgroup.Group, q
158158
return -1, err
159159
}
160160
if parameters != nil {
161-
query.QueryConfig.Parameters = parameters
161+
query.Parameters = parameters
162162
}
163163

164164
arrowIterator, rows, err := runQuery(ctx, query, false)

go/adbc/driver/flightsql/example_usage_test.go

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ package flightsql_test
2424
import (
2525
"context"
2626
"database/sql"
27+
"errors"
2728
"fmt"
2829
"log"
2930

@@ -39,7 +40,7 @@ import (
3940

4041
var headers = map[string]string{"foo": "bar"}
4142

42-
func FlightSQLExample(uri string) error {
43+
func FlightSQLExample(uri string) (err error) {
4344
ctx := context.Background()
4445
options := map[string]string{
4546
adbc.OptionKeyURI: uri,
@@ -55,19 +56,25 @@ func FlightSQLExample(uri string) error {
5556
if err != nil {
5657
return fmt.Errorf("failed to open database: %s\n", err.Error())
5758
}
58-
defer db.Close()
59+
defer func() {
60+
err = errors.Join(err, db.Close())
61+
}()
5962

6063
cnxn, err := db.Open(ctx)
6164
if err != nil {
6265
return fmt.Errorf("failed to open connection: %s", err.Error())
6366
}
64-
defer cnxn.Close()
67+
defer func() {
68+
err = errors.Join(err, cnxn.Close())
69+
}()
6570

6671
stmt, err := cnxn.NewStatement()
6772
if err != nil {
6873
return fmt.Errorf("failed to create statement: %s", err.Error())
6974
}
70-
defer stmt.Close()
75+
defer func() {
76+
err = errors.Join(err, stmt.Close())
77+
}()
7178

7279
if err = stmt.SetSqlQuery("SELECT 1 AS theresult"); err != nil {
7380
return fmt.Errorf("failed to set query: %s", err.Error())
@@ -105,7 +112,12 @@ func Example() {
105112
if err != nil {
106113
log.Fatal(err)
107114
}
108-
defer db.Close()
115+
defer func() {
116+
err := db.Close()
117+
if err != nil {
118+
log.Fatal(err)
119+
}
120+
}()
109121

110122
srv, err := sqlite.NewSQLiteFlightSQLServer(db)
111123
if err != nil {

0 commit comments

Comments
 (0)