Replace autorest/to with k8s.io/utils/ptr#8723
Replace autorest/to with k8s.io/utils/ptr#8723k8s-ci-robot merged 1 commit intokubernetes:masterfrom
Conversation
| github.com/Azure/go-autorest/autorest/adal v0.9.24 | ||
| github.com/Azure/go-autorest/autorest/azure/auth v0.5.13 | ||
| github.com/Azure/go-autorest/autorest/date v0.3.0 | ||
| github.com/Azure/go-autorest/autorest/to v0.4.0 |
| if vmPoolName == nil { | ||
| continue | ||
| if vmPoolName != nil { | ||
| instances[*vmPoolName] = append(instances[*vmPoolName], instance) |
| strings.EqualFold(ptr.Deref(manualProfile.Sizes[0], ""), vmSku) { | ||
| klog.V(5).Infof("Found matching manual profile for VM SKU: %s, updating count to: %d", vmSku, count) | ||
| manualProfile.Count = to.Int32Ptr(count) | ||
| manualProfile.Count = ptr.To(count) |
There was a problem hiding this comment.
fwiw reading over this is what made me think we don't need to to cast if the inputted variable already fulfills the type requirement (the output from ptr.To will match that same type)
There was a problem hiding this comment.
I updated the PR to remove the two optional casts to [int64].
jackfrancis
left a comment
There was a problem hiding this comment.
left some nit feedback for a few items
72753c2 to
c6ecc43
Compare
c6ecc43 to
3c9e7b6
Compare
3c9e7b6 to
f28ee6e
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jackfrancis, mboersma The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/cherry-pick cluster-autoscaler-release-1.34 |
|
@jackfrancis: new pull request created: #8730 DetailsIn response to this:
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. |
|
/cherry-pick cluster-autoscaler-release-1.33 |
|
@jackfrancis: new pull request created: #8731 DetailsIn response to this:
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. |
|
/cherry-pick cluster-autoscaler-release-1.32 |
|
@jackfrancis: #8723 failed to apply on top of branch "cluster-autoscaler-release-1.32": DetailsIn response to this:
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. |
What type of PR is this?
/kind cleanup
/kind deprecation
What this PR does / why we need it:
Replaces usages of the deprecated
github.com/Azure/go-autorest/autorest/topackage withk8s.io/utils/ptr.Which issue(s) this PR fixes:
Refs #8145.
Special notes for your reviewer:
Does this PR introduce a user-facing change?