-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Describe the bug
The RenderTask controller occasionally panics with a nil pointer dereference:
panic: runtime error: invalid memory address or nil pointer dereference recovered
This appears to happen during reconciliation when the namespace is being deleted.
To Reproduce
Steps to reproduce the behavior:
- Run controller tests with
make test testargs="-v ./pkg/controller/" - Observe intermittent panic with nil pointer dereference
Expected behavior
Controller should handle edge cases gracefully without panicking.
Investigation Needed
- Identify where in
rendertask_controller.gothe nil pointer access occurs - Determine if it's related to:
- Deleted objects being reconciled
- Missing object after namespace deletion
- Status updates on deleted resources
Additional context
Log example:
ERROR Reconciler error {"controller": "rendertask", "controllerGroup": "solar.opendefense.cloud", "controllerKind": "RenderTask", "RenderTask": {"name":"test-release-0","namespace":"testns-xxx"}, "namespace": "testns-xxx", "name": "test-release-0", "reconcileID": "...", "error": "panic: runtime error: invalid memory address or nil pointer dereference [recovered]"}