Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Update to controller-tools 0.14.0 #374

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

pjonsson
Copy link
Contributor

This updates golang.org/x/tools to
a later version which fixes the crash
in kubernetes-sigs/controller-tools#880, which I believe is what is happening
on the current main branch in this
repository.

I'm really after the security fixes, so pick #373 if that smaller change is preferable to this.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 20, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @pjonsson. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 20, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 19, 2024
@pjonsson pjonsson force-pushed the update-controller-tools branch from ca6620b to 4518153 Compare August 12, 2024 13:24
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 12, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 11, 2024
@pjonsson
Copy link
Contributor Author

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Sep 11, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 10, 2024
@rjbez17
Copy link
Contributor

rjbez17 commented Jan 1, 2025

/ok-to-test
/lgtm

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 1, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 1, 2025
This updates golang.org/x/tools to
a later version which fixes the crash
in kubernetes-sigs/controller-tools#880,
which I believe is what is happening
on the current main branch in this
repository.
@pjonsson pjonsson force-pushed the update-controller-tools branch from 4518153 to 3bb90e5 Compare January 1, 2025 23:31
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 1, 2025
@pjonsson
Copy link
Contributor Author

pjonsson commented Jan 2, 2025

The build failure in the test is because controller-runtime is < v0.15.0 and some version of something in a dependency isn't updated yet. Controller-tools 0.15 should not have this problem, but my reading of the Compatibility section at https://pkg.go.dev/sigs.k8s.io/controller-tools#section-readme is that it requires Go 1.22.

@rjbez17 I know this project uses Go 1.20, do you have any advice?

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 1, 2025
@k8s-ci-robot k8s-ci-robot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Feb 1, 2025
@pjonsson
Copy link
Contributor Author

pjonsson commented Feb 2, 2025

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Feb 2, 2025
@rjbez17
Copy link
Contributor

rjbez17 commented Feb 28, 2025

If you wanted to take a stab at updating to go 1.22 I'd happily support that.

@pjonsson
Copy link
Contributor Author

@rjbez17 I don't really know Go, but let me get back to you on that next week. And Go 1.21 doesn't help us for this particular issue, but I'm guessing starting with that will be easier since it is a smaller change.

Can I get the CI to trigger without your explicit approval, or do I need to join the kubernetes-sigs to make that happen?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 28, 2025
@rjbez17
Copy link
Contributor

rjbez17 commented Feb 28, 2025

The ok-to-test label should trigger the tests now. You can use /test all in a comment as well

@rjbez17
Copy link
Contributor

rjbez17 commented Feb 28, 2025

And thanks for taking a look!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pjonsson
Once this PR has been reviewed and has the lgtm label, please ask for approval from rjbez17. For more information see the 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

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 1, 2025
@pjonsson pjonsson force-pushed the update-controller-tools branch 3 times, most recently from 2d9a0a4 to 25186fd Compare March 1, 2025 19:25
@pjonsson pjonsson mentioned this pull request Mar 1, 2025
@pjonsson
Copy link
Contributor Author

pjonsson commented Mar 1, 2025

@rjbez17 Considering I have no idea what I'm doing, I started with Go 1.21 in #406.

I will take a look at 1.22 tomorrow, but that seems more difficult, so if you believe the 1.21 PR works I suggest start with merging that.

Even if Go 1.21 and the latest main branch "just" fixes a few of the security issues that Trivy is complaining about, we're closing up on 2 years since the last release so it would be nice with a release sometime soonish too.

@rjbez17
Copy link
Contributor

rjbez17 commented Mar 2, 2025

@rjbez17 Considering I have no idea what I'm doing, I started with Go 1.21 in #406.

I will take a look at 1.22 tomorrow, but that seems more difficult, so if you believe the 1.21 PR works I suggest start with merging that.

Even if Go 1.21 and the latest main branch "just" fixes a few of the security issues that Trivy is complaining about, we're closing up on 2 years since the last release so it would be nice with a release sometime soonish too.

I agree and really appreciate your help here. Once we get this merged I'll try to find some time to time box a 1.22 upgrade and if not release a maintenance release within the next week or so.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 2, 2025
@pjonsson pjonsson force-pushed the update-controller-tools branch from 25186fd to 6fa484f Compare March 2, 2025 10:01
@pjonsson pjonsson force-pushed the update-controller-tools branch from 6fa484f to fbc9dd7 Compare March 2, 2025 10:05
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 2, 2025
pjonsson added 2 commits March 2, 2025 11:58
Bump the Go versions in various
files and run go mod tidy to clean
up things, Then update to
controller-tools 0.15 to fix
the segmentation fault when running
controller-gen.
Update K8S to 0.27.16
Update open-policy-agent/cert-controller to 0.8.0
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 2, 2025
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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-sigs/prow repository.

@k8s-ci-robot
Copy link
Contributor

@pjonsson: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-hnc-test e7f864a link true /test pull-hnc-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

@pjonsson pjonsson mentioned this pull request Mar 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants