This is an automated email from the ASF dual-hosted git repository.

astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit bf8e1462a4e2d4af6fa0952f90667129b5535696
Author: Antonin Stefanutti <[email protected]>
AuthorDate: Tue Dec 17 12:21:37 2019 +0100

    chore(build): Directly return when initializing recovery status
---
 pkg/controller/build/recovery.go | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/pkg/controller/build/recovery.go b/pkg/controller/build/recovery.go
index 1d8d7a9..cf2dc7e 100644
--- a/pkg/controller/build/recovery.go
+++ b/pkg/controller/build/recovery.go
@@ -21,10 +21,11 @@ import (
        "context"
        "time"
 
+       "github.com/jpillora/backoff"
+
        metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
        "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
-       "github.com/jpillora/backoff"
 )
 
 // NewErrorRecoveryAction creates a new error recovering handling action for 
the build
@@ -63,11 +64,7 @@ func (action *errorRecoveryAction) Handle(ctx 
context.Context, build *v1alpha1.B
                                AttemptMax: 5,
                        },
                }
-       }
-
-       err := action.client.Status().Update(ctx, build)
-       if err != nil {
-               return nil, err
+               return build, nil
        }
 
        if build.Status.Failure.Recovery.Attempt >= 
build.Status.Failure.Recovery.AttemptMax {

Reply via email to