From d056d6abb9d7ddd35234cb2036e84cff8a75b809 Mon Sep 17 00:00:00 2001 From: Pudong Zheng Date: Mon, 21 Feb 2022 02:25:02 +0000 Subject: [PATCH] [ws-manager] fix incorrect status when image pull is open --- components/ws-manager/pkg/manager/status.go | 9 --------- .../manager/testdata/status_wsstartup_Creating00.golden | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/components/ws-manager/pkg/manager/status.go b/components/ws-manager/pkg/manager/status.go index 048f514b2e4998..0cc83b1b3fcddb 100644 --- a/components/ws-manager/pkg/manager/status.go +++ b/components/ws-manager/pkg/manager/status.go @@ -453,15 +453,6 @@ func (m *Manager) extractStatusFromPod(result *api.WorkspaceStatus, wso workspac result.Message = fmt.Sprintf("container %s was terminated unexpectedly - workspace is recovering", cs.Name) return nil } - - _, neverWereReady := pod.Annotations[workspaceNeverReadyAnnotation] - if neverWereReady && !cs.Ready { - // container isn't ready yet (never has been), thus we're still in the creating phase. - result.Phase = api.WorkspacePhase_CREATING - result.Message = "containers are starting" - result.Conditions.PullingImages = api.WorkspaceConditionBool_FALSE - return nil - } } tpe, err := wso.WorkspaceType() diff --git a/components/ws-manager/pkg/manager/testdata/status_wsstartup_Creating00.golden b/components/ws-manager/pkg/manager/testdata/status_wsstartup_Creating00.golden index c2f031f8d81735..763623e56e627c 100644 --- a/components/ws-manager/pkg/manager/testdata/status_wsstartup_Creating00.golden +++ b/components/ws-manager/pkg/manager/testdata/status_wsstartup_Creating00.golden @@ -14,11 +14,11 @@ "url": "http://10.0.0.114:8082", "ide_image": {} }, - "phase": 2, + "phase": 3, "conditions": { "failed": "container sync completed; containers of a workspace pod are not supposed to do that" }, - "message": "containers are starting", + "message": "workspace initializer is running", "runtime": { "node_name": "gke-gitpod-dev-worker-pool-2-184c607e-g6l3", "pod_name": "ws-foobar",