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

 ##########
 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:
   Yeah it is created beforehand. But build.Status is then reinitialized and 
currently it is not setting up the `Failure` field. Not sure whether 
[this](https://github.com/apache/camel-k/blob/master/pkg/controller/build/recovery.go#L98)
 is actually needed or not.

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