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

update loadbalancers service to use Azure SDK v2 #3969

Merged

Conversation

nawazkh
Copy link
Member

@nawazkh nawazkh commented Sep 7, 2023

What type of PR is this?
/kind feature

What this PR does / why we need it:

  • This PR updates load balancers service to sdkv2.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #3917

Special notes for your reviewer:

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

Update loadbalancers service to use Azure SDK v2

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 7, 2023
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 7, 2023
@nawazkh nawazkh force-pushed the update_loadbalancers_to_sdkv2 branch from 959e28e to d77af15 Compare September 7, 2023 22:05
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 7, 2023
@nawazkh nawazkh marked this pull request as ready for review September 7, 2023 22:06
@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 7, 2023
@nawazkh

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Patch coverage: 54.96% and project coverage change: +0.08% 🎉

Comparison is base (b082981) 56.26% compared to head (d89c16c) 56.34%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3969      +/-   ##
==========================================
+ Coverage   56.26%   56.34%   +0.08%     
==========================================
  Files         190      190              
  Lines       19447    19420      -27     
==========================================
+ Hits        10941    10942       +1     
+ Misses       7877     7848      -29     
- Partials      629      630       +1     
Files Changed Coverage Δ
azure/services/loadbalancers/client.go 0.00% <0.00%> (ø)
azure/services/loadbalancers/loadbalancers.go 73.07% <0.00%> (-6.09%) ⬇️
controllers/azurecluster_reconciler.go 57.71% <40.00%> (-0.91%) ⬇️
azure/services/loadbalancers/spec.go 92.59% <98.55%> (ø)
azure/converters/loadbalancers.go 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

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

@nawazkh nawazkh changed the title initial stub at updating loadbalancers service to SDK v2 update loadbalancers service to use Azure SDK v2 Sep 7, 2023
azure/converters/loadbalancers.go Outdated Show resolved Hide resolved
azure/services/loadbalancers/client.go Outdated Show resolved Hide resolved
azure/services/loadbalancers/client.go Outdated Show resolved Hide resolved
@nawazkh nawazkh force-pushed the update_loadbalancers_to_sdkv2 branch from d77af15 to fce35f8 Compare September 8, 2023 01:23
@nawazkh nawazkh force-pushed the update_loadbalancers_to_sdkv2 branch from fce35f8 to f579fa1 Compare September 8, 2023 01:36
@nawazkh
Copy link
Member Author

nawazkh commented Sep 8, 2023

Expected complaints from apidiff

sigs.k8s.io/cluster-api-provider-azure/azure/services/loadbalancers
Incompatible changes:
  - New: changed from func(LBScope) *Service to func(LBScope) (*Service, error)

sigs.k8s.io/cluster-api-provider-azure/azure/converters
Incompatible changes:
  - SKUtoSDK: changed from func(sigs.k8s.io/cluster-api-provider-azure/api/v1beta1.SKU) github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network.LoadBalancerSkuName to func(sigs.k8s.io/cluster-api-provider-azure/api/v1beta1.SKU) github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4.LoadBalancerSKUName

@nawazkh nawazkh requested a review from mboersma September 8, 2023 02:20
azure/converters/loadbalancers.go Outdated Show resolved Hide resolved
azure/services/loadbalancers/client.go Outdated Show resolved Hide resolved
@nawazkh nawazkh force-pushed the update_loadbalancers_to_sdkv2 branch from f579fa1 to 1c288da Compare September 8, 2023 05:18
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 8, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 7a8c34896336f741c70a3a44842e71a2530c13bf

Copy link
Contributor

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

lgtm, I just had one change to a comment for consistency with the other services.

azure/services/loadbalancers/client.go Outdated Show resolved Hide resolved
@nawazkh nawazkh force-pushed the update_loadbalancers_to_sdkv2 branch from 1c288da to d89c16c Compare September 8, 2023 16:52
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 8, 2023
@k8s-ci-robot k8s-ci-robot requested a review from nojnhuh September 8, 2023 16:52
@nawazkh nawazkh requested a review from mboersma September 8, 2023 16:54
@k8s-ci-robot
Copy link
Contributor

@nawazkh: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-azure-apidiff d89c16c link false /test pull-cluster-api-provider-azure-apidiff

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

Copy link
Contributor

@mboersma mboersma 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 k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 8, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: a8c2ced3cb46257e60d77177e4d84cb1664deee1

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mboersma

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 8, 2023
@k8s-ci-robot k8s-ci-robot merged commit 55318b5 into kubernetes-sigs:main Sep 8, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.11 milestone Sep 8, 2023
@nawazkh nawazkh deleted the update_loadbalancers_to_sdkv2 branch September 8, 2023 20:09
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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Update loadbalancers service to SDK v2
4 participants