autoscaler icon indicating copy to clipboard operation
autoscaler copied to clipboard

cluster autoscaler provider build tags broken for several providers

Open elmiko opened this issue 1 year ago • 10 comments

Which component are you using?:

cluster-autoscaler

What version of the component are you using?:

Component version: master

What k8s version are you using (kubectl version)?:

n/a

What environment is this in?:

n/a, build environment

What did you expect to happen?:

expect target binary to be built

What happened instead?:

$ go build --tags aws -o ./cluster-autoscaler-amd64 
# k8s.io/autoscaler/cluster-autoscaler/cloudprovider/builder
cloudprovider/builder/cloud_provider_builder.go:46:47: too many arguments in call to buildCloudProvider
        have ("k8s.io/autoscaler/cluster-autoscaler/config".AutoscalingOptions, "k8s.io/autoscaler/cluster-autoscaler/cloudprovider".NodeGroupDiscoveryOptions, *"k8s.io/autoscaler/cluster-autoscaler/cloudprovider".ResourceLimiter, informers.SharedInformerFactory)
        want ("k8s.io/autoscaler/cluster-autoscaler/config".AutoscalingOptions, "k8s.io/autoscaler/cluster-autoscaler/cloudprovider".NodeGroupDiscoveryOptions, *"k8s.io/autoscaler/cluster-autoscaler/cloudprovider".ResourceLimiter)

How to reproduce it (as minimally and precisely as possible):

run the following

go build --tags aws -o ./cluster-autoscaler-amd64 

Anything else we need to know?:

pr #5820 added an argument to the buildCloudProvider function, when building for all tags or kwok the build works fine, but when specifying a provider which has not implemented the builder change then the error listed above happens on build.

this is fairly easy to fix, but requires updating many of the builder files. an example fix can be seen in #6491

providers that need fixing:

  • alicloud
  • aws
  • azure
  • baiducloud
  • bizflycloud
  • brightbox
  • cherry
  • civo
  • cloudstack
  • digitalocean
  • exoscale
  • externalgrpc
  • gce
  • hetzner
  • huaweicloud
  • ionoscloud
  • kamatera
  • kubemark
  • linode
  • magnum
  • oci
  • ovhcloud
  • equinixmetal
  • rancher
  • scaleway
  • tencentcloud
  • volcengine
  • vultr

elmiko avatar Jan 31 '24 20:01 elmiko

/good-first-issue /help-wanted

elmiko avatar Jan 31 '24 20:01 elmiko

@elmiko: This request has been marked as suitable for new contributors.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-good-first-issue command.

In response to this:

/good-first-issue /help-wanted

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.

k8s-ci-robot avatar Jan 31 '24 20:01 k8s-ci-robot

Thanks, @elmiko for highlighting this issue. /triage accepted

Shubham82 avatar Feb 01 '24 07:02 Shubham82

I would like to work on it. /assign

Shubham82 avatar Feb 01 '24 07:02 Shubham82

Fixed it here: #6494

Shubham82 avatar Feb 01 '24 11:02 Shubham82

Fixed it here: #6494

Hi @elmiko, It will be good if we cherry-pick this fix to the previous release(releases after this PR #5820). what do you think about this?

Shubham82 avatar Feb 02 '24 06:02 Shubham82

@Shubham82 probably a good idea, although the breaking change only came in recently so i would double check to see how far we need to backport.

elmiko avatar Feb 05 '24 14:02 elmiko

I checked these changes were merged in CA 1.29, before CA 1.29 go build command --tag is working fine. We have to backport these changes to the cluster-autoscaler-release-1.29 branch.

I will raise a PR for it once PR #6494 is merged.

Shubham82 avatar Feb 19 '24 11:02 Shubham82

thanks @Shubham82 !

elmiko avatar Feb 19 '24 14:02 elmiko

I checked these changes were merged in CA 1.29, before CA 1.29 go build command --tag is working fine. We have to backport these changes to the cluster-autoscaler-release-1.29 branch.

I will raise a PR for it once PR #6494 is merged.

I have opened PR #6590 to backport the changes to the cluster-autoscaler-release-1.29 branch.

Shubham82 avatar Mar 06 '24 12:03 Shubham82

closing this issue, as corresponding PRs are merged.

Shubham82 avatar Mar 20 '24 07:03 Shubham82

/close

Shubham82 avatar Mar 20 '24 07:03 Shubham82

@Shubham82: Closing this issue.

In response to this:

/close

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.

k8s-ci-robot avatar Mar 20 '24 07:03 k8s-ci-robot