Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade CAPI to 1.6 #422

Merged
merged 2 commits into from
Mar 21, 2025
Merged

Conversation

vishesh92
Copy link
Member

@vishesh92 vishesh92 commented Mar 19, 2025

Issue #, if available:

Description of changes:
Upgrade CAPI from 1.4 to 1.6.

https://release-1-7.cluster-api.sigs.k8s.io/developer/providers/migrations/v1.4-to-v1.5
https://release-1-7.cluster-api.sigs.k8s.io/developer/providers/migrations/v1.5-to-v1.6

Copilot generated summary

This pull request includes several updates to the Makefile and various Go files in the api/v1beta1, api/v1beta2, and api/v1beta3 directories. The most significant changes involve updating Kubernetes and Cluster API versions in the Makefile and modifying the way types are registered in the Go files.

Makefile updates:

  • Updated Kubernetes version from 1.26.1 to 1.28.3 ([MakefileL94-R94](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52L94-R94)).
  • Updated Cluster API version from v1.4.8 to v1.6.8 ([MakefileL247-R247](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52L247-R247)).

Go file updates:

  • Changed the registration of types from SchemeBuilder.Register to appending to objectTypes across multiple files in api/v1beta1, api/v1beta2, and api/v1beta3 directories ([[1]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-4b94866233c775f7db7e829dcd653e701ec7041d9dec436536f0905fdd2f13adL69-R69), [[2]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-ed32f654de8491b6b860817f5fece54fab8f4b13939588a62266faa0c9d98e05L157-R157), [[3]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-22821d88a16eeb653e15095c2734c8245d2ebf1134042444a18196180de3f017L84-R84), [[4]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-4e227699d188c232eddb476c90fa6db6f293e30d9bed6300342709e01beb87bcL183-R183), [[5]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-52df3648309a4a4a4f7b7a8bd300f6e343351c629f2e79134218fed61e9176b0L57-R57), [[6]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-ad47f1ff6b3fccc613847fd56967aae3454310043266dfec617a78a236bcca03L57-R57), [[7]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-6420e8722294ea30f3e3e6d4bcedd13b4ba5b64692bfb7a8eba00822170fec2bL69-R69), [[8]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-6472d1b84de9aef5c7eec22a0eb5ae27c1cd6ef5b65d4256bce4b5a45e8ea0feL71-R71), [[9]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-cbd3223219f25ae867cfdd8fbb17697639b58b83072f981df6668625bbce7056L74-R74), [[10]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-5bbacdaa5727977709edad518dd402ef626c07609a4ccc5acdd7da0fc0fc48a6L120-R120), [[11]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-7fe7bc13107fcdafc3c527472a45ea37d8333c5798b1b426f683582ea4e45979L85-R85), [[12]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-f3b519998675cc6a6bcebb1490be52f4034c6790d7c811090e9b33282620bc1dL185-R185), [[13]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-0dc44d1ea5772288a88f18c39c4e4663f614eae45ffa5e2f77964c3929149eaaL55-R55), [[14]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-f94f47bc5df8f8ab4eb9422201fc0bc00cf40fd60da078356b6c3348d0bbf02eL56-R56), [[15]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-1c99acda2cb1727e1de05080cd7be15428f74a38c70a4ea2ca4f4abd11e1d225L72-R72)).
  • Refactored groupversion_info.go files to use a new schemeBuilder and objectTypes for type registration, and added the addKnownTypes function ([[1]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-2a8cb044729b9c527231ffcee964039eff18223508d5c7e8f586e1d7fd69fd2aR23-R48), [[2]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-07742cfcb20b8b9e053d2b478d5855cab11ed8ecb7b00fbbd69f9f9353265476R23-R47)).
  • Minor import statement adjustments in zz_generated.deepcopy.go files ([[1]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-ea922c6dc50e1006dbedec93a5d58173a622630990e2985d97d6c088cf9cce79L26-R26), [[2]](https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/422/files#diff-f3cf8f78c3d1f91ca1c13effff678669275fe106b54c9799088ca345a36e69f6L26-R26)).

Testing performed:
Manually created a cluster.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vishesh92

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 19, 2025
Copy link

netlify bot commented Mar 19, 2025

Deploy Preview for kubernetes-sigs-cluster-api-cloudstack ready!

Name Link
🔨 Latest commit 72a0f6b
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-cloudstack/deploys/67dc32a75f80f000082bad0c
😎 Deploy Preview https://deploy-preview-422--kubernetes-sigs-cluster-api-cloudstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kubernetes-sigs kubernetes-sigs deleted a comment from blueorangutan Mar 19, 2025
@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2025

Codecov Report

Attention: Patch coverage is 66.15385% with 22 lines in your changes missing coverage. Please review.

Project coverage is 25.67%. Comparing base (d597e80) to head (72a0f6b).
Report is 75 commits behind head on main.

Files with missing lines Patch % Lines
controllers/cloudstackmachine_controller.go 54.54% 3 Missing and 2 partials ⚠️
api/v1beta1/groupversion_info.go 0.00% 4 Missing ⚠️
api/v1beta2/groupversion_info.go 0.00% 4 Missing ⚠️
api/v1beta3/cloudstackcluster_webhook.go 57.14% 3 Missing ⚠️
api/v1beta3/cloudstackmachine_webhook.go 57.14% 3 Missing ⚠️
api/v1beta3/cloudstackmachinetemplate_webhook.go 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             main     #422     +/-   ##
=========================================
  Coverage   25.66%   25.67%             
=========================================
  Files          59       72     +13     
  Lines        5563     6719   +1156     
=========================================
+ Hits         1428     1725    +297     
- Misses       3996     4834    +838     
- Partials      139      160     +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vishesh92 vishesh92 force-pushed the upgrade-capi-1.6 branch 2 times, most recently from a3b67bb to d82af01 Compare March 19, 2025 16:03
@vishesh92 vishesh92 added this to the v0.6 milestone Mar 19, 2025
@kubernetes-sigs kubernetes-sigs deleted a comment from blueorangutan Mar 19, 2025
@blueorangutan
Copy link

Test Results : (tid-605)
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
Kubernetes Version: v1.31.6
Kubernetes Version upgrade from: v1.30.10
Kubernetes Version upgrade to: v1.31.6
CloudStack Version: 4.20
Template: ubuntu-2404-kube
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr422-sl-605.zip



Summarizing 3 Failures:
 [FAIL] When the specified resource does not exist When starting with a healthy cluster [It] Should fail to upgrade control plane machine due to insufficient compute resources
 /jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253
 [FAIL] When testing project [AfterEach] Should create a cluster in a project
 /jenkins/workspace/capc-e2e-new/test/e2e/project.go:103
 [FAIL] When testing multiple CPs in a shared network with kubevip [It] Should successfully create a cluster with multiple CPs in a shared network
 /root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/cluster_helpers.go:144

Ran 30 of 31 Specs in 9041.562 seconds
FAIL! -- 27 Passed | 3 Failed | 0 Pending | 1 Skipped
--- FAIL: TestE2E (9041.56s)
FAIL

@blueorangutan
Copy link

Test Results : (tid-606)
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
Kubernetes Version: v1.31.6
Kubernetes Version upgrade from: v1.30.10
Kubernetes Version upgrade to: v1.31.6
CloudStack Version: 4.20
Template: ubuntu-2404-kube
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr422-sl-606.zip



Summarizing 3 Failures:
 [FAIL] When testing project [AfterEach] Should create a cluster in a project
 /jenkins/workspace/capc-e2e-new/test/e2e/project.go:103
 [FAIL] When testing affinity group [It] Should have host affinity group when affinity is pro
 /jenkins/workspace/capc-e2e-new/test/e2e/common.go:359
 [FAIL] When the specified resource does not exist When starting with a healthy cluster [It] Should fail to upgrade control plane machine due to insufficient compute resources
 /jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253

Ran 30 of 31 Specs in 8541.165 seconds
FAIL! -- 27 Passed | 3 Failed | 0 Pending | 1 Skipped
--- FAIL: TestE2E (8541.17s)
FAIL

Copy link
Member

@rohityadavcloud rohityadavcloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in theory, this may need both CI/CD tests but manual tests around upgrades etc.

@blueorangutan
Copy link

Test Results : (tid-614)
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
Kubernetes Version: v1.31.6
Kubernetes Version upgrade from: v1.30.10
Kubernetes Version upgrade to: v1.31.6
CloudStack Version: 4.20
Template: ubuntu-2404-kube
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr422-sl-614.zip



Summarizing 3 Failures:
 [FAIL] When testing project [It] Should create a cluster in a project
 /jenkins/workspace/capc-e2e-new/test/e2e/project.go:104
 [FAIL] When testing affinity group [It] Should have host affinity group when affinity is pro
 /jenkins/workspace/capc-e2e-new/test/e2e/common.go:359
 [FAIL] When the specified resource does not exist When starting with a healthy cluster [It] Should fail to upgrade control plane machine due to insufficient compute resources
 /jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253

Ran 31 of 32 Specs in 9887.327 seconds
FAIL! -- 28 Passed | 3 Failed | 0 Pending | 1 Skipped
--- FAIL: TestE2E (9887.33s)
FAIL

@weizhouapache
Copy link
Collaborator

Test Results : (tid-614) Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8 Kubernetes Version: v1.31.6 Kubernetes Version upgrade from: v1.30.10 Kubernetes Version upgrade to: v1.31.6 CloudStack Version: 4.20 Template: ubuntu-2404-kube E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr422-sl-614.zip



Summarizing 3 Failures:
 [FAIL] When testing project [It] Should create a cluster in a project
 /jenkins/workspace/capc-e2e-new/test/e2e/project.go:104
 [FAIL] When testing affinity group [It] Should have host affinity group when affinity is pro
 /jenkins/workspace/capc-e2e-new/test/e2e/common.go:359
 [FAIL] When the specified resource does not exist When starting with a healthy cluster [It] Should fail to upgrade control plane machine due to insufficient compute resources
 /jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253

Ran 31 of 32 Specs in 9887.327 seconds
FAIL! -- 28 Passed | 3 Failed | 0 Pending | 1 Skipped
--- FAIL: TestE2E (9887.33s)
FAIL

@vishesh92
this is mostly consistent with #422 (comment) and #422 (comment)

should we fix them before merge ?

@vishesh92
Copy link
Member Author

@vishesh92 this is mostly consistent with #422 (comment) and #422 (comment)

should we fix them before merge ?

I ran some tests in the lab. These tests seems to be failing on main branch as well. Let me debug and see if I can find a fix for them. I will raise a separate PR for that.

The only test which seems to failing consistently is

 [FAIL] When the specified resource does not exist When starting with a healthy cluster [It] Should fail to upgrade control plane machine due to insufficient compute resources
 /jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253

@blueorangutan
Copy link

Test Results : (tid-632)
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
Kubernetes Version: v1.27.2
Kubernetes Version upgrade from: v1.26.5
Kubernetes Version upgrade to: v1.27.2
CloudStack Version: 4.20
Template: ubuntu-2004-kube
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr422-sl-632.zip



Summarizing 3 Failures:
 [FAIL] When testing resource cleanup [AfterEach] Should create a new network when the specified network does not exist
 /jenkins/workspace/capc-e2e-new/test/e2e/resource_cleanup.go:101
 [FAIL] When testing project [It] Should create a cluster in a project
 /jenkins/workspace/capc-e2e-new/test/e2e/project.go:104
 [TIMEDOUT] When testing horizontal scale out/in [TC17][TC18][TC20][TC21] [It] Should successfully scale machine replicas up and down horizontally
 /jenkins/workspace/capc-e2e-new/test/e2e/horizontal_scale.go:60

Ran 31 of 32 Specs in 10814.925 seconds
FAIL! - Suite Timeout Elapsed -- 28 Passed | 3 Failed | 0 Pending | 1 Skipped
--- FAIL: TestE2E (10814.93s)
FAIL

@weizhouapache
Copy link
Collaborator

since there is no major issues found in e2e tests, let's merge it

we will have to intensively test all cases before next release

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 21, 2025
@k8s-ci-robot k8s-ci-robot merged commit 49eea04 into kubernetes-sigs:main Mar 21, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants