Skip to content

Commit 5a7359c

Browse files
authored
CLOUDP-273727 More commands fail with unclear error message when local deployment is paused (#3285)
1 parent ba0ed40 commit 5a7359c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

internal/cli/deployments/connect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ type ConnectOpts struct {
107107
}
108108

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

internal/cli/deployments/search/indexes/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func (opts *CreateOpts) RunAtlas() error {
114114
}
115115

116116
func (opts *CreateOpts) Run(ctx context.Context) error {
117-
_, err := opts.SelectDeployments(ctx, opts.ConfigProjectID())
117+
_, err := opts.SelectDeployments(ctx, opts.ConfigProjectID(), options.IdleState)
118118
if err != nil {
119119
return err
120120
}

internal/cli/deployments/search/indexes/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type DeleteOpts struct {
4545
}
4646

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

internal/cli/deployments/search/indexes/describe.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ type DescribeOpts struct {
4444
}
4545

4646
func (opts *DescribeOpts) Run(ctx context.Context) error {
47-
_, err := opts.SelectDeployments(ctx, opts.ConfigProjectID())
47+
_, err := opts.SelectDeployments(ctx, opts.ConfigProjectID(), options.IdleState)
4848
if err != nil {
4949
return err
5050
}

0 commit comments

Comments
 (0)