Skip to content

Commit

Permalink
Bump shepherd to the latest commit and Attempt#2 at fixing EKS Sync t…
Browse files Browse the repository at this point in the history
…ests

Signed-off-by: Parthvi Vala <[email protected]>
  • Loading branch information
valaparthvi committed Feb 6, 2025
1 parent 4b3f8c5 commit e7c487f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20241114104736-0d5b41ca9158
github.com/rancher-sandbox/qase-ginkgo v1.0.1
github.com/rancher/rancher v0.0.0-00010101000000-000000000000
github.com/rancher/shepherd v0.0.0-20250128173158-b3e7a07abe9a // rancher/shepherd main commit
github.com/rancher/shepherd v0.0.0-20250205140852-ba6d2793aaff // rancher/shepherd main commit
github.com/sirupsen/logrus v1.9.3
k8s.io/apimachinery v0.31.1
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ github.com/rancher/rancher/pkg/apis v0.0.0-20241127174121-c051d99dcded h1:h2gsuj
github.com/rancher/rancher/pkg/apis v0.0.0-20241127174121-c051d99dcded/go.mod h1:VJQNArsPMiuWlvlnfGbD5gZtGvttnsEJSbrLsHfBtuA=
github.com/rancher/rke v1.7.0-rc.5 h1:kBRwXTW8CYPXvCcPLISiwGTCvJ8K/+b35D5ES0IcduM=
github.com/rancher/rke v1.7.0-rc.5/go.mod h1:+x++Mvl0A3jIzNLiu8nkraqZXiHg6VPWv0Xl4iQCg+A=
github.com/rancher/shepherd v0.0.0-20250128173158-b3e7a07abe9a h1:2M68MtzP2PwInsKQNhaRTZ0W5I84iJw1KIUBBc+mpRY=
github.com/rancher/shepherd v0.0.0-20250128173158-b3e7a07abe9a/go.mod h1:relMIZBbmYQyZUgVWfomrpHKO0we3AmbrUD0EFYoXyc=
github.com/rancher/shepherd v0.0.0-20250205140852-ba6d2793aaff h1:ifkYlyFJEZzpo8uY0PX0oE8/36ZkDWiAPpL/EU2x5Og=
github.com/rancher/shepherd v0.0.0-20250205140852-ba6d2793aaff/go.mod h1:relMIZBbmYQyZUgVWfomrpHKO0we3AmbrUD0EFYoXyc=
github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20240301001845-4eacc2dabbde h1:x5VZI/0TUx1MeZirh6e0OMAInhCmq6yRvD6897458Ng=
github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20240301001845-4eacc2dabbde/go.mod h1:04o7UUy7ZFiMDEtHEjO1yS7IkO8TcsgjBl93Fcjq7Gg=
github.com/rancher/wrangler v1.1.2 h1:oXbXo9k7y/H4drUpb4RM1c++vT9O3rpoNEfyusGykiU=
Expand Down
24 changes: 9 additions & 15 deletions hosted/eks/k8s_chart_support/k8s_chart_support_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,14 @@ func commonchecks(client *rancher.Client, cluster *management.Cluster) {
By("downgrading the chart version", func() {
helpers.DowngradeProviderChart(downgradedVersion)
})

configNodeGroups := *cluster.EKSConfig.NodeGroups
initialNodeCount := *configNodeGroups[0].DesiredSize
var upgradeSuccessful bool

By("making a change(scaling nodegroup up) to the cluster to validate functionality after chart downgrade", func() {
var err error
cluster, err = helper.ScaleNodeGroup(cluster, client, initialNodeCount+increaseBy, false, true)
cluster, err = helper.ScaleNodeGroup(cluster, client, initialNodeCount+increaseBy, true, true)
Expect(err).To(BeNil())

// We do not use WaitClusterToBeUpgraded because it has been flaky here and times out
Eventually(func() bool {
configNodeGroups = *cluster.EKSConfig.NodeGroups
for i := range configNodeGroups {
upgradeSuccessful = *configNodeGroups[i].DesiredSize == initialNodeCount+increaseBy
}
return upgradeSuccessful
}, tools.SetTimeout(15*time.Minute), 10*time.Second).Should(BeTrue())
})

By("uninstalling the operator chart", func() {
Expand All @@ -134,11 +125,14 @@ func commonchecks(client *rancher.Client, cluster *management.Cluster) {
Eventually(func() bool {
GinkgoLogr.Info("Waiting for the node count change to appear in EKSStatus.UpstreamSpec ...")
Expect(err).To(BeNil())
upstreamNodeGroups := *cluster.EKSStatus.UpstreamSpec.NodeGroups
for i := range upstreamNodeGroups {
upgradeSuccessful = *upstreamNodeGroups[i].DesiredSize == initialNodeCount
cluster, err = client.Management.Cluster.ByID(cluster.ID)
Expect(err).To(BeNil())
for _, ng := range *cluster.EKSStatus.UpstreamSpec.NodeGroups {
if *ng.DesiredSize != initialNodeCount {
return false
}
}
return upgradeSuccessful
return true
}, tools.SetTimeout(15*time.Minute), 10*time.Second).Should(BeTrue())

})
Expand Down

0 comments on commit e7c487f

Please sign in to comment.