From d992f2d881d8da25f294005d161235d0f0bc7d47 Mon Sep 17 00:00:00 2001 From: Tim Wright Date: Wed, 27 May 2026 14:55:50 +1200 Subject: [PATCH] don't use version in e2e tests --- .gitignore | 3 +++ e2e/cluster.go | 18 +++++++++++++++--- e2e/node_config.go | 2 +- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c0a41cd6619..2930c04076b 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,9 @@ cmd/_test_output *.test *.coverprofile **/junit.xml +test-results +coverage +staging/cse/windows/containerdfunc.tests.suites .idea .vs diff --git a/e2e/cluster.go b/e2e/cluster.go index 34a6eb6c168..c209c18096b 100644 --- a/e2e/cluster.go +++ b/e2e/cluster.go @@ -288,6 +288,7 @@ func getExistingCluster(ctx context.Context, location, clusterName string) (*arm return &existingCluster.ManagedCluster, nil } fallthrough + case "Failed": toolkit.Logf(ctx, "##vso[task.logissue type=warning;]Cluster %s in Failed state, deleting", clusterName) if err := deleteCluster(ctx, clusterName, resourceGroupName); err != nil { @@ -301,9 +302,20 @@ func getExistingCluster(ctx context.Context, location, clusterName string) (*arm return nil, fmt.Errorf("failed waiting for cluster deletion: %w", err) } return nil, nil + + case "Creating": + // For Creating state, wait for the cluster to become ready. + toolkit.Logf(ctx, "Cluster is currently being created. Will wait for creation to finish: %s", clusterName) + return waitUntilClusterReady(ctx, clusterName, location) + + case "Starting": + // For Starting state, wait for the cluster to become ready. + toolkit.Logf(ctx, "Cluster is currently being started. Will wait for start to finish: %s", clusterName) + return waitUntilClusterReady(ctx, clusterName, location) + default: - // other provisioning state, deleting, , stopping,,cancaled,cancelling,"Creating", "Updating", "Scaling", "Migrating", "Upgrading", "Starting", "Restoring": .. plus many others. - toolkit.Logf(ctx, "##vso[task.logissue type=warning;]Unexpected cluster provisioning state %s: %s", clusterName, *existingCluster.Properties.ProvisioningState) + // For other non-terminal provisioning states (e.g., Updating, Scaling, Migrating, Upgrading, Restoring), wait for the cluster to become ready. + toolkit.Logf(ctx, "##vso[task.logissue type=warning;]Unexpected cluster provisioning state for cluster %s: %s", clusterName, *existingCluster.Properties.ProvisioningState) return waitUntilClusterReady(ctx, clusterName, location) } } @@ -357,7 +369,7 @@ func waitUntilClusterReady(ctx context.Context, name, location string) (*armcont switch *cluster.ManagedCluster.Properties.ProvisioningState { case "Succeeded": return true, nil - case "Updating", "Assigned", "Creating": + case "Updating", "Assigned", "Creating", "Starting": return false, nil default: return false, fmt.Errorf("cluster %s is in state %s", name, *cluster.ManagedCluster.Properties.ProvisioningState) diff --git a/e2e/node_config.go b/e2e/node_config.go index e76537b03b7..d5355d5a5a9 100644 --- a/e2e/node_config.go +++ b/e2e/node_config.go @@ -911,7 +911,7 @@ DXRqvV7TWO2hndliQq3BW385ZkiephlrmpUVM= r2k1@arturs-mbp.lan`, // VnetCNILinuxPluginsDownloadURL: "https://packages.aks.azure.com/azure-cni/v1.1.3/binaries/azure-vnet-cni-linux-amd64-v1.1.3.tgz", VnetCNIWindowsPluginsDownloadURL: "https://packages.aks.azure.com/azure-cni/v1.6.21/binaries/azure-vnet-cni-windows-amd64-v1.6.21.zip", WindowsPauseImageURL: "mcr.microsoft.com/oss/v2/kubernetes/pause:3.10.1", - WindowsProvisioningScriptsPackageURL: "https://packages.aks.azure.com/aks/windows/cse/aks-windows-cse-scripts-v0.0.52.zip", + WindowsProvisioningScriptsPackageURL: "", WindowsTelemetryGUID: "fb801154-36b9-41bc-89c2-f4d4f05472b0", }, EndpointConfig: datamodel.AzureEndpointConfig{