From 0a69edbd1b3c6797feb89faa3c819be52e79898d Mon Sep 17 00:00:00 2001 From: Nancy <42977925+mantis-toboggan-md@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:56:30 -0800 Subject: [PATCH] [2.9.5] Fix AKS nodegroup upgrade validation (#12867) * fix aks version-checking logic * add wait to flaky test --- cypress/e2e/tests/pages/explorer/apps/repositories.spec.ts | 1 + pkg/aks/components/CruAks.vue | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/tests/pages/explorer/apps/repositories.spec.ts b/cypress/e2e/tests/pages/explorer/apps/repositories.spec.ts index c82626ab2b0..431fe3d2ef5 100644 --- a/cypress/e2e/tests/pages/explorer/apps/repositories.spec.ts +++ b/cypress/e2e/tests/pages/explorer/apps/repositories.spec.ts @@ -179,6 +179,7 @@ describe('Apps', () => { // Note we're intercepting a more precise url here to avoid any icon requests made from the charts list cy.intercept('GET', '/v1/catalog.cattle.io.clusterrepos/rancher-charts?link=info&chartName=rancher-backup&version=*', cy.spy().as('rancherCharts2')); ChartPage.navTo(clusterId, 'Rancher Backups'); + cy.wait(1000);// eslint-disable-line cypress/no-unnecessary-waiting chartPage.waitForPage('repo-type=cluster&repo=rancher-charts&chart=rancher-backup'); // The specific version of the chart (and any other) should NOT be fetched cy.wait(1000); // eslint-disable-line cypress/no-unnecessary-waiting diff --git a/pkg/aks/components/CruAks.vue b/pkg/aks/components/CruAks.vue index e7e6f581868..c7c2d5069a5 100644 --- a/pkg/aks/components/CruAks.vue +++ b/pkg/aks/components/CruAks.vue @@ -156,7 +156,7 @@ export default defineComponent({ } // track original version on edit to ensure we don't offer k8s downgrades - const kubernetesVersion = semver.coerce(this.normanCluster?.aksConfig?.kubernetesVersion); + const kubernetesVersion = semver.coerce(this.normanCluster?.aksConfig?.kubernetesVersion)?.version; this.originalVersion = kubernetesVersion; } else {