Skip to content

Commit

Permalink
chore: adapt chectl to 22932
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
  • Loading branch information
tolusha committed May 27, 2024
1 parent 5459950 commit 5439d94
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
5 changes: 2 additions & 3 deletions src/tasks/pod-tasks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2019-2021 Red Hat, Inc.
* Copyright (c) 2019-2024 Red Hat, Inc.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
Expand All @@ -16,7 +16,6 @@ import {KubeClient} from '../api/kube-client'
import {KubeHelperContext} from '../context'
import {EclipseChe} from './installers/eclipse-che/eclipse-che'
import {newListr} from '../utils/utls'
import {Che} from '../utils/che'

export namespace PodTasks {
interface FailState {
Expand Down Expand Up @@ -83,7 +82,7 @@ export namespace PodTasks {
const tasks = newListr([])
tasks.add(getSchedulingTask(selector, namespace))
tasks.add(getDownloadingTask(selector, namespace))
if (name === EclipseChe.PLUGIN_REGISTRY && await Che.isEmbeddedOpenVSXRegistryConfigured(namespace)) {
if (name === EclipseChe.PLUGIN_REGISTRY) {
// if embedded plugin registry is configured, use longer timeout for pod readiness
tasks.add(getStartingTask(selector, namespace, ctx[KubeHelperContext.POD_READY_TIMEOUT_EMBEDDED_PLUGIN_REGISTRY]))
} else {
Expand Down
9 changes: 1 addition & 8 deletions src/utils/che.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2019-2022 Red Hat, Inc.
* Copyright (c) 2019-2024 Red Hat, Inc.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down Expand Up @@ -134,11 +134,4 @@ export namespace Che {

throw new Error(`Route ${EclipseChe.CHE_FLAVOR} not found`)
}

export async function isEmbeddedOpenVSXRegistryConfigured(namespace: string): Promise<boolean> {
const kubeClient = KubeClient.getInstance()
const cheCluster = await kubeClient.getCheCluster(namespace)

return !cheCluster?.spec?.components?.pluginRegistry?.openVSXURL
}
}
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3673,7 +3673,7 @@ detect-newline@^3.0.0:

"devworkspace-operator@https://github.com/devfile/devworkspace-operator#main":
version "0.0.0"
resolved "https://github.com/devfile/devworkspace-operator#067847d900c18a3fe0d47de920a9ce77af29e722"
resolved "https://github.com/devfile/devworkspace-operator#b49427cecf4ba036a7587be4e7319b4dfec42dcf"

dezalgo@^1.0.0:
version "1.0.4"
Expand Down Expand Up @@ -3734,7 +3734,7 @@ ecc-jsbn@~0.1.1:

"eclipse-che-operator@https://github.com/eclipse-che/che-operator#main":
version "0.0.0"
resolved "https://github.com/eclipse-che/che-operator#903ad387e047129ad0053a641a590fd12411f34e"
resolved "https://github.com/eclipse-che/che-operator#9954335646e7043632cdb992f6c155888f0cee2c"

editorconfig@^0.15.0:
version "0.15.3"
Expand Down

0 comments on commit 5439d94

Please sign in to comment.