Skip to content

Commit

Permalink
Modify code stype
Browse files Browse the repository at this point in the history
Signed-off-by: paradox <[email protected]>
  • Loading branch information
13241308289 authored and paradox committed Mar 4, 2024
1 parent a483eec commit 6a175de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/metrics/job_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ func (m *JobMetrics) RestartInc() {

func (m *JobMetrics) JobStatusMetrics(job metav1.Object, status v1.JobStatus) {
for _, condition := range status.Conditions {
value, ok := v1.JobConditionTypeValueMap[condition.Type]
if !ok {
continue

Check warning on line 156 in pkg/metrics/job_metrics.go

View check run for this annotation

Codecov / codecov/patch

pkg/metrics/job_metrics.go#L154-L156

Added lines #L154 - L156 were not covered by tests
}
if condition.Status == corev1.ConditionTrue {
value, ok := v1.JobConditionTypeValueMap[condition.Type]
if !ok {
continue
}
m.jobStatus.With(prometheus.Labels{
"kind": m.kind,
"name": job.GetName(),
Expand Down

0 comments on commit 6a175de

Please sign in to comment.