From f001a3e310a413900e7f800b1312fd861fbebec0 Mon Sep 17 00:00:00 2001 From: Reed Schalo Date: Fri, 12 Jul 2024 12:10:29 -0700 Subject: [PATCH 1/2] test: fix upgrade suite (#6505) --- .github/workflows/e2e-upgrade.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/e2e-upgrade.yaml b/.github/workflows/e2e-upgrade.yaml index 0413fef27c91..cfb850fb67ad 100644 --- a/.github/workflows/e2e-upgrade.yaml +++ b/.github/workflows/e2e-upgrade.yaml @@ -101,6 +101,14 @@ jobs: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: ref: ${{ inputs.to_git_ref }} + - name: upgrade crds + uses: ./.github/actions/e2e/upgrade-crds + with: + account_id: ${{ vars.CI_ACCOUNT_ID }} + role: ${{ vars.CI_ROLE_NAME }} + region: ${{ inputs.region }} + cluster_name: ${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }} + git_ref: ${{ inputs.to_git_ref }} - name: upgrade eks cluster '${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }}' uses: ./.github/actions/e2e/setup-cluster with: @@ -116,14 +124,6 @@ jobs: ecr_region: ${{ vars.SNAPSHOT_REGION }} prometheus_workspace_id: ${{ vars.WORKSPACE_ID }} prometheus_region: ${{ vars.PROMETHEUS_REGION }} - - name: upgrade crds - uses: ./.github/actions/e2e/upgrade-crds - with: - account_id: ${{ vars.CI_ACCOUNT_ID }} - role: ${{ vars.CI_ROLE_NAME }} - region: ${{ inputs.region }} - cluster_name: ${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }} - git_ref: ${{ inputs.to_git_ref }} - name: run the Upgrade test suite run: | aws eks update-kubeconfig --name ${{ steps.generate-cluster-name.outputs.CLUSTER_NAME }} From 5baf0d7f5dbfa8fb9138798214cfcf85eac32ea2 Mon Sep 17 00:00:00 2001 From: Reed Schalo Date: Fri, 12 Jul 2024 15:43:25 -0700 Subject: [PATCH 2/2] test: fix drift suite (#6506) --- test/suites/drift/suite_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/suites/drift/suite_test.go b/test/suites/drift/suite_test.go index bfacc11025a0..453f54021ffa 100644 --- a/test/suites/drift/suite_test.go +++ b/test/suites/drift/suite_test.go @@ -547,6 +547,8 @@ var _ = Describe("Drift", func() { Kind: object.GVK(nodeClass).Kind, Name: nodeClass.Name, }, + // keep the same instance type requirements to prevent considering instance types that require swap + Requirements: nodePool.Spec.Template.Spec.Requirements, }, }, }, @@ -620,7 +622,12 @@ var _ = Describe("Drift", func() { }), Entry("NodeRequirements", corev1beta1.NodeClaimTemplate{ Spec: corev1beta1.NodeClaimSpec{ - Requirements: []corev1beta1.NodeSelectorRequirementWithMinValues{{NodeSelectorRequirement: v1.NodeSelectorRequirement{Key: corev1beta1.CapacityTypeLabelKey, Operator: v1.NodeSelectorOpIn, Values: []string{corev1beta1.CapacityTypeSpot}}}}, + // since this will overwrite the default requirements, add instance category and family selectors back into requirements + Requirements: []corev1beta1.NodeSelectorRequirementWithMinValues{ + {NodeSelectorRequirement: v1.NodeSelectorRequirement{Key: corev1beta1.CapacityTypeLabelKey, Operator: v1.NodeSelectorOpIn, Values: []string{corev1beta1.CapacityTypeSpot}}}, + {NodeSelectorRequirement: v1.NodeSelectorRequirement{Key: v1beta1.LabelInstanceCategory, Operator: v1.NodeSelectorOpIn, Values: []string{"c", "m", "r"}}}, + {NodeSelectorRequirement: v1.NodeSelectorRequirement{Key: v1beta1.LabelInstanceFamily, Operator: v1.NodeSelectorOpNotIn, Values: []string{"a1"}}}, + }, }, }), )