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

cluster autoscaler provider build tags broken for several providers #6492

Closed
elmiko opened this issue Jan 31, 2024 · 13 comments
Closed

cluster autoscaler provider build tags broken for several providers #6492

elmiko opened this issue Jan 31, 2024 · 13 comments
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@elmiko
Copy link
Contributor

elmiko commented Jan 31, 2024

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 elmiko added the kind/bug Categorizes issue or PR as related to a bug. label Jan 31, 2024
@elmiko
Copy link
Contributor Author

elmiko commented Jan 31, 2024

/good-first-issue
/help-wanted

@k8s-ci-robot
Copy link
Contributor

@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 k8s-ci-robot added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Jan 31, 2024
@Shubham82
Copy link
Contributor

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

@k8s-ci-robot k8s-ci-robot added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Feb 1, 2024
@Shubham82
Copy link
Contributor

I would like to work on it.
/assign

@Shubham82
Copy link
Contributor

Fixed it here: #6494

@Shubham82
Copy link
Contributor

Shubham82 commented Feb 2, 2024

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?

@elmiko
Copy link
Contributor Author

elmiko commented Feb 5, 2024

@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.

@Shubham82
Copy link
Contributor

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.

@elmiko
Copy link
Contributor Author

elmiko commented Feb 19, 2024

thanks @Shubham82 !

@Shubham82
Copy link
Contributor

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
Copy link
Contributor

closing this issue, as corresponding PRs are merged.

@Shubham82
Copy link
Contributor

/close

@k8s-ci-robot
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants