Skip to content

Commit e408814

Browse files
authored
Upgrade controller-gen to address panics from go generate directive (#2167)
Summary: Upgrade controller-gen to address panics from go generate directive Our go upgrade to 1.24 caused our controller-gen's `go generate` directive to start failing. This is because the `trivialVersions` setting of controller-gen was removed. From searching the controller-gen issues, I believe Go 1.22 and later hits this problem for controller-gen versions < v0.14 (kubernetes-sigs/controller-tools#888 (comment)) The `pr-genfiles` GitHub action that runs our go generates does not trigger on `go.mod` or `go.sum` changes, so this was missed when Go was upgraded. I'm not too familiar with controller-gen and the generated file changes are minor, but please let me know if this requires more extensive testing. If there were larger CRD changes, I would expect that it would require testing on different k8s versions with an operator release build. I don't think this change warrants it, but please advise if you feel differently. Relevant Issues: N/A Type of change: /kind bugfix Test Plan: Inspected generated file changes - [x] `px.dev_viziers.yaml`: Description changes are all whitespace changes and appear equivalent - [x] `px.dev_viziers.yaml`: CRD top level `status` field was removed. I don't believe our operator code uses this nor did I see any reference from k8s release notes on this deprecation - [x] Removal of `// +build !ignore_autogenerated` -- this is an older syntax from controller-gen's pre Go 1.17 usage --------- Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent abe7238 commit e408814

File tree

6 files changed

+117
-115
lines changed

6 files changed

+117
-115
lines changed

docker.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DOCKER_IMAGE_TAG=202504121153
2-
LINTER_IMAGE_DIGEST=ff369d95c4c84c95b668498219fda60ff8126828839171262f2eee58bd95ce19
3-
DEV_IMAGE_DIGEST=91e7fb85e0497340df5efaf035b65d98eab458908f852a782aeeb5ea0b69b5c9
4-
DEV_IMAGE_WITH_EXTRAS_DIGEST=f90e8b9b69d5870a7115ad434388da7bcef05f4a6c47e937a5a6348a22613ab4
1+
DOCKER_IMAGE_TAG=202504142133
2+
LINTER_IMAGE_DIGEST=0129dd524203f95a25f4343ec4499919db4434752375624a4cdbd51d463acdaf
3+
DEV_IMAGE_DIGEST=f669bf0bc9db3ce03a48365a41e87de1a8e3e9be01bc5a1e10816412c671665e
4+
DEV_IMAGE_WITH_EXTRAS_DIGEST=65535207f2fb805d45bb7997cf0a71abbd756cf8763db02c57838f8ee18f0c66

0 commit comments

Comments
 (0)