diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-07 18:44:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-07 18:44:55 +0300 |
commit | 280be6314fd87fd5bae773159a8922a265992cf1 (patch) | |
tree | ab9ca2037118f463bfe5aa4d06f3e65f761bf91e /app | |
parent | f0a2a6e328ab823ae6ba9eda7b4198b6ef7954c7 (diff) |
Add latest changes from gitlab-org/gitlab@16-2-stable-ee
Diffstat (limited to 'app')
-rw-r--r-- | app/services/ci/create_downstream_pipeline_service.rb | 3 | ||||
-rw-r--r-- | app/workers/all_queues.yml | 9 | ||||
-rw-r--r-- | app/workers/ci/initialize_pipelines_iid_sequence_worker.rb | 19 |
3 files changed, 31 insertions, 0 deletions
diff --git a/app/services/ci/create_downstream_pipeline_service.rb b/app/services/ci/create_downstream_pipeline_service.rb index b281f942a14..e38f5c98814 100644 --- a/app/services/ci/create_downstream_pipeline_service.rb +++ b/app/services/ci/create_downstream_pipeline_service.rb @@ -42,6 +42,9 @@ module Ci log_downstream_pipeline_creation(downstream_pipeline) update_bridge_status!(@bridge, downstream_pipeline) + rescue StandardError => e + @bridge.reset.drop!(:data_integrity_failure) + raise e end private diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml index 6f6fd9ddb65..64c9f00a6aa 100644 --- a/app/workers/all_queues.yml +++ b/app/workers/all_queues.yml @@ -2496,6 +2496,15 @@ :weight: 1 :idempotent: true :tags: [] +- :name: ci_initialize_pipelines_iid_sequence + :worker_name: Ci::InitializePipelinesIidSequenceWorker + :feature_category: :continuous_integration + :has_external_dependencies: false + :urgency: :low + :resource_boundary: :unknown + :weight: 1 + :idempotent: true + :tags: [] - :name: ci_job_artifacts_expire_project_build_artifacts :worker_name: Ci::JobArtifacts::ExpireProjectBuildArtifactsWorker :feature_category: :build_artifacts diff --git a/app/workers/ci/initialize_pipelines_iid_sequence_worker.rb b/app/workers/ci/initialize_pipelines_iid_sequence_worker.rb new file mode 100644 index 00000000000..95b58814e08 --- /dev/null +++ b/app/workers/ci/initialize_pipelines_iid_sequence_worker.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Ci + class InitializePipelinesIidSequenceWorker + include Gitlab::EventStore::Subscriber + + data_consistency :always + feature_category :continuous_integration + idempotent! + + def handle_event(event) + Project.find_by_id(event.data[:project_id]).try do |project| + next if project.internal_ids.ci_pipelines.any? + + ::Ci::Pipeline.track_project_iid!(project, 0) + end + end + end +end |