-
Notifications
You must be signed in to change notification settings - Fork 435
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
Make azure and async spec type default values consistent with Azure Go SDK types #2494
Comments
Another consideration is that sometimes we might want to pass a pointer to an int type. For example,
In this case we might not want to have it be |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten |
IMO we should prioritize the migration to a supported SDK track first and fix this issue as we go along (if it's still appropriate). |
/lifecycle frozen We are prioritizing migration to ASO and will re-evaluate this depending on if it's still needed. More details at #3113 |
I think the kinds of bugs this attempts to address are much less of a concern now with ASO. Overall I'm +1 to closing this and re-opening if we do encounter any more bugs that this would have saved. Or at least recording that this is very low priority. |
I'll defer to @nojnhuh on this since most of these spec types were replaced with the ASO types. Closing it out for now, and if we need to reopen, we could probably just make a new issue specific to ASO. /close |
@Jont828: Closing this issue. In 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/test-infra repository. |
/kind bug
The
azure.AgentPoolSpec
type (found inazure/types.go
](https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/main/azure/types.go)) has fields such asAgentPoolSpec.AvailabilityZones
which is a[]string
andAgentPoolSpec.VnetSubnetID
which is astring
. These types are used to initialize the Go SDK typecontainerservice.AgentPool
which has corresponding pointer types such asAgentPool.AvailabilityZones
which is a*[]string
andAgentPool.VnetSubnetID
which is a*string
with code like this.As a result, when
spec.AvailabilityZones
andspec.VnetSubnetID
are uninitialized with values[]
and""
,AgentPool.AvailabilityZones
is set to&nil
instead ofnil
andAgentPool.VnetSubnetID
is set to&""
instead ofnil
. This results in a bug where the Azure Go SDK fields become initialized with pointers to default values. If the spec field is guaranteed to be set, this is not noticeable, but if not it will cause unit tests for the spec to fail.The text was updated successfully, but these errors were encountered: