You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix conditionalDelete returning no success for undecodable objects in 1.37.0 rebase #4521
In the kcp-dev/kubernetes 1.37.0 rebase (PR kcp-dev/kubernetes#198, head 5ec79958933dfa6999e77eab9e90b691e26fbcd5), conditionalDelete in staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go (around lines 470-485) has the final return nil inside the if !expectTransformOrDecodeError { ... } block:
Upstream returns nil after that block, unconditionally. When ExpectTransformOrDecodeError is set (deleting a corrupt or undecodable object), the loop continues after OptimisticDelete has already succeeded. It then retries against a key that no longer exists, so the delete never returns success.
Move return nil out of the if, matching upstream, so a successful delete always returns.
Steps
Move return nil after the if !expectTransformOrDecodeError block in conditionalDelete in the kcp-dev/kubernetes 1.37.0 branch (or the patch in kcp-dev/kubernetes-patches).
Add or run a test that deletes a corrupt object with ExpectTransformOrDecodeError set and expects success.
Confirm the diff against upstream conditionalDelete is empty for this block.
Make sure the fix lands before kcp bumps to 1.37.0.
Activity