Failure reason `job_canceled` can be sent to Rails, which fails with a 500 error
As seen in gitlab#297272 (closed) (triggered by a production paging incident gitlab-com/gl-infra/production#3360 (closed)), under some (unknown as yet) circumstances the runner can do a PUT to /api/v4/jobs/:id with a failure_reason
of job_canceled
, which fails (HTTP 500 error) because https://gitlab.com/gitlab-org/gitlab/blob/master/app/models/concerns/enums/ci/commit_status.rb does not have an integer mapping for that status, which is probably reasonable given the runner code says that job_canceled
is internal only:
https://gitlab.com/gitlab-org/gitlab-runner/blob/master/common/network.go#L31-32
https://sentry.gitlab.net/gitlab/gitlabcom/issues/2437130/?referrer=gitlab_plugin suggests it doesn't happen often, but does come in bursts.