jamesnetherton opened a new issue #804: Nil pointer on build failure recovery URL: https://github.com/apache/camel-k/issues/804 I wanted to simulate a build failure so I did: ``` $ kamel run --dependency=camel-foobar examples/hello.xml ``` Which made the operator crash: ``` panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x12c9b56] goroutine 412 [running]: k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0) /home/james/go/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:58 +0x108 panic(0x1490540, 0x245c110) /usr/share/go/src/runtime/panic.go:513 +0x1b9 github.com/apache/camel-k/pkg/controller/build.(*errorRecoveryAction).Handle(0xc0005b8500, 0x182ae60, 0xc000042028, 0xc000638480, 0xc00089dc58, 0x1, 0x1) /home/james/go/src/github.com/apache/camel-k/pkg/controller/build/recovery.go:100 +0x346 github.com/apache/camel-k/pkg/controller/build.(*ReconcileBuild).Reconcile(0xc000100a80, 0xc00079aca0, 0x9, 0xc000ad4f40, 0x18, 0x24714a0, 0x0, 0x0, 0x0) /home/james/go/src/github.com/apache/camel-k/pkg/controller/build/build_controller.go:188 +0x888 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc000317900, 0x0) /home/james/go/src/github.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:215 +0x18f sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1() /home/james/go/src/github.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158 +0x36 k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc00034a0a0) /home/james/go/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 +0x54 k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc00034a0a0, 0x3b9aca00, 0x0, 0x1, 0xc0005a03c0) /home/james/go/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134 +0xbe k8s.io/apimachinery/pkg/util/wait.Until(0xc00034a0a0, 0x3b9aca00, 0xc0005a03c0) /home/james/go/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start /home/james/go/src/github.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157 +0x32a ``` [This](https://github.com/apache/camel-k/blob/master/pkg/controller/build/recovery.go#L100) seems to be the problem. `build.Status.Failure` wont have been initialized at this point.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
