From be59cc33db7709957c4d4ecf368fc772f34af4f6 Mon Sep 17 00:00:00 2001 From: Victor Rubezhny Date: Mon, 29 Jan 2024 13:52:17 +0100 Subject: [PATCH] Stop trying to connect to a cluster when it doesn't appear to be available Signed-off-by: Victor Rubezhny --- src/openshift/cluster.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openshift/cluster.ts b/src/openshift/cluster.ts index 8d63893bc..0f197ec37 100644 --- a/src/openshift/cluster.ts +++ b/src/openshift/cluster.ts @@ -530,10 +530,10 @@ export class Cluster extends OpenShiftItem { ); if (promptResponse === startCrc){ await commands.executeCommand('openshift.explorer.addCluster', 'crc'); - // no point in continuing with the wizard, // it will take the cluster a few minutes to stabilize - return null; } + // Anyway, no point in continuing with the wizard + return null; } else if (Cluster.isSandboxCluster(clusterURL)) { const devSandboxSignup = 'Sign up for OpenShift Dev Sandbox'; const promptResponse = await window.showWarningMessage( @@ -548,9 +548,11 @@ export class Cluster extends OpenShiftItem { return null; } } else { + // Stop trying because the cluster doesn't appear to be available void window.showWarningMessage( 'Unable to contact the cluster. Is it running and accessible?', ); + return null; } } } while (!clusterIsUp);