From 5f156a8af27c334d570da6cba34fee35cd0b12a1 Mon Sep 17 00:00:00 2001 From: Milan Pavlik Date: Thu, 31 Mar 2022 09:52:45 +0000 Subject: [PATCH] [dashboard] Remove prebuild status errors from prebuild logs --- .../dashboard/src/components/PrebuildLogs.tsx | 46 ------------------- 1 file changed, 46 deletions(-) diff --git a/components/dashboard/src/components/PrebuildLogs.tsx b/components/dashboard/src/components/PrebuildLogs.tsx index bb8d9878760aa4..3cddd1778838e2 100644 --- a/components/dashboard/src/components/PrebuildLogs.tsx +++ b/components/dashboard/src/components/PrebuildLogs.tsx @@ -85,59 +85,13 @@ export default function PrebuildLogs(props: PrebuildLogsProps) { props.onInstanceUpdate(workspaceInstance); } switch (workspaceInstance?.status.phase) { - // unknown indicates an issue within the system in that it cannot determine the actual phase of - // a workspace. This phase is usually accompanied by an error. - case "unknown": - break; - // Preparing means that we haven't actually started the workspace instance just yet, but rather // are still preparing for launch. This means we're building the Docker image for the workspace. case "preparing": - getGitpodService().server.watchWorkspaceImageBuildLogs(workspace!.id); - break; - - // Pending means the workspace does not yet consume resources in the cluster, but rather is looking for - // some space within the cluster. If for example the cluster needs to scale up to accomodate the - // workspace, the workspace will be in Pending state until that happened. - case "pending": - break; - - // Creating means the workspace is currently being created. That includes downloading the images required - // to run the workspace over the network. The time spent in this phase varies widely and depends on the current - // network speed, image size and cache states. - case "creating": - break; - - // Initializing is the phase in which the workspace is executing the appropriate workspace initializer (e.g. Git - // clone or backup download). After this phase one can expect the workspace to either be Running or Failed. - case "initializing": - break; - - // Running means the workspace is able to actively perform work, either by serving a user through Theia, - // or as a headless workspace. - case "running": - break; - - // Interrupted is an exceptional state where the container should be running but is temporarily unavailable. - // When in this state, we expect it to become running or stopping anytime soon. - case "interrupted": - break; - - // Stopping means that the workspace is currently shutting down. It could go to stopped every moment. - case "stopping": - break; - - // Stopped means the workspace ended regularly because it was shut down. case "stopped": getGitpodService().server.watchWorkspaceImageBuildLogs(workspace!.id); break; } - if (workspaceInstance?.status.conditions.headlessTaskFailed) { - setError(new Error(workspaceInstance.status.conditions.headlessTaskFailed)); - } - if (workspaceInstance?.status.conditions.failed) { - setError(new Error(workspaceInstance.status.conditions.failed)); - } }, [props.workspaceId, workspaceInstance?.status.phase]); return (