diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-30 00:08:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-30 00:08:53 +0300 |
commit | 31664a1a5ac22e8c56a471d3afab26e661efcc0e (patch) | |
tree | a300c578ef9877df4fdbe28774b509172d474ae0 /app/workers | |
parent | 511cd681d4ab0d4263df538b1800058edc07230e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/all_queues.yml | 9 | ||||
-rw-r--r-- | app/workers/ci/pipeline_success_unlock_artifacts_worker.rb | 5 | ||||
-rw-r--r-- | app/workers/ci/unlock_ref_artifacts_on_pipeline_stop_worker.rb | 33 |
3 files changed, 0 insertions, 47 deletions
diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml index 8e328e8babb..6f86c3b939e 100644 --- a/app/workers/all_queues.yml +++ b/app/workers/all_queues.yml @@ -1866,15 +1866,6 @@ :weight: 1 :idempotent: true :tags: [] -- :name: pipeline_background:ci_unlock_ref_artifacts_on_pipeline_stop - :worker_name: Ci::UnlockRefArtifactsOnPipelineStopWorker - :feature_category: :continuous_integration - :has_external_dependencies: false - :urgency: :low - :resource_boundary: :unknown - :weight: 1 - :idempotent: true - :tags: [] - :name: pipeline_creation:ci_external_pull_requests_create_pipeline :worker_name: Ci::ExternalPullRequests::CreatePipelineWorker :feature_category: :continuous_integration diff --git a/app/workers/ci/pipeline_success_unlock_artifacts_worker.rb b/app/workers/ci/pipeline_success_unlock_artifacts_worker.rb index a329ca0f577..2a1f492cacb 100644 --- a/app/workers/ci/pipeline_success_unlock_artifacts_worker.rb +++ b/app/workers/ci/pipeline_success_unlock_artifacts_worker.rb @@ -1,11 +1,6 @@ # frozen_string_literal: true module Ci - # TODO: Clean up this worker in a subsequent release. - # The process to unlock job artifacts have been moved to - # be triggered by the pipeline state transitions and - # to use UnlockRefArtifactsOnPipelineStopWorker. - # https://gitlab.com/gitlab-org/gitlab/-/issues/397491 class PipelineSuccessUnlockArtifactsWorker include ApplicationWorker diff --git a/app/workers/ci/unlock_ref_artifacts_on_pipeline_stop_worker.rb b/app/workers/ci/unlock_ref_artifacts_on_pipeline_stop_worker.rb deleted file mode 100644 index 3299cab0f6f..00000000000 --- a/app/workers/ci/unlock_ref_artifacts_on_pipeline_stop_worker.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -module Ci - # This worker is triggered when the pipeline state - # changes into one of the stopped statuses - # `Ci::Pipeline.stopped_statuses`. - # It unlocks the previous pipelines on the same ref - # as the pipeline that has just completed - # using `Ci::UnlockArtifactsService`. - class UnlockRefArtifactsOnPipelineStopWorker - include ApplicationWorker - - data_consistency :always - - include PipelineBackgroundQueue - - idempotent! - - def perform(pipeline_id) - pipeline = ::Ci::Pipeline.find_by_id(pipeline_id) - - return if pipeline.nil? - return if pipeline.ci_ref.nil? - - results = ::Ci::UnlockArtifactsService - .new(pipeline.project, pipeline.user) - .execute(pipeline.ci_ref, pipeline) - - log_extra_metadata_on_done(:unlocked_pipelines, results[:unlocked_pipelines]) - log_extra_metadata_on_done(:unlocked_job_artifacts, results[:unlocked_job_artifacts]) - end - end -end |