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

🐛 Bump controller-tools. #3793

Closed

Conversation

mneverov
Copy link
Member

@mneverov mneverov commented Feb 20, 2024

Bump controller-gen to fix NPE.
Fixes #3792.
Related to #3780.

I ran make generate but commented regenerating scaffold v2 because v2 uses ancient controller-tools v0.3.0 with incompatible features.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 20, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mneverov
Once this PR has been reviewed and has the lgtm label, please assign camilamacedo86 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@@ -34,7 +34,7 @@ const (
// ControllerRuntimeVersion is the kubernetes-sigs/controller-runtime version to be used in the project
ControllerRuntimeVersion = "v0.14.4"
// ControllerToolsVersion is the kubernetes-sigs/controller-tools version to be used in the project
ControllerToolsVersion = "v0.11.3"
ControllerToolsVersion = "v0.14.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not change go/v3. It is deprecated and will be soon no longer supported
More info: #3622
So can you please revert this one?
And ensure that the bump is done for go/v4 (default and latest stable version used in the tool)

Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that you should do the bump for go/v4 only
Then, run make generate to get the docs and samples update
Also, we should have only 1 commit per PR

So, can you please review the changes made?

@mneverov
Copy link
Member Author

mneverov commented Feb 20, 2024

Note that you should do the bump for go/v4 only

hi @camilamacedo86, go/v4 does already have proper controller version.
If v3 is obsolete then there is nothing to do. The workaround is not to use go v1.22 until go/v4 is released.
Should I close the PR?

@camilamacedo86
Copy link
Member

Hi @mneverov

hi @camilamacedo86, go/v4 does already have proper controller version.
If v3 is obsolete then there is nothing to do. The workaround is not to use go v1.22 until go/v4 is released.
Should I close the PR?

I will try to push a new release ASAP. Can you give me a couple of days?
Also, the next kubebuilder release will still not support go v1.22
Unless prior to that, we bump controller-runtime using v1.22, the go/v4 to use it as all places that now you can find 1.21.
PS.: You can check previous PRs to add support to go versions to know what we need to bump.

@camilamacedo86
Copy link
Member

Hi @mneverov

Sorry, now I checked this one.

Now, regarding support to go 1.22.

It is NOT supported yet by Kubebuilder.
Note that we support the versions which are scaffolded by default with the tool.
You can change as you please, but then we cannot ensure that things are still working since the changes will result in combinations not tested by us. See from the doc: https://book.kubebuilder.io/quick-start#versions-and-supportability

Screenshot 2024-02-21 at 17 43 07

What we need to do to support go 1.22

  • Wait for controller-runtime and controller-tools releases using go 1.22
  • Then, change the go plugin to scaffold go 1.22 and use it
  • Mainly replace all places across the project that have 1.21 with 1.22

Therefore, I am closing this one as deferred and I hope that the info provided clarifies why and you do not mind it.
Anyway, please feel free to re-open or open new issues/prs as you see fit.

Your help is very welcome.

Cheers,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for go 1.22
3 participants