Skip to content
Snippets Groups Projects
Unverified Commit 41ba5e9b authored by Steve Azzopardi's avatar Steve Azzopardi
Browse files

Update logging for processing multi runner

We are logging the same thing twice at a different level, change it so
that it is only logged once where we call `processRunner` at an error
level with the executor information.
parent 19f454ae
No related branches found
No related tags found
No related merge requests found
...@@ -146,11 +146,6 @@ func (mr *RunCommand) processRunner(id int, runner *common.RunnerConfig, runners ...@@ -146,11 +146,6 @@ func (mr *RunCommand) processRunner(id int, runner *common.RunnerConfig, runners
executorData, releaseFn, err := mr.acquireRunnerResources(provider, runner) executorData, releaseFn, err := mr.acquireRunnerResources(provider, runner)
if err != nil { if err != nil {
mr.log().WithFields(logrus.Fields{
"runner": runner.ShortDescription(),
"executor": runner.Executor,
}).WithError(err).
Warn("Failed to acquire runner resource")
return return
} }
defer releaseFn() defer releaseFn()
...@@ -262,7 +257,11 @@ func (mr *RunCommand) processRunners(id int, stopWorker chan bool, runners chan ...@@ -262,7 +257,11 @@ func (mr *RunCommand) processRunners(id int, stopWorker chan bool, runners chan
case runner := <-runners: case runner := <-runners:
err := mr.processRunner(id, runner, runners) err := mr.processRunner(id, runner, runners)
if err != nil { if err != nil {
logrus.WithError(err).Error("Failed to process runner") mr.log().WithFields(logrus.Fields{
"runner": runner.ShortDescription(),
"executor": runner.Executor,
}).WithError(err).
Error("Failed to process runner")
} }
// force GC cycle after processing build // force GC cycle after processing build
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment