π Description
controllers/controller.go, GetSlice (line 51β63) returns the raw error from c.Get(...) including IsNotFound errors. Callers in slicegateway/reconciler.go (line 122β131) handle slice == nil as the not-found case, but GetSlice never returns (nil, nil) β it only returns (nil, err). The slice == nil branch is dead code; a not-found Get call returns (nil, NotFoundError), which takes the error path, not the slice == nil path.
π Reproduction steps
- Call
GetSlice when the slice doesn't exist yet.
- Observe
(nil, &NotFoundError{}) β the slice == nil + RequeueAfter: 10*time.Second path in the slicegateway reconciler is never taken.
π Expected behavior
GetSlice should return (nil, nil) on IsNotFound so callers can distinguish "not found" from "API error".
π Actual Behavior
NotFound errors propagate as real errors, causing the slicegateway reconciler to return an error rather than a graceful requeue.
π Relevant log output
Version
No response
π₯οΈ What operating system are you seeing the problem on?
No response
β
Proposed Solution
Add if errors.IsNotFound(err) { return nil, nil } in GetSlice.
π Have you spent some time to check if this issue has been raised before?
Code of Conduct
π Description
controllers/controller.go,GetSlice(line 51β63) returns the raw error fromc.Get(...)includingIsNotFounderrors. Callers inslicegateway/reconciler.go(line 122β131) handleslice == nilas the not-found case, butGetSlicenever returns(nil, nil)β it only returns(nil, err). Theslice == nilbranch is dead code; a not-found Get call returns(nil, NotFoundError), which takes the error path, not theslice == nilpath.π Reproduction steps
GetSlicewhen the slice doesn't exist yet.(nil, &NotFoundError{})β theslice == nil+RequeueAfter: 10*time.Secondpath in the slicegateway reconciler is never taken.π Expected behavior
GetSliceshould return(nil, nil)onIsNotFoundso callers can distinguish "not found" from "API error".π Actual Behavior
NotFound errors propagate as real errors, causing the slicegateway reconciler to return an error rather than a graceful requeue.
π Relevant log output
Version
No response
π₯οΈ What operating system are you seeing the problem on?
No response
β Proposed Solution
Add
if errors.IsNotFound(err) { return nil, nil }inGetSlice.π Have you spent some time to check if this issue has been raised before?
Code of Conduct