cluster-api-provider-cloudstack icon indicating copy to clipboard operation
cluster-api-provider-cloudstack copied to clipboard

Update to CAPI 1.5

Open hrak opened this issue 1 year ago • 30 comments
trafficstars

Issue #, if available:

#285 #253

Description of changes:

This PR updates the cluster-api dependency to v1.5.5. It also updates to Go 1.20, updates golang-ci and addresses lint issues caught by the new version (mostly unused variables in function definitions)

Testing performed:

make test test with kind

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

hrak avatar Feb 06 '24 15:02 hrak

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

Name Link
Latest commit 3c0fa5523f2618e0d780dae95b13313c821ab4b2
Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-cloudstack/deploys/66217253e287780008b8b2e8
Deploy Preview https://deploy-preview-342--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.

netlify[bot] avatar Feb 06 '24 15:02 netlify[bot]

Codecov Report

Attention: 37 lines in your changes are missing coverage. Please review.

Comparison is base (7fd4146) 25.45% compared to head (6838e34) 25.38%.

:exclamation: Current head 6838e34 differs from pull request most recent head dcdf474. Consider uploading reports for the commit dcdf474 to get more accurate results

Files Patch % Lines
controllers/cloudstackmachine_controller.go 58.33% 11 Missing and 4 partials :warning:
controllers/cloudstackcluster_controller.go 37.50% 4 Missing and 1 partial :warning:
api/v1beta3/cloudstackcluster_webhook.go 57.14% 3 Missing :warning:
api/v1beta3/cloudstackmachine_webhook.go 57.14% 3 Missing :warning:
api/v1beta3/cloudstackmachinetemplate_webhook.go 57.14% 3 Missing :warning:
api/v1beta1/conversion.go 0.00% 2 Missing :warning:
api/v1beta1/cloudstackaffinitygroup_conversion.go 0.00% 1 Missing :warning:
...pi/v1beta1/cloudstackisolatednetwork_conversion.go 0.00% 1 Missing :warning:
api/v1beta1/cloudstackmachine_conversion.go 0.00% 1 Missing :warning:
...pi/v1beta1/cloudstackmachinetemplate_conversion.go 0.00% 1 Missing :warning:
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #342      +/-   ##
==========================================
- Coverage   25.45%   25.38%   -0.08%     
==========================================
  Files          59       59              
  Lines        5555     5535      -20     
==========================================
- Hits         1414     1405       -9     
+ Misses       4002     3990      -12     
- Partials      139      140       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Feb 06 '24 16:02 codecov-commenter

I haven't tested it, but in theory we must upgrade to CAPI 1.5 or whatever may be the latest. I would want to see an easily v0.5 release.

/lgtm

rohityadavcloud avatar Feb 08 '24 12:02 rohityadavcloud

cc @shwstppr we'll need that CI fixed soon 🙏

rohityadavcloud avatar Feb 08 '24 12:02 rohityadavcloud

/run-e2e -c 4.18 let's see if we get anything

g-gaston avatar Feb 08 '24 18:02 g-gaston

/retest

g-gaston avatar Feb 08 '24 18:02 g-gaston

@g-gaston Invalid command: /run-e2e -c 4.18 let's see if we get anything

  • Unsupported CloudStack version: 4.18 let's

The command to run e2e test for CAPC.

Usage: /run-e2e [-k Kubernetes_Version] [-c CloudStack_Version] [-h Hypervisor] [-i Template/Image] [-f Kubernetes_Version_Upgrade_From] [-t Kubernetes_Version_Upgrade_To]

  • Supported Kubernetes versions are: ['1.27.2', '1.26.5', '1.25.10', '1.24.14', '1.23.3', '1.22.6']. The default value is '1.27.2'.
  • Supported CloudStack versions are: ['4.18', '4.17', '4.16']. If it is not set, an existing environment will be used.
  • Supported hypervisors are: ['kvm', 'vmware', 'xen']. The default value is 'kvm'.
  • Supported templates are: ['ubuntu-2004-kube', 'rockylinux-8-kube']. The default value is 'ubuntu-2004-kube'.
  • By default it tests Kubernetes upgrade from version '1.26.5' to '1.27.2'.

Examples:

  • /run-e2e
  • /run-e2e -k 1.27.2 -h kvm -i ubuntu-2004-kube
  • /run-e2e -k 1.27.2 -c 4.18 -h kvm -i ubuntu-2004-kube -f 1.26.5 -t 1.27.2

blueorangutan avatar Feb 08 '24 18:02 blueorangutan

/run-e2e -c 4.18

rohityadavcloud avatar Feb 08 '24 18:02 rohityadavcloud

@rohityadavcloud a jenkins job has been kicked to run test with following paramaters:

  • kubernetes version: 1.27.2
  • CloudStack version: 4.18
  • hypervisor: kvm
  • template: ubuntu-2004-kube
  • Kubernetes upgrade from: 1.26.5 to 1.27.2

blueorangutan avatar Feb 08 '24 18:02 blueorangutan

/test capi-provider-cloudstack-presubmit-e2e-smoke-test

pokearu avatar Feb 14 '24 09:02 pokearu

Hi @g-gaston @rohityadavcloud I ran the e2e suit manually to test the CAPI changes. And got a successful run ✅

Not sure why the presubmit is failing, make run-e2e-smoke works for me locally just fine.

pokearu avatar Feb 16 '24 15:02 pokearu

/test capi-provider-cloudstack-presubmit-e2e-smoke-test

rohityadavcloud avatar Feb 16 '24 18:02 rohityadavcloud

/run-e2e -c 4.18

