From 1bec7650e5308cf245d235277d903beaa7061791 Mon Sep 17 00:00:00 2001 From: Bianca Lisle Date: Wed, 8 Oct 2025 20:38:44 +0100 Subject: [PATCH] fix: accept updating state while creating a cluster --- internal/watchers/cluster.go | 5 +++-- internal/watchers/watcher.go | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/watchers/cluster.go b/internal/watchers/cluster.go index f64c2bfc41..357d5e2f4e 100644 --- a/internal/watchers/cluster.go +++ b/internal/watchers/cluster.go @@ -34,8 +34,9 @@ var ClusterDeleted = &StateTransition{ } var ClusterCreated = &StateTransition{ - StartState: pointer.Get(clusterCreating), - EndState: pointer.Get(clusterIdle), + StartState: pointer.Get(clusterCreating), + EndState: pointer.Get(clusterIdle), + RetryableStates: []string{clusterUpdating}, } type AtlasClusterStateDescriber struct { diff --git a/internal/watchers/watcher.go b/internal/watchers/watcher.go index 668287681e..4451aaecd7 100644 --- a/internal/watchers/watcher.go +++ b/internal/watchers/watcher.go @@ -49,9 +49,9 @@ func (err *InvalidStateError) Error() string { } if err.State != nil { - expected = fmt.Sprintf(expectedTemplate, *err.State) + expected = fmt.Sprintf(expectedTemplate, *err.ExpectedState) } else { - expected = fmt.Sprintf(expectedErrorCode, *err.ErrorCode) + expected = fmt.Sprintf(expectedErrorCode, *err.ExpectedErrorCode) } return fmt.Sprintf("%s %s", got, expected)