Skip to content

Commit

Permalink
update client
Browse files Browse the repository at this point in the history
  • Loading branch information
pmenglund committed Oct 7, 2023
1 parent 56c80e6 commit 5401b21
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 47 deletions.
2 changes: 1 addition & 1 deletion cmd/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func waitForCollection(ctx context.Context, cmd *cobra.Command, rs *rockset.Rock

if wait {
_, _ = fmt.Fprintf(cmd.OutOrStdout(), "waiting for collection '%s.%s' to be READY\n", ws, name)
if err := rs.WaitUntilCollectionReady(ctx, ws, name); err != nil {
if err := rs.Wait.UntilCollectionReady(ctx, ws, name); err != nil {
return fmt.Errorf("failed to wait for %s.%s to be ready: %v", ws, name, err)
}
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/virtual_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ func waitUntilVIActive(rs *rockset.RockClient, cmd *cobra.Command, vID string) e
}
if wait {
// TODO notify the user that we're waiting
if err := rs.WaitUntilVirtualInstanceActive(cmd.Context(), vID); err != nil {
if err := rs.Wait.UntilVirtualInstanceActive(cmd.Context(), vID); err != nil {
return fmt.Errorf("failed to wait for %s to be active: %v", vID, err)
}
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,19 @@ func newDeleteWorkspaceCmd() *cobra.Command {
// wait until all resources are gone...

for _, collection := range collections {
if err = rs.WaitUntilCollectionGone(ctx, ws, collection.GetName()); err != nil {
if err = rs.Wait.UntilCollectionGone(ctx, ws, collection.GetName()); err != nil {
return err
}
}

for _, view := range views {
if err = rs.WaitUntilViewGone(ctx, ws, view.GetName()); err != nil {
if err = rs.Wait.UntilViewGone(ctx, ws, view.GetName()); err != nil {
return err
}
}

for _, alias := range aliases {
if err = rs.WaitUntilAliasGone(ctx, ws, alias.GetName()); err != nil {
if err = rs.Wait.UntilAliasGone(ctx, ws, alias.GetName()); err != nil {
return err
}
}
Expand Down
19 changes: 9 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@ module github.com/rockset/cli

go 1.21

replace (
github.com/rockset/device-authorization => ../device-authorization
)

require (
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
github.com/fatih/color v1.13.0
github.com/getsentry/sentry-go v0.24.1
github.com/mitchellh/go-homedir v1.1.0
github.com/olekukonko/tablewriter v0.0.5
github.com/rockset/device-authorization v0.0.4
github.com/rockset/rockset-go-client v0.21.2
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
github.com/rockset/device-authorization v0.0.5
github.com/rockset/rockset-go-client v0.22.0
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.16.0
github.com/stretchr/testify v1.8.4
Expand All @@ -23,7 +20,6 @@ require (

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/protobuf v1.5.3 // indirect
Expand All @@ -33,19 +29,22 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rs/zerolog v1.30.0 // indirect
github.com/rs/zerolog v1.31.0 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
golang.org/x/net v0.11.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/oauth2 v0.9.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
Loading

0 comments on commit 5401b21

Please sign in to comment.