Skip to content

Commit

Permalink
add JobRunPreemptedError case (#3380)
Browse files Browse the repository at this point in the history
Signed-off-by: Mohamed Abdelfatah <mohamedabdelfatah2027@gmail.com>
  • Loading branch information
Mo-Fatah authored Feb 7, 2024
1 parent 9b85c5b commit ec78ea2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/scheduler/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const (
podError = "podError"
podLeaseReturned = "podLeaseReturned"
podTerminated = "podTerminated"
jobRunPreempted = "jobRunPreempted"

queued = "queued"
cancelled = "cancelled"
Expand Down Expand Up @@ -363,6 +364,8 @@ func errorTypeAndMessageFromError(ctx *armadacontext.Context, err *armadaevents.
return podLeaseReturned, reason.PodLeaseReturned.Message
case *armadaevents.Error_PodTerminated:
return podTerminated, reason.PodTerminated.Message
case *armadaevents.Error_JobRunPreemptedError:
return jobRunPreempted, ""
default:
ctx.Warnf("omitting name and message for unknown error type %T", err.Reason)
return "", ""
Expand Down

0 comments on commit ec78ea2

Please sign in to comment.