rohityadavcloud avatar Feb 16 '24 18:02 rohityadavcloud

@rohityadavcloud a jenkins job has been kicked to run test with following paramaters:

  • kubernetes version: 1.27.2
  • CloudStack version: 4.18
  • hypervisor: kvm
  • template: ubuntu-2004-kube
  • Kubernetes upgrade from: 1.26.5 to 1.27.2

blueorangutan avatar Feb 16 '24 18:02 blueorangutan

Thanks for testing @pokearu, @g-gaston @hrak is this ready for merging or need further review/testing? There was also an idea to skip and move to CAPI 1.6 ?

rohityadavcloud avatar Feb 16 '24 18:02 rohityadavcloud

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hrak Once this PR has been reviewed and has the lgtm label, please ask for approval from rohityadavcloud. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 avatar Feb 16 '24 18:02 k8s-ci-robot

@rohityadavcloud looks like the failing presubmit is due to the version of KinD being installed. https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/blob/main/hack/ensure-kind.sh#L22 I think this needs to be increased to v0.20.0 to match with CAPI 1.5.5

pokearu avatar Feb 16 '24 18:02 pokearu

/run-e2e -c 4.18 /lgtm

rohityadavcloud avatar Feb 16 '24 18:02 rohityadavcloud

@rohityadavcloud Invalid command: /run-e2e -c 4.18 /lgtm

  • Unsupported CloudStack version: 4.18 /lgtm

The command to run e2e test for CAPC.

Usage: /run-e2e [-k Kubernetes_Version] [-c CloudStack_Version] [-h Hypervisor] [-i Template/Image] [-f Kubernetes_Version_Upgrade_From] [-t Kubernetes_Version_Upgrade_To]

  • Supported Kubernetes versions are: ['1.27.2', '1.26.5', '1.25.10', '1.24.14', '1.23.3', '1.22.6']. The default value is '1.27.2'.
  • Supported CloudStack versions are: ['4.18', '4.17', '4.16']. If it is not set, an existing environment will be used.
  • Supported hypervisors are: ['kvm', 'vmware', 'xen']. The default value is 'kvm'.
  • Supported templates are: ['ubuntu-2004-kube', 'rockylinux-8-kube']. The default value is 'ubuntu-2004-kube'.
  • By default it tests Kubernetes upgrade from version '1.26.5' to '1.27.2'.

Examples:

  • /run-e2e
  • /run-e2e -k 1.27.2 -h kvm -i ubuntu-2004-kube
  • /run-e2e -k 1.27.2 -c 4.18 -h kvm -i ubuntu-2004-kube -f 1.26.5 -t 1.27.2

blueorangutan avatar Feb 16 '24 18:02 blueorangutan

@blueorangutan: changing LGTM is restricted to collaborators

In response to this:

@rohityadavcloud Invalid command: /run-e2e -c 4.18 /lgtm

  • Unsupported CloudStack version: 4.18 /lgtm

The command to run e2e test for CAPC.

Usage: /run-e2e [-k Kubernetes_Version] [-c CloudStack_Version] [-h Hypervisor] [-i Template/Image] [-f Kubernetes_Version_Upgrade_From] [-t Kubernetes_Version_Upgrade_To]

  • Supported Kubernetes versions are: ['1.27.2', '1.26.5', '1.25.10', '1.24.14', '1.23.3', '1.22.6']. The default value is '1.27.2'.
  • Supported CloudStack versions are: ['4.18', '4.17', '4.16']. If it is not set, an existing environment will be used.
  • Supported hypervisors are: ['kvm', 'vmware', 'xen']. The default value is 'kvm'.
  • Supported templates are: ['ubuntu-2004-kube', 'rockylinux-8-kube']. The default value is 'ubuntu-2004-kube'.
  • By default it tests Kubernetes upgrade from version '1.26.5' to '1.27.2'.

Examples:

  • /run-e2e
  • /run-e2e -k 1.27.2 -h kvm -i ubuntu-2004-kube
  • /run-e2e -k 1.27.2 -c 4.18 -h kvm -i ubuntu-2004-kube -f 1.26.5 -t 1.27.2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Feb 16 '24 18:02 k8s-ci-robot

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Feb 17 '24 23:02 k8s-ci-robot

@hrak great job! I added one small commit to fix the presubmits, just bumping the kind version I will try to review the rest of the code this week

g-gaston avatar Feb 18 '24 16:02 g-gaston

Hi @hrak - @g-gaston has advised me to try to get this PR in the next release, could you help rebase/address conflicts and any outstanding review remarks? Thanks.

rohityadavcloud avatar Mar 22 '24 14:03 rohityadavcloud

/uncc @chrisdoherty4

chrisdoherty4 avatar Apr 01 '24 00:04 chrisdoherty4

New changes are detected. LGTM label has been removed.

k8s-ci-robot avatar Apr 18 '24 19:04 k8s-ci-robot

PR updated for CAPI v1.5.8. Sorry for the delay.

hrak avatar Apr 18 '24 19:04 hrak

@hrak there are some unresolved comments by @g-gaston. Can you please address/resolve them?

vishesh92 avatar May 20 '24 09:05 vishesh92

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar May 24 '24 00:05 k8s-ci-robot

This PR has some conflicts and some comments needs to be addressed/resolved. Changing milestone for this PR to v0.6.0 for now.

vishesh92 avatar May 31 '24 20:05 vishesh92

Hi, I'm sorry I haven't been able to dedicate much time on this lately cause I'm swamped in launching our k8s product at work. I will update the PR when i have some time.

hrak avatar Jul 08 '24 13:07 hrak