Commit b1af1f26 authored by Shinya Maeda's avatar Shinya Maeda

Fix enum wording

parent dcf09d11
...@@ -43,7 +43,7 @@ class CommitStatus < ActiveRecord::Base ...@@ -43,7 +43,7 @@ class CommitStatus < ActiveRecord::Base
failed_by_script: 1, # TODO: Not used. Should we expand pipeline as well? 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_missing_dependency: 2, # This will be done in the next MR.
failed_by_system: 3, # TODO: Not used. What's this state? 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_out_of_quota: 5, # TODO: Only EE. How can we detect?
failed_by_stuck_and_timeout: 6, failed_by_stuck_and_timeout: 6,
failed_by_no_runner: 7, # TODO: Not used. How can we detect? failed_by_no_runner: 7, # TODO: Not used. How can we detect?
......
...@@ -53,7 +53,7 @@ module Projects ...@@ -53,7 +53,7 @@ module Projects
log_error("Projects::UpdatePagesService: #{message}") log_error("Projects::UpdatePagesService: #{message}")
@status.allow_failure = !latest? @status.allow_failure = !latest?
@status.description = message @status.description = message
@status.drop(:page) @status.drop(:failed_by_page)
super super
end end
......
...@@ -53,7 +53,7 @@ class StuckCiJobsWorker ...@@ -53,7 +53,7 @@ class StuckCiJobsWorker
def drop_build(type, build, status, timeout) 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})" 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| Gitlab::OptimisticLocking.retry_lock(build, 3) do |b|
b.drop(:stuck_and_timeout) b.drop(:failed_by_stuck_and_timeout)
end end
end end
end end
...@@ -103,7 +103,7 @@ module API ...@@ -103,7 +103,7 @@ module API
when 'success' when 'success'
status.success! status.success!
when 'failed' when 'failed'
status.drop!(:api) status.drop!(:failed_by_api)
when 'canceled' when 'canceled'
status.cancel! status.cancel!
else else
......
...@@ -634,7 +634,7 @@ describe API::Runner do ...@@ -634,7 +634,7 @@ describe API::Runner do
update_job(state: 'failed') update_job(state: 'failed')
expect(job.reload.status).to eq '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
end end
......
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