diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 09:16:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 09:16:11 +0000 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /app/services/ci/destroy_pipeline_service.rb | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) | |
download | gitlab-ce-edaa33dee2ff2f7ea3fac488d41558eb5f86d68c.tar.gz |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'app/services/ci/destroy_pipeline_service.rb')
-rw-r--r-- | app/services/ci/destroy_pipeline_service.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/services/ci/destroy_pipeline_service.rb b/app/services/ci/destroy_pipeline_service.rb index 6fbde5d291c..d85e52e1312 100644 --- a/app/services/ci/destroy_pipeline_service.rb +++ b/app/services/ci/destroy_pipeline_service.rb @@ -9,12 +9,12 @@ module Ci pipeline.cancel_running if pipeline.cancelable? - # Ci::Pipeline#destroy triggers `use_fast_destroy :job_artifacts` and - # ci_builds has ON DELETE CASCADE to ci_pipelines. The pipeline, the builds, - # job and pipeline artifacts all get destroyed here. - ::Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModification.allow_cross_database_modification_within_transaction(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/345664') do - pipeline.reset.destroy! - end + # The pipeline, the builds, job and pipeline artifacts all get destroyed here. + # Ci::Pipeline#destroy triggers fast destroy on job_artifacts and + # build_trace_chunks to remove the records and data stored in object storage. + # ci_builds records are deleted using ON DELETE CASCADE from ci_pipelines + # + pipeline.reset.destroy! ServiceResponse.success(message: 'Pipeline not found') rescue ActiveRecord::RecordNotFound |