Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop trying to connect to a cluster when it doesn't appear to be avai… #3848

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions src/openshift/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,10 @@
);
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;

Check warning on line 536 in src/openshift/cluster.ts

View check run for this annotation

Codecov / codecov/patch

src/openshift/cluster.ts#L536

Added line #L536 was not covered by tests
} else if (Cluster.isSandboxCluster(clusterURL)) {
const devSandboxSignup = 'Sign up for OpenShift Dev Sandbox';
const promptResponse = await window.showWarningMessage(
Expand All @@ -543,15 +543,17 @@
);
if (promptResponse === devSandboxSignup){
await commands.executeCommand('openshift.explorer.addCluster', 'sandbox');
// no point in continuing with the wizard,
// the user needs to sign up for the service
return null;
}
} else {
void window.showWarningMessage(
'Unable to contact the cluster. Is it running and accessible?',
);
// Anyway, no point in continuing with the wizard
return null;

Check warning on line 549 in src/openshift/cluster.ts

View check run for this annotation

Codecov / codecov/patch

src/openshift/cluster.ts#L549

Added line #L549 was not covered by tests
}

// Stop trying because the cluster doesn't appear to be available
void window.showWarningMessage(

Check warning on line 553 in src/openshift/cluster.ts

View check run for this annotation

Codecov / codecov/patch

src/openshift/cluster.ts#L553

Added line #L553 was not covered by tests
'Unable to contact the cluster. Is it running and accessible?',
);
return null;

Check warning on line 556 in src/openshift/cluster.ts

View check run for this annotation

Codecov / codecov/patch

src/openshift/cluster.ts#L556

Added line #L556 was not covered by tests
}
} while (!clusterIsUp);

Expand Down
Loading