Skip to content

Commit f185cbb

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 a7474f0 commit f185cbb

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/openshift/cluster.ts

Lines changed: 10 additions & 8 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,15 +543,17 @@ 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
}
550-
} else {
551-
void window.showWarningMessage(
552-
'Unable to contact the cluster. Is it running and accessible?',
553-
);
548+
// Anyway, no point in continuing with the wizard
549+
return null;
554550
}
551+
552+
// Stop trying because the cluster doesn't appear to be available
553+
void window.showWarningMessage(
554+
'Unable to contact the cluster. Is it running and accessible?',
555+
);
556+
return null;
555557
}
556558
} while (!clusterIsUp);
557559

0 commit comments

Comments
 (0)