diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index dae3174ba9b..424f8e49d4d 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -43,7 +43,7 @@ class CommitStatus < ActiveRecord::Base failed_by_script: 1, # TODO: Not used. Should we expand pipeline as well? failed_by_missing_dependency: 2, # This will be done in the next MR. failed_by_system: 3, # TODO: Not used. What's this state? - failed_by_failed_job_state: 4, + failed_by_job_state: 4, failed_by_out_of_quota: 5, # TODO: Only EE. How can we detect? failed_by_stuck_and_timeout: 6, failed_by_no_runner: 7, # TODO: Not used. How can we detect? diff --git a/app/services/projects/update_pages_service.rb b/app/services/projects/update_pages_service.rb index c731789ce9b..0de123515c3 100644 --- a/app/services/projects/update_pages_service.rb +++ b/app/services/projects/update_pages_service.rb @@ -53,7 +53,7 @@ module Projects log_error("Projects::UpdatePagesService: #{message}") @status.allow_failure = !latest? @status.description = message - @status.drop(:page) + @status.drop(:failed_by_page) super end diff --git a/app/workers/stuck_ci_jobs_worker.rb b/app/workers/stuck_ci_jobs_worker.rb index 3e635f140fd..0af8090866a 100644 --- a/app/workers/stuck_ci_jobs_worker.rb +++ b/app/workers/stuck_ci_jobs_worker.rb @@ -53,7 +53,7 @@ class StuckCiJobsWorker def drop_build(type, build, status, timeout) Rails.logger.info "#{self.class}: Dropping #{type} build #{build.id} for runner #{build.runner_id} (status: #{status}, timeout: #{timeout})" Gitlab::OptimisticLocking.retry_lock(build, 3) do |b| - b.drop(:stuck_and_timeout) + b.drop(:failed_by_stuck_and_timeout) end end end diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb index c129cc9171d..9ab64452d2b 100644 --- a/lib/api/commit_statuses.rb +++ b/lib/api/commit_statuses.rb @@ -103,7 +103,7 @@ module API when 'success' status.success! when 'failed' - status.drop!(:api) + status.drop!(:failed_by_api) when 'canceled' status.cancel! else diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb index 23c2e7aa978..48220058c88 100644 --- a/spec/requests/api/runner_spec.rb +++ b/spec/requests/api/runner_spec.rb @@ -634,7 +634,7 @@ describe API::Runner do update_job(state: 'failed') expect(job.reload.status).to eq 'failed' - expect(job).to be_failed_by_failed_job_state + expect(job).to be_failed_by_job_state end end