diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /app/models/commit_status.rb | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index c85292feb25..8aba74bedbc 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -100,9 +100,7 @@ class CommitStatus < ApplicationRecord # will not be refreshed to pick the change self.processed_will_change! - if !::Gitlab::Ci::Features.atomic_processing?(project) - self.processed = nil - elsif latest? + if latest? self.processed = false # force refresh of all dependent ones elsif retried? self.processed = true # retried are considered to be already processed @@ -164,8 +162,7 @@ class CommitStatus < ApplicationRecord next unless commit_status.project commit_status.run_after_commit do - schedule_stage_and_pipeline_update - + PipelineProcessWorker.perform_async(pipeline_id) ExpireJobCacheWorker.perform_async(id) end end @@ -186,14 +183,6 @@ class CommitStatus < ApplicationRecord select(:name) end - def self.status_for_prior_stages(index, project:) - before_stage(index).latest.slow_composite_status(project: project) || 'success' - end - - def self.status_for_names(names, project:) - where(name: names).latest.slow_composite_status(project: project) || 'success' - end - def self.update_as_processed! # Marks items as processed # we do not increase `lock_version`, as we are the one @@ -286,21 +275,6 @@ class CommitStatus < ApplicationRecord def unrecoverable_failure? script_failure? || missing_dependency_failure? || archived_failure? || scheduler_failure? || data_integrity_failure? end - - def schedule_stage_and_pipeline_update - if ::Gitlab::Ci::Features.atomic_processing?(project) - # Atomic Processing requires only single Worker - PipelineProcessWorker.perform_async(pipeline_id, [id]) - else - if complete? || manual? - PipelineProcessWorker.perform_async(pipeline_id, [id]) - else - PipelineUpdateWorker.perform_async(pipeline_id) - end - - StageUpdateWorker.perform_async(stage_id) - end - end end CommitStatus.prepend_if_ee('::EE::CommitStatus') |