Commit 4611a599 authored by Shinya Maeda's avatar Shinya Maeda Committed by Kamil Trzciński

Add failure reason for execution timeout

parent 8a116be4
...@@ -50,7 +50,8 @@ class CommitStatus < ActiveRecord::Base ...@@ -50,7 +50,8 @@ class CommitStatus < ActiveRecord::Base
runner_system_failure: 4, runner_system_failure: 4,
missing_dependency_failure: 5, missing_dependency_failure: 5,
runner_unsupported: 6, runner_unsupported: 6,
stale_schedule: 7 stale_schedule: 7,
job_execution_timeout: 8
} }
## ##
......
...@@ -9,7 +9,8 @@ class CommitStatusPresenter < Gitlab::View::Presenter::Delegated ...@@ -9,7 +9,8 @@ class CommitStatusPresenter < Gitlab::View::Presenter::Delegated
runner_system_failure: 'There has been a runner system failure, please try again', runner_system_failure: 'There has been a runner system failure, please try again',
missing_dependency_failure: 'There has been a missing dependency failure', missing_dependency_failure: 'There has been a missing dependency failure',
runner_unsupported: 'Your runner is outdated, please upgrade your runner', runner_unsupported: 'Your runner is outdated, please upgrade your runner',
stale_schedule: 'Delayed job could not be executed by some reason, please try again' stale_schedule: 'Delayed job could not be executed by some reason, please try again',
job_execution_timeout: 'The script exceeded the maximum execution time set for the job'
}.freeze }.freeze
private_constant :CALLOUT_FAILURE_MESSAGES private_constant :CALLOUT_FAILURE_MESSAGES
......
---
title: Add failure reason for execution timeout
merge_request: 22224
author:
type: changed
...@@ -11,7 +11,8 @@ module Gitlab ...@@ -11,7 +11,8 @@ module Gitlab
runner_system_failure: 'runner system failure', runner_system_failure: 'runner system failure',
missing_dependency_failure: 'missing dependency failure', missing_dependency_failure: 'missing dependency failure',
runner_unsupported: 'unsupported runner', runner_unsupported: 'unsupported runner',
stale_schedule: 'stale schedule' stale_schedule: 'stale schedule',
job_execution_timeout: 'job execution timeout'
}.freeze }.freeze
private_constant :REASONS private_constant :REASONS
......
...@@ -806,6 +806,15 @@ describe API::Runner, :clean_gitlab_redis_shared_state do ...@@ -806,6 +806,15 @@ describe API::Runner, :clean_gitlab_redis_shared_state do
it { expect(job).to be_unknown_failure } it { expect(job).to be_unknown_failure }
end end
context 'when failure_reason is job_execution_timeout' do
before do
update_job(state: 'failed', failure_reason: 'job_execution_timeout')
job.reload
end
it { expect(job).to be_job_execution_timeout }
end
end end
context 'when trace is given' do context 'when trace is given' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment