Skip to content

Commit 5791175

Browse files
committed
Stop trying to connect to a cluster when it doesn't appear to be available
Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
1 parent b361edc commit 5791175

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/openshift/cluster.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,10 +530,10 @@ export class Cluster extends OpenShiftItem {
530530
);
531531
if (promptResponse === startCrc){
532532
await commands.executeCommand('openshift.explorer.addCluster', 'crc');
533-
// no point in continuing with the wizard,
534533
// it will take the cluster a few minutes to stabilize
535-
return null;
536534
}
535+
// Anyway, no point in continuing with the wizard
536+
return null;
537537
} else if (Cluster.isSandboxCluster(clusterURL)) {
538538
const devSandboxSignup = 'Sign up for OpenShift Dev Sandbox';
539539
const promptResponse = await window.showWarningMessage(
@@ -543,14 +543,16 @@ export class Cluster extends OpenShiftItem {
543543
);
544544
if (promptResponse === devSandboxSignup){
545545
await commands.executeCommand('openshift.explorer.addCluster', 'sandbox');
546-
// no point in continuing with the wizard,
547546
// the user needs to sign up for the service
548-
return null;
549547
}
548+
// Anyway, no point in continuing with the wizard
549+
return null;
550550
} else {
551+
// Stop trying because the cluster doesn't appear to be available
551552
void window.showWarningMessage(
552553
'Unable to contact the cluster. Is it running and accessible?',
553554
);
555+
return null;
554556
}
555557
}
556558
} while (!clusterIsUp);

0 commit comments

Comments
 (0)