Skip to content

Commit 417161b

Browse files
authored
CLOUDP-350267: accept updating state while creating a cluster (#4253)
1 parent c0b920c commit 417161b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

internal/watchers/cluster.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ var ClusterDeleted = &StateTransition{
3434
}
3535

3636
var ClusterCreated = &StateTransition{
37-
StartState: pointer.Get(clusterCreating),
38-
EndState: pointer.Get(clusterIdle),
37+
StartState: pointer.Get(clusterCreating),
38+
EndState: pointer.Get(clusterIdle),
39+
RetryableStates: []string{clusterUpdating},
3940
}
4041

4142
type AtlasClusterStateDescriber struct {

internal/watchers/watcher.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ func (err *InvalidStateError) Error() string {
4949
}
5050

5151
if err.State != nil {
52-
expected = fmt.Sprintf(expectedTemplate, *err.State)
52+
expected = fmt.Sprintf(expectedTemplate, *err.ExpectedState)
5353
} else {
54-
expected = fmt.Sprintf(expectedErrorCode, *err.ErrorCode)
54+
expected = fmt.Sprintf(expectedErrorCode, *err.ExpectedErrorCode)
5555
}
5656

5757
return fmt.Sprintf("%s %s", got, expected)

0 commit comments

Comments
 (0)