lburgazzoli commented on a change in pull request #805: fix: Nil pointer on 
build failure recovery
URL: https://github.com/apache/camel-k/pull/805#discussion_r300324114
 
 

 ##########
 File path: pkg/controller/build/recovery.go
 ##########
 @@ -95,7 +95,9 @@ func (action *errorRecoveryAction) Handle(ctx 
context.Context, build *v1alpha1.B
                return nil, nil
        }
 
-       build.Status = v1alpha1.BuildStatus{}
+       build.Status = v1alpha1.BuildStatus{
+               Failure: build.Status.Failure.DeepCopy(),
+       }
 
 Review comment:
   Looks strange as this struct should have been created 
[here](https://github.com/apache/camel-k/blob/b0471ff5a39f228abbc7f1a26d5bb0de844cd91e/pkg/controller/build/recovery.go#L65),
 looking at the code there is a suspicious status 
[update](https://github.com/apache/camel-k/blob/b0471ff5a39f228abbc7f1a26d5bb0de844cd91e/pkg/controller/build/recovery.go#L76)
 that should not be there as the update is performed by the controller.

----------------------------------------------------------------
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

Reply via email to