Skip to content

Commit bb96cea

Browse files
authored
Update dependencies of go-libs package and related (#299)
1 parent 16b2240 commit bb96cea

File tree

11 files changed

+305
-185
lines changed

11 files changed

+305
-185
lines changed

go-libs/go.mod

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,31 @@ module github.com/databrickslabs/sandbox/go-libs
33
go 1.21.0
44

55
require (
6-
github.com/briandowns/spinner v1.23.0
7-
github.com/databricks/databricks-sdk-go v0.40.0
8-
github.com/fatih/color v1.16.0
6+
github.com/briandowns/spinner v1.23.2
7+
github.com/databricks/databricks-sdk-go v0.55.0
8+
github.com/fatih/color v1.18.0
99
github.com/google/go-querystring v1.1.0
1010
github.com/nwidger/jsoncolor v0.3.2
1111
github.com/sourcegraph/go-diff v0.7.0
1212
github.com/spf13/cobra v1.8.0
1313
github.com/spf13/pflag v1.0.5
14-
github.com/spf13/viper v1.18.2
14+
github.com/spf13/viper v1.19.0
1515
github.com/stretchr/testify v1.9.0
16-
golang.org/x/crypto v0.22.0
17-
golang.org/x/oauth2 v0.19.0
16+
golang.org/x/crypto v0.32.0
17+
golang.org/x/oauth2 v0.25.0
1818
)
1919

2020
require (
21-
cloud.google.com/go/compute v1.24.0 // indirect
22-
cloud.google.com/go/compute/metadata v0.2.3 // indirect
21+
cloud.google.com/go/auth v0.4.2 // indirect
22+
cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
23+
cloud.google.com/go/compute/metadata v0.3.0 // indirect
2324
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
2425
github.com/felixge/httpsnoop v1.0.4 // indirect
2526
github.com/fsnotify/fsnotify v1.7.0 // indirect
2627
github.com/go-logr/logr v1.4.1 // indirect
2728
github.com/go-logr/stdr v1.2.2 // indirect
2829
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
29-
github.com/golang/protobuf v1.5.3 // indirect
30+
github.com/golang/protobuf v1.5.4 // indirect
3031
github.com/google/s2a-go v0.1.7 // indirect
3132
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
3233
github.com/hashicorp/hcl v1.0.0 // indirect
@@ -35,7 +36,7 @@ require (
3536
github.com/mattn/go-colorable v0.1.13 // indirect
3637
github.com/mattn/go-isatty v0.0.20 // indirect
3738
github.com/mitchellh/mapstructure v1.5.0 // indirect
38-
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
39+
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
3940
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
4041
github.com/sagikazarmark/locafero v0.4.0 // indirect
4142
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
@@ -50,16 +51,16 @@ require (
5051
go.opentelemetry.io/otel/trace v1.24.0 // indirect
5152
go.uber.org/multierr v1.11.0 // indirect
5253
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
53-
golang.org/x/mod v0.16.0 // indirect
54-
golang.org/x/net v0.24.0 // indirect
55-
golang.org/x/sys v0.19.0 // indirect
56-
golang.org/x/term v0.19.0 // indirect
57-
golang.org/x/text v0.14.0 // indirect
54+
golang.org/x/mod v0.17.0 // indirect
55+
golang.org/x/net v0.33.0 // indirect
56+
golang.org/x/sys v0.29.0 // indirect
57+
golang.org/x/term v0.28.0 // indirect
58+
golang.org/x/text v0.21.0 // indirect
5859
golang.org/x/time v0.5.0 // indirect
59-
google.golang.org/api v0.169.0 // indirect
60-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78 // indirect
61-
google.golang.org/grpc v1.62.0 // indirect
62-
google.golang.org/protobuf v1.33.0 // indirect
60+
google.golang.org/api v0.182.0 // indirect
61+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e // indirect
62+
google.golang.org/grpc v1.64.1 // indirect
63+
google.golang.org/protobuf v1.34.1 // indirect
6364
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
6465
gopkg.in/ini.v1 v1.67.0 // indirect
6566
gopkg.in/yaml.v3 v3.0.1 // indirect

go-libs/go.sum

Lines changed: 45 additions & 46 deletions
Large diffs are not rendered by default.

go-libs/sqlexec/sqlexec.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package sqlexec
22

33
import (
44
"context"
5+
"errors"
56
"fmt"
67
"math/rand"
78
"strings"
@@ -79,7 +80,7 @@ func (s *StatementExecutionExt) raiseIfNeeded(status *sql.StatementStatus) error
7980
if ok {
8081
return found
8182
}
82-
return fmt.Errorf(errorMessage)
83+
return errors.New(errorMessage)
8384
}
8485

8586
type ExecuteStatement struct {
@@ -123,7 +124,7 @@ func (s *StatementExecutionExt) determineDefaultWarehouse(ctx context.Context) (
123124
}
124125

125126
// executeAndWait executes a SQL statement and returns the execution response
126-
func (s *StatementExecutionExt) executeAndWait(ctx context.Context, req ExecuteStatement) (*sql.ExecuteStatementResponse, error) {
127+
func (s *StatementExecutionExt) executeAndWait(ctx context.Context, req ExecuteStatement) (*sql.StatementResponse, error) {
127128
if req.WarehouseID == "" {
128129
req.WarehouseID = s.warehouseID
129130
}
@@ -182,7 +183,7 @@ func (s *StatementExecutionExt) executeAndWait(ctx context.Context, req ExecuteS
182183
state = sql.StatementStateFailed
183184
}
184185
if state == sql.StatementStateSucceeded {
185-
return &sql.ExecuteStatementResponse{
186+
return &sql.StatementResponse{
186187
Manifest: res.Manifest,
187188
Result: res.Result,
188189
StatementId: statementID,

go-libs/sqlexec/sqlexec_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func TestAccQueryTypes(t *testing.T) {
8282
require.NoError(t, result.Err())
8383

8484
require.Equal(t, []int{1, 2}, arrayType)
85-
require.Equal(t, []byte("a..."), binaryType)
85+
require.Equal(t, []byte("a"), binaryType)
8686
require.Equal(t, true, booleanType)
8787
require.Equal(t, time.Now().UTC().Truncate(24*time.Hour), dateType)
8888
require.InDelta(t, 3, decimalType, 0.01)

0 commit comments

Comments
 (0)