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

check for tool version in makefile and not just its existence #6173

Closed
coriaedu opened this issue Nov 14, 2022 · 5 comments
Closed

check for tool version in makefile and not just its existence #6173

coriaedu opened this issue Nov 14, 2022 · 5 comments
Labels
language/go Issue is related to a Go operator project
Milestone

Comments

@coriaedu
Copy link

Feature Request

Describe the problem you need a feature to resolve.

I have an issue after upgrading OSDK version for my operator.

The Makefile has two targets that will download controller-gen and kustomize tools, with the versions corresponding to CONTROLLER_TOOLS_VERSION and KUSTOMIZE_VERSION vars.
The recipes there are currently checking for file existence before installing the tool, but they don't confirm the version.

In my scenario, where I am upgrading the OSDK, I found this issue with the current script:

  • checkout clean branch with OSDK 1.24.0
  • Run make controller-gen -> This will download controller-gen v0.9.2 at $(LOCALBIN)
  • upgrade OSDK to 1.25.1
  • Run any command that uses controller-gen thinking that v0.10.0 will be used, but it is still running 0.9.2

The same thing applies when I switch branches that have different OSDK versions

This applies to kustomize also.

Describe the solution you'd like.

I'd like the controller-gen and kustomize targets to check for version so we ensure that it matches the corresponding VERSION var.

/language go

@openshift-ci openshift-ci bot added the language/go Issue is related to a Go operator project label Nov 14, 2022
@everettraven
Copy link
Contributor

@coriaedu Thanks for raising this issue! I think that this would be great functionality to add.

Since this is related to Go operators, I would recommend also opening an issue in Kubebuilder that references this issue. Operator-SDK uses the Go plugin from Kubebuilder for scaffolding Go operator projects so the change would need to be made in the Makefile template in the Kubebuilder Go plugin.

@coriaedu
Copy link
Author

Thank you @everettraven , I opened kubernetes-sigs/kubebuilder#3068 and am going through the step to become a collaborator for that repo so I can hopefully provide the fix along with the issue :)

Should we close this?

@everettraven
Copy link
Contributor

@coriaedu If you would like we can close this issue. During our community meeting yesterday I advocated for keeping it open because I feel like this would be a nice addition. Keeping it open would help sdk maintainers with tracking this (many of the operator-sdk maintainers are also contributors to Kubebuilder but may not actively pay attention to those issues).

@coriaedu
Copy link
Author

Ok, I'd say we leave it open until the kubernetes-sigs/kubebuilder#3068 is addressed 🤞

Thanks!

@coriaedu
Copy link
Author

closed kubernetes-sigs/kubebuilder#3068

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language/go Issue is related to a Go operator project
Projects
None yet
Development

No branches or pull requests

3 participants