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

Convert virtualmachines service to SDKv2 #3996

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

mboersma
Copy link
Contributor

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Converts the virtualmachines service to azure-sdk-for-go version 2 and the asyncpoller framework.

Which issue(s) this PR fixes:

Fixes #3918

Special notes for your reviewer:

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 13, 2023
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 13, 2023
@mboersma
Copy link
Contributor Author

mboersma commented Sep 13, 2023

/retitle [WIP] Convert virtualmachines service to SDKv2

This needs to be rebased when scalesetvms has merged.

Edit: rebased.

@k8s-ci-robot k8s-ci-robot changed the title Sdk v2 vms [WIP] Convert virtualmachines service to SDKv2 Sep 13, 2023
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 13, 2023
@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Patch coverage: 58.28% and project coverage change: +0.04% 🎉

Comparison is base (4f076e6) 56.68% compared to head (f49b5ac) 56.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3996      +/-   ##
==========================================
+ Coverage   56.68%   56.72%   +0.04%     
==========================================
  Files         188      188              
  Lines       19328    19189     -139     
==========================================
- Hits        10956    10885      -71     
+ Misses       7739     7671      -68     
  Partials      633      633              
Files Changed Coverage Δ
azure/services/scalesetvms/scalesetvms.go 60.20% <0.00%> (-2.57%) ⬇️
azure/services/virtualmachines/client.go 0.00% <0.00%> (ø)
azure/services/roleassignments/roleassignments.go 60.95% <14.28%> (-2.42%) ⬇️
azure/services/virtualmachines/virtualmachines.go 70.83% <35.71%> (-1.51%) ⬇️
azure/services/virtualmachines/spec.go 86.48% <92.10%> (-1.87%) ⬇️
azure/converters/diagnostics.go 100.00% <100.00%> (ø)
azure/converters/extendedlocation.go 100.00% <100.00%> (ø)
azure/converters/identity.go 100.00% <100.00%> (ø)
azure/converters/image.go 100.00% <100.00%> (+18.65%) ⬆️
azure/converters/spotinstances.go 84.21% <100.00%> (ø)
... and 2 more

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

@mboersma
Copy link
Contributor Author

/retitle Convert virtualmachines service to SDKv2

@k8s-ci-robot k8s-ci-robot changed the title [WIP] Convert virtualmachines service to SDKv2 Convert virtualmachines service to SDKv2 Sep 13, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 13, 2023
@mboersma
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-e2e-optional

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 13, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 13, 2023
azure/converters/extendedlocation.go Outdated Show resolved Hide resolved
azure/converters/spotinstances.go Outdated Show resolved Hide resolved
azure/converters/vm.go Show resolved Hide resolved
azure/converters/vm.go Outdated Show resolved Hide resolved
@nojnhuh
Copy link
Contributor

nojnhuh commented Sep 13, 2023

Seeing a lot of these in the controller logs:

E0913 20:16:00.914141       1 controller.go:324]  "msg"="Reconciler error" "error"="failed to reconcile AzureMachine: failed to reconcile AzureMachine service virtualmachine: failed to create or update resource capz-e2e-dfomdc-ha/capz-e2e-dfomdc-ha-md-0-5nlp8 (service: virtualmachine): <nil> is not an armcompute.VirtualMachine" "AzureMachine"={"name":"capz-e2e-dfomdc-ha-md-0-5nlp8","namespace":"capz-e2e-dfomdc"} "controller"="azuremachine" "controllerGroup"="infrastructure.cluster.x-k8s.io" "controllerKind"="AzureMachine" "name"="capz-e2e-dfomdc-ha-md-0-5nlp8" "namespace"="capz-e2e-dfomdc" "reconcileID"="2898a69e-3120-43af-9659-72a7a6f3056e"

@mboersma
Copy link
Contributor Author

Thanks @nojnhuh, those are great comments and I incorporated them all. 🤞🏻

Copy link
Contributor

@nojnhuh nojnhuh left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 13, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 43e9da787b31edc3233a5f1403235996e5dd4e88

@mboersma
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-e2e-optional

@mboersma
Copy link
Contributor Author

/assign @CecileRobertMichon @jackfrancis

Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 14, 2023
@k8s-ci-robot k8s-ci-robot merged commit af1be1c into kubernetes-sigs:main Sep 14, 2023
@mboersma mboersma deleted the sdk-v2-vms branch September 14, 2023 18:05
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Update virtualmachines service to SDK v2
5 participants