Skip to content

Commit

Permalink
backport fix for elemental-ui issue 202 (#11509)
Browse files Browse the repository at this point in the history
  • Loading branch information
aalves08 authored Jul 23, 2024
1 parent a5b0e97 commit a38998e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shell/config/uiplugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export function isChartVersionAvailableForInstall(versionsData, returnObj = fals

const parsedRancherVersion = rancherVersion.split('-')?.[0];
const regexHashString = new RegExp('^[A-Za-z0-9]{9}$');
const isRancherVersionHashString = regexHashString.test(rancherVersion);
const isRancherVersionHashStringOrHead = regexHashString.test(rancherVersion) || rancherVersion.includes('head');
const requiredUiVersion = version.annotations?.[UI_PLUGIN_CHART_ANNOTATIONS.UI_VERSION];
const requiredKubeVersion = version.annotations?.[UI_PLUGIN_CHART_ANNOTATIONS.KUBE_VERSION];
const versionObj = { ...version };
Expand All @@ -187,7 +187,7 @@ export function isChartVersionAvailableForInstall(versionsData, returnObj = fals
versionObj.isCompatibleWithKubeVersion = true;

// if it's a head version of Rancher, then we skip the validation and enable them all
if (!isRancherVersionHashString && requiredUiVersion && !semver.satisfies(parsedRancherVersion, requiredUiVersion)) {
if (!isRancherVersionHashStringOrHead && requiredUiVersion && !semver.satisfies(parsedRancherVersion, requiredUiVersion)) {
if (!returnObj) {
return false;
}
Expand Down

0 comments on commit a38998e

Please sign in to comment.