Skip to content

Commit

Permalink
Map exact value provided but update value to match the correct casing
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjjaramillo committed Apr 14, 2023
1 parent 2990fd5 commit d9572ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions internal/store/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package store
import (
"context"
"strconv"
"strings"

basemetrics "k8s.io/component-base/metrics"

Expand Down Expand Up @@ -430,5 +429,5 @@ func failureReason(jc *v1batch.JobCondition, reason string) bool {
if jc == nil {
return false
}
return strings.EqualFold(jc.Reason, reason)
return jc.Reason == reason
}
2 changes: 1 addition & 1 deletion internal/store/job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func TestJobStore(t *testing.T) {
kube_job_status_active{job_name="FailedJob1",namespace="ns1"} 0
kube_job_status_completion_time{job_name="FailedJob1",namespace="ns1"} 1.495810807e+09
kube_job_status_failed{job_name="FailedJob1",namespace="ns1",reason="BackoffLimitExceeded"} 1
kube_job_status_failed{job_name="FailedJob1",namespace="ns1",reason="DeadLineExceeded"} 0
kube_job_status_failed{job_name="FailedJob1",namespace="ns1",reason="DeadlineExceeded"} 0
kube_job_status_failed{job_name="FailedJob1",namespace="ns1",reason="Evicted"} 0
kube_job_status_start_time{job_name="FailedJob1",namespace="ns1"} 1.495807207e+09
kube_job_status_succeeded{job_name="FailedJob1",namespace="ns1"} 0
Expand Down

0 comments on commit d9572ac

Please sign in to comment.