Upgrade k8s.io/* deps to v0.36.x#1504
Conversation
Signed-off-by: Andreas Fritzler <andreas.fritzler@sap.com>
k8s.io/* Dependencies to v0.36.xk8s.io/* deps to v0.36.x
📝 WalkthroughWalkthroughThis PR upgrades Go and Kubernetes-related dependencies, regenerates informer and OpenAPI code for v1.36, updates API reference links and envtest binary versions to 1.36.0, adjusts one SPDY transport call site, and changes one admission test to wait for eventual resource creation. ChangesKubernetes v0.36.x Dependency Upgrade
Estimated code review effort: 3 (Moderate) | ~30 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@client-go/informers/externalversions/factory.go`:
- Around line 163-164: The generated informer setup assumes InformerName is
always present, but the factory treats it as optional, so creation can panic
when WithInformerName is not used. Update the informer initialization path in
the factory and generated informer constructors to guard options.InformerName
before calling WithResource, either by setting a safe default InformerName
earlier in the factory setup or by skipping the metrics wiring when it is nil.
Use the existing Factory and InformerName usage sites to keep the fix consistent
across all generated informers.
In `@client-go/informers/externalversions/ipam/v1alpha1/prefix.go`:
- Around line 53-55: The informer identity in NewPrefixInformerWithOptions is
built from a गलत GVR resource name, so update the GroupVersionResource used for
the Prefix informer from the current singular-plural typo to the correct API
plural. Make sure the gvr value in NewPrefixInformerWithOptions matches the
typed client and generic informer resource name, and keep the rest of the
informer setup unchanged.
In `@client-go/informers/externalversions/storage/v1alpha1/volumeclass.go`:
- Around line 52-54: The VolumeClass informer is using the wrong
GroupVersionResource resource name, which breaks the informer Identifier lookup.
Update NewVolumeClassInformerWithOptions so the schema.GroupVersionResource for
the VolumeClass resource uses the correct plural name, and keep the identifier
generation via options.InformerName.WithResource(gvr) aligned with the typed
client and generic informer map.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9f1771e6-37e2-4d23-908b-dfe29d20b139
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (44)
Makefilebroker/bucketbroker/server/server_suite_test.gobroker/machinebroker/server/server_suite_test.gobroker/volumebroker/server/server_suite_test.goclient-go/informers/externalversions/compute/v1alpha1/machine.goclient-go/informers/externalversions/compute/v1alpha1/machineclass.goclient-go/informers/externalversions/compute/v1alpha1/machinepool.goclient-go/informers/externalversions/core/v1alpha1/resourcequota.goclient-go/informers/externalversions/factory.goclient-go/informers/externalversions/internalinterfaces/factory_interfaces.goclient-go/informers/externalversions/ipam/v1alpha1/prefix.goclient-go/informers/externalversions/ipam/v1alpha1/prefixallocation.goclient-go/informers/externalversions/networking/v1alpha1/loadbalancer.goclient-go/informers/externalversions/networking/v1alpha1/loadbalancerrouting.goclient-go/informers/externalversions/networking/v1alpha1/natgateway.goclient-go/informers/externalversions/networking/v1alpha1/network.goclient-go/informers/externalversions/networking/v1alpha1/networkinterface.goclient-go/informers/externalversions/networking/v1alpha1/networkpolicy.goclient-go/informers/externalversions/networking/v1alpha1/virtualip.goclient-go/informers/externalversions/storage/v1alpha1/bucket.goclient-go/informers/externalversions/storage/v1alpha1/bucketclass.goclient-go/informers/externalversions/storage/v1alpha1/bucketpool.goclient-go/informers/externalversions/storage/v1alpha1/volume.goclient-go/informers/externalversions/storage/v1alpha1/volumeclass.goclient-go/informers/externalversions/storage/v1alpha1/volumepool.goclient-go/informers/externalversions/storage/v1alpha1/volumesnapshot.goclient-go/ironcore/versioned/fake/clientset_generated.goclient-go/openapi/zz_generated.openapi.godocs/api-reference/compute.mddocs/api-reference/core.mddocs/api-reference/ipam.mddocs/api-reference/networking.mddocs/api-reference/storage.mdgo.modhack/api-reference/config.jsoninternal/controllers/compute/suite_test.gointernal/controllers/core/core_suite_test.gointernal/controllers/ipam/suite_test.gointernal/controllers/networking/suite_test.gointernal/controllers/storage/suite_test.goirictl-machine/cmd/irictl-machine/irictlmachine/exec/exec.gopoollet/bucketpoollet/controllers/controllers_suite_test.gopoollet/machinepoollet/controllers/controllers_suite_test.gopoollet/volumepoollet/controllers/controllers_suite_test.go
Signed-off-by: Andreas Fritzler <andreas.fritzler@sap.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
internal/admission/plugin/volumeresizepolicy/admission_test.go (1)
42-44: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low valueConsider tolerating
AlreadyExistsin the retry loop.If
Createsucceeds server-side but returns a transient error before the client observes success, a retry with the same fixed object name would fail withAlreadyExists, causingEventuallyto keep polling until the 30s timeout instead of recovering. TreatingAlreadyExistsas success would make the retry more robust.♻️ Optional hardening
Eventually(func() error { - return k8sClient.Create(ctx, volumeClassExpandOnly) + err := k8sClient.Create(ctx, volumeClassExpandOnly) + if apierrors.IsAlreadyExists(err) { + return nil + } + return err }).WithTimeout(30 * time.Second).WithPolling(pollingInterval).Should(Succeed())Also applies to: 60-62
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/admission/plugin/volumeresizepolicy/admission_test.go` around lines 42 - 44, The retry loop around k8sClient.Create for volumeClassExpandOnly should tolerate AlreadyExists as a successful outcome instead of treating it as a hard failure. Update the Eventually callback to recognize that a retry after a transient client-side error may hit the same fixed object name and receive AlreadyExists, and return success in that case. Apply the same handling in the other Create retry block referenced by the duplicate comment so both test setups use the same robust behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@internal/admission/plugin/volumeresizepolicy/admission_test.go`:
- Around line 42-44: The retry loop around k8sClient.Create for
volumeClassExpandOnly should tolerate AlreadyExists as a successful outcome
instead of treating it as a hard failure. Update the Eventually callback to
recognize that a retry after a transient client-side error may hit the same
fixed object name and receive AlreadyExists, and return success in that case.
Apply the same handling in the other Create retry block referenced by the
duplicate comment so both test setups use the same robust behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 449b7920-f5e0-4ccc-9c63-e02b0b41d1ae
📒 Files selected for processing (1)
internal/admission/plugin/volumeresizepolicy/admission_test.go
|
Waiting for #1505 to land to fix the sporadics. |
Proposed Changes
Upgrade
k8s.io/*Dependencies to v0.36.x.Fixes #1503
Summary by CodeRabbit
MachineguestConfig.