Commit cb005bb1 authored by GitLab Bot's avatar GitLab Bot

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-10-28

# Conflicts:
#	app/models/commit_status.rb

[ci skip]
parents 472aa1e0 04184b32
...@@ -52,8 +52,14 @@ class CommitStatus < ActiveRecord::Base ...@@ -52,8 +52,14 @@ 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,
<<<<<<< HEAD
stale_schedule: 7 stale_schedule: 7
}.merge(EE_FAILURE_REASONS) }.merge(EE_FAILURE_REASONS)
=======
stale_schedule: 7,
job_execution_timeout: 8
}
>>>>>>> upstream/master
## ##
# We still create some CommitStatuses outside of CreatePipelineService. # We still create some CommitStatuses outside of CreatePipelineService.
......
...@@ -8,7 +8,8 @@ class CommitStatusPresenter < Gitlab::View::Presenter::Delegated ...@@ -8,7 +8,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
......
...@@ -811,6 +811,15 @@ describe API::Runner, :clean_gitlab_redis_shared_state do ...@@ -811,6 +811,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