Skip to content

Commit

Permalink
Minor logging change to executor_serial
Browse files Browse the repository at this point in the history
  • Loading branch information
bowei committed Nov 3, 2023
1 parent 9039713 commit d8d06a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/cloud/rgraph/exec/executor_serial.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"time"

"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud"
"k8s.io/klog/v2"
)

// NewSerialExecutor returns a new Executor that runs tasks single-threaded.
Expand Down Expand Up @@ -78,6 +79,8 @@ func (ex *serialExecutor) Run(ctx context.Context, c cloud.Cloud) (*Result, erro
}

func (ex *serialExecutor) runAction(ctx context.Context, c cloud.Cloud, a Action) error {
klog.Infof("runAction %s", a)

te := &TraceEntry{
Action: a,
Start: time.Now(),
Expand All @@ -92,7 +95,7 @@ func (ex *serialExecutor) runAction(ctx context.Context, c cloud.Cloud, a Action
switch ex.config.ErrorStrategy {
case ContinueOnError:
case StopOnError:
return fmt.Errorf("serialExecutor: stopping execution (got %v)", runErr)
return fmt.Errorf("serialExecutor: stopping execution for Action %s (got %v)", a, runErr)
default:
return fmt.Errorf("serialExecutor: invalid ErrorStrategy %q", ex.config.ErrorStrategy)
}
Expand Down

0 comments on commit d8d06a2

Please sign in to comment.