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

chore: Adapt chectl to 22932 #2872

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
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
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
Loading