Skip to content

Commit 28d22f7

Browse files
fix: check and report error on loading the check runners
1 parent 3adf812 commit 28d22f7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

policy/handler.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ func NewPolicyHandler(config HandlerConfig) (*Handler, error) {
137137
state: StateIdle,
138138
}
139139

140-
h.loadCheckRunners()
140+
err := h.loadCheckRunners()
141+
if err != nil {
142+
return nil, fmt.Errorf("unable to load the checks for the handler: %w", err)
143+
}
141144

142145
currentStatus, err := h.runTargetStatus()
143146
if err != nil {

policy/handler_oss.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import (
1414

1515
type HistoricalAPMGetter interface{}
1616

17-
type noopHistoricalAPMGetter struct{}
18-
1917
type noopVerticalCheckRunner struct {
2018
policy *sdk.ScalingPolicy
2119
}

0 commit comments

Comments
 (0)