Skip to content

Commit 5983f7c

Browse files
authored
Merge pull request #43 from ActiDoo/codex/fix-syntax-errors-in-runner.go
Fix build regressions in orchestrator setup
2 parents 2f7face + 323401e commit 5983f7c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cmd/clusterrebootd/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"net/http"
1313
"os"
1414
"os/signal"
15+
"strconv"
1516
"strings"
1617
"syscall"
1718
"time"
@@ -209,12 +210,11 @@ func commandRunWithWriters(args []string, stdout, stderr io.Writer) int {
209210
reporter := orchestrator.NewStructuredReporter(cfg.NodeName, jsonLogger, metricsCollector)
210211

211212
runnerOptions := []orchestrator.Option{orchestrator.WithReporter(reporter)}
212-
runnerOptions = append(runnerOptions, orchestrator.WithCommandEnvironment(baseEnv))
213+
runnerOptions = append(runnerOptions, orchestrator.WithCommandEnvironment(baseEnv))
213214
if cooldownManager != nil {
214215
runnerOptions = append(runnerOptions, orchestrator.WithCooldownManager(cooldownManager))
215216
}
216217
runner, err := orchestrator.NewRunner(cfg, engine, healthRunner, locker, runnerOptions...)
217-
218218
if err != nil {
219219
fmt.Fprintf(stderr, "failed to initialise orchestrator: %v\n", err)
220220
return exitRunError

pkg/orchestrator/runner.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ func NewRunner(cfg *config.Config, detectors DetectorEvaluator, healthRunner Hea
257257
}
258258
if runner.cooldownWindow > 0 && runner.cooldown == nil {
259259
return nil, errors.New("cooldown interval configured but no cooldown manager provided")
260+
}
260261
if runner.commandEnv == nil {
261262
runner.commandEnv = cfg.BaseEnvironment()
262263
}

0 commit comments

Comments
 (0)