Skip to content

Commit

Permalink
CLOUDP-273727 More commands fail with unclear error message when loca…
Browse files Browse the repository at this point in the history
…l deployment is paused
  • Loading branch information
fmenezes committed Sep 25, 2024
1 parent 17890ac commit e4a66e7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/cli/deployments/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ type ConnectOpts struct {
}

func (opts *ConnectOpts) Connect(ctx context.Context) error {
if _, err := opts.SelectDeployments(ctx, opts.ConfigProjectID()); err != nil {
if _, err := opts.SelectDeployments(ctx, opts.ConfigProjectID(), options.IdleState); err != nil {
return err
}

Expand Down
2 changes: 1 addition & 1 deletion internal/cli/deployments/search/indexes/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (opts *CreateOpts) RunAtlas() error {
}

func (opts *CreateOpts) Run(ctx context.Context) error {
_, err := opts.SelectDeployments(ctx, opts.ConfigProjectID())
_, err := opts.SelectDeployments(ctx, opts.ConfigProjectID(), options.IdleState)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/deployments/search/indexes/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type DeleteOpts struct {
}

func (opts *DeleteOpts) Run(ctx context.Context) error {
if _, err := opts.SelectDeployments(ctx, opts.ConfigProjectID()); err != nil {
if _, err := opts.SelectDeployments(ctx, opts.ConfigProjectID(), options.IdleState); err != nil {
return err
}

Expand Down
2 changes: 1 addition & 1 deletion internal/cli/deployments/search/indexes/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type DescribeOpts struct {
}

func (opts *DescribeOpts) Run(ctx context.Context) error {
_, err := opts.SelectDeployments(ctx, opts.ConfigProjectID())
_, err := opts.SelectDeployments(ctx, opts.ConfigProjectID(), options.IdleState)
if err != nil {
return err
}
Expand Down

0 comments on commit e4a66e7

Please sign in to comment.