Skip to content

Commit

Permalink
Use unused scaledJobErrors
Browse files Browse the repository at this point in the history
Signed-off-by: Yoon Park <[email protected]>
  • Loading branch information
yoongon committed Aug 26, 2023
1 parent 0c85b6d commit e571d99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/prommetrics/prommetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ func init() {
metrics.Registry.MustRegister(scalerActive)
metrics.Registry.MustRegister(scalerErrors)
metrics.Registry.MustRegister(scaledObjectErrors)
metrics.Registry.MustRegister(scaledJobErrors)

metrics.Registry.MustRegister(triggerTotalsGaugeVec)
metrics.Registry.MustRegister(crdTotalsGaugeVec)
Expand Down Expand Up @@ -224,7 +225,7 @@ func RecordScaledJobError(namespace string, scaledJob string, err error) {
return
}
// initialize metric with 0 if not already set
_, errscaledjob := scaledObjectErrors.GetMetricWith(labels)
_, errscaledjob := scaledJobErrors.GetMetricWith(labels)
if errscaledjob != nil {
log.Error(err, "Unable to write to metrics to Prometheus Server: %v")
return
Expand Down
2 changes: 1 addition & 1 deletion pkg/scaling/scale_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ func TestCheckScaledObjectScalersWithError(t *testing.T) {
assert.Equal(t, true, isError)
}

func TestCheckScaledObjectFindFirstActiveNotIgnoreOthers(t *testing.T) {
func TestCheckvaObjectFindFirstActiveNotIgnoreOthers(t *testing.T) {
ctrl := gomock.NewController(t)
mockClient := mock_client.NewMockClient(ctrl)
mockExecutor := mock_executor.NewMockScaleExecutor(ctrl)
Expand Down

0 comments on commit e571d99

Please sign in to comment.