Skip to content

Commit

Permalink
Allows to delete Eclipse Che even if server isn't available (#822)
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
  • Loading branch information
tolusha committed Aug 26, 2020
1 parent 7fc5989 commit 4566675
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/commands/server/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export default class Delete extends Command {
)

tasks.add(apiTasks.testApiTasks(flags, this))
tasks.add(cheTasks.checkIfCheIsInstalledTasks(flags, this))
tasks.add(operatorTasks.deleteTasks(flags))
tasks.add(olmTasks.deleteTasks(flags))
tasks.add(cheTasks.deleteTasks(flags))
Expand Down
10 changes: 0 additions & 10 deletions src/commands/server/stop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ export default class Stop extends Command {
task: async () => {
await this.error(`E_BAD_DEPLOY - Deployment do not exist.\nA Deployment named "${flags['deployment-name']}" exist in namespace \"${flags.chenamespace}\", Eclipse Che server cannot be stopped.\nFix with: verify the namespace where Eclipse Che is running (oc get projects)\nhttps://github.com/eclipse/che`, { code: 'E_BAD_DEPLOY' })
}
},
{
title: 'Eclipse Che server was already stopped',
enabled: (ctx: any) => (ctx.isStopped),
task: async () => { }
},
{
title: 'Eclipse Che server pod is not ready. It may be failing to start. Skipping shutdown request',
enabled: (ctx: any) => (ctx.isNotReadyYet),
task: async () => { }
}
],
{ renderer: flags['listr-renderer'] as any }
Expand Down
5 changes: 0 additions & 5 deletions src/tasks/che.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,39 +429,34 @@ export class CheTasks {
return [
{
title: 'Wait until Eclipse Che pod is deleted',
enabled: (ctx: any) => !ctx.isCheStopped,
task: async (_ctx: any, task: any) => {
await this.kube.waitUntilPodIsDeleted(this.cheSelector, this.cheNamespace)
task.title = `${task.title}...done.`
}
},
{
title: 'Wait until Keycloak pod is deleted',
enabled: (ctx: any) => ctx.isKeycloakDeployed && !ctx.isKeycloakStopped,
task: async (_ctx: any, task: any) => {
await this.kube.waitUntilPodIsDeleted(this.keycloakSelector, this.cheNamespace)
task.title = `${task.title}...done.`
}
},
{
title: 'Wait until Postgres pod is deleted',
enabled: (ctx: any) => ctx.isPostgresDeployed && !ctx.isPostgresStopped,
task: async (_ctx: any, task: any) => {
await this.kube.waitUntilPodIsDeleted(this.postgresSelector, this.cheNamespace)
task.title = `${task.title}...done.`
}
},
{
title: 'Wait until Devfile registry pod is deleted',
enabled: (ctx: any) => ctx.isDevfileRegistryDeployed && !ctx.isDevfileRegistryStopped,
task: async (_ctx: any, task: any) => {
await this.kube.waitUntilPodIsDeleted(this.devfileRegistrySelector, this.cheNamespace)
task.title = `${task.title}...done.`
}
},
{
title: 'Wait until Plugin registry pod is deleted',
enabled: (ctx: any) => ctx.isPluginRegistryDeployed && !ctx.isPluginRegistryStopped,
task: async (_ctx: any, task: any) => {
await this.kube.waitUntilPodIsDeleted(this.pluginRegistrySelector, this.cheNamespace)
task.title = `${task.title}...done.`
Expand Down

0 comments on commit 4566675

Please sign in to comment.