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

[release-1.10] fix NodeTaints and NodeLabels return type for AzureManagedMachinePools #4153

Conversation

nawazkh
Copy link
Member

@nawazkh nawazkh commented Oct 18, 2023

What type of PR is this?
/kind bug

What this PR does / why we need it:

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

Special notes for your reviewer:

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

fix NodeTaints and NodeLabels return type for AzureManagedMachinePools

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 18, 2023
@nawazkh nawazkh requested a review from nojnhuh October 18, 2023 16:08
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 18, 2023
@nawazkh
Copy link
Member Author

nawazkh commented Oct 18, 2023

/cc @CecileRobertMichon @mboersma

@nojnhuh
Copy link
Contributor

nojnhuh commented Oct 18, 2023

/retitle [release-1.10] fix NodeTaints and NodeLabels return type for AzureManagedMachinePools

@k8s-ci-robot k8s-ci-robot changed the title fix NodeTaints and NodeLabels return type for AzureManagedMachinePools [release-1.10] fix NodeTaints and NodeLabels return type for AzureManagedMachinePools Oct 18, 2023
@nawazkh
Copy link
Member Author

nawazkh commented Oct 18, 2023

Errors say

azure/services/agentpools/spec.go:250:16: cannot use mergeSystemNodeTaints(normalizedProfile.NodeTaints, existingPool.NodeTaints) (value of type []*string) as *[]string value in assignment
azure/services/agentpools/spec.go:250:38: cannot use normalizedProfile.NodeTaints (variable of type *[]string) as []*string value in argument to mergeSystemNodeTaints
azure/services/agentpools/spec.go:250:68: cannot use existingPool.NodeTaints (variable of type *[]string) as []*string value in argument to mergeSystemNodeTaints
make: *** [Makefile:198: manager] Error 1

Uh oh..

@nawazkh

This comment was marked as outdated.

- CAPZ will send out the below return types to AKS API so that the AKS API clears-out `NodeLabels` and `NodeTaints` respectively.
  - an empty Map when the `NodeLabels` are deleted.
  - an empty pointer array when the `NodeTaints` are deleted.
- update mergeSystemNodeTaints return type from []*string to *[]string
- Customize tests for release-1.10
@nawazkh nawazkh force-pushed the agentpools_labels_fix_release-1.10 branch from 7893025 to 18d4089 Compare October 18, 2023 17:44
@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (9c92c88) 54.36% compared to head (18d4089) 54.37%.
Report is 1 commits behind head on release-1.10.

Additional details and impacted files
@@              Coverage Diff              @@
##           release-1.10    #4153   +/-   ##
=============================================
  Coverage         54.36%   54.37%           
=============================================
  Files               186      186           
  Lines             18894    18896    +2     
=============================================
+ Hits              10272    10274    +2     
  Misses             8067     8067           
  Partials            555      555           
Files Coverage Δ
azure/services/agentpools/spec.go 62.94% <100.00%> (+0.33%) ⬆️

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

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
/approve

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

LGTM label has been added.

Git tree hash: 6ce3a3f3fe3c9baa619700ff0a745f33152dd03d

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nojnhuh

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 Oct 18, 2023
@k8s-ci-robot k8s-ci-robot merged commit 928ddf4 into kubernetes-sigs:release-1.10 Oct 18, 2023
18 checks passed
@nawazkh nawazkh deleted the agentpools_labels_fix_release-1.10 branch October 19, 2023 19:37
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/bug Categorizes issue or PR as related to a bug. 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.

3 participants