From 8bc065e02dcc4582aebbc7d28a30f7468a15ccc0 Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Tue, 2 Oct 2018 13:32:35 +0900 Subject: [PATCH] Rename failure reason to stale_schedule --- app/models/commit_status.rb | 2 +- app/presenters/commit_status_presenter.rb | 2 +- app/workers/stuck_ci_jobs_worker.rb | 2 +- lib/gitlab/ci/status/build/failed.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 2020dd637a0..06507345fe8 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -50,7 +50,7 @@ class CommitStatus < ActiveRecord::Base runner_system_failure: 4, missing_dependency_failure: 5, runner_unsupported: 6, - schedule_expired: 7 + stale_schedule: 7 } ## diff --git a/app/presenters/commit_status_presenter.rb b/app/presenters/commit_status_presenter.rb index b2b9fb55cba..29eaad759bb 100644 --- a/app/presenters/commit_status_presenter.rb +++ b/app/presenters/commit_status_presenter.rb @@ -9,7 +9,7 @@ class CommitStatusPresenter < Gitlab::View::Presenter::Delegated runner_system_failure: 'There has been a runner system failure, please try again', missing_dependency_failure: 'There has been a missing dependency failure', runner_unsupported: 'Your runner is outdated, please upgrade your runner', - schedule_expired: 'Scheduled 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' }.freeze private_constant :CALLOUT_FAILURE_MESSAGES diff --git a/app/workers/stuck_ci_jobs_worker.rb b/app/workers/stuck_ci_jobs_worker.rb index 5028965862f..cc5762156d7 100644 --- a/app/workers/stuck_ci_jobs_worker.rb +++ b/app/workers/stuck_ci_jobs_worker.rb @@ -75,7 +75,7 @@ class StuckCiJobsWorker relation .where('scheduled_at < ?', BUILD_SCHEDULED_OUTDATED_TIMEOUT.ago) .find_each(batch_size: BUILD_SCHEDULED_OUTDATED_BATCH_SIZE) do |build| - drop_build(:outdated, build, :scheduled, BUILD_SCHEDULED_OUTDATED_TIMEOUT, :schedule_expired) + drop_build(:outdated, build, :scheduled, BUILD_SCHEDULED_OUTDATED_TIMEOUT, :stale_schedule) end end end diff --git a/lib/gitlab/ci/status/build/failed.rb b/lib/gitlab/ci/status/build/failed.rb index 014eb66a26b..50b0d044265 100644 --- a/lib/gitlab/ci/status/build/failed.rb +++ b/lib/gitlab/ci/status/build/failed.rb @@ -11,7 +11,7 @@ module Gitlab runner_system_failure: 'runner system failure', missing_dependency_failure: 'missing dependency failure', runner_unsupported: 'unsupported runner', - schedule_expired: 'schedule expired' + stale_schedule: 'stale schedule' }.freeze private_constant :REASONS