diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-15 11:58:20 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-15 11:58:20 +0300 |
commit | 59c9ff627603da03f6a7c330d57a2c765b3c24a3 (patch) | |
tree | dd8f3a2fbc9564818a77d2d8798fcc464d220e8e /app/services | |
parent | 30b4659f2c485885324fd8d67fcd92a2939310a3 (diff) |
Add latest changes from gitlab-org/gitlab@14-7-stable-ee
Diffstat (limited to 'app/services')
7 files changed, 8 insertions, 0 deletions
diff --git a/app/services/packages/create_package_service.rb b/app/services/packages/create_package_service.rb index 7e1b6ecbe51..7565b017a64 100644 --- a/app/services/packages/create_package_service.rb +++ b/app/services/packages/create_package_service.rb @@ -11,6 +11,7 @@ module Packages project .packages .with_package_type(package_type) + .not_pending_destruction .find_or_create_by!(name: name, version: version) do |package| package.status = params[:status] if params[:status] package.creator = package_creator diff --git a/app/services/packages/debian/find_or_create_package_service.rb b/app/services/packages/debian/find_or_create_package_service.rb index 46e06c9f584..3b2be7b6874 100644 --- a/app/services/packages/debian/find_or_create_package_service.rb +++ b/app/services/packages/debian/find_or_create_package_service.rb @@ -11,6 +11,7 @@ module Packages .with_name(params[:name]) .with_version(params[:version]) .with_debian_codename(params[:distribution_name]) + .not_pending_destruction .first package ||= create_package!( diff --git a/app/services/packages/helm/process_file_service.rb b/app/services/packages/helm/process_file_service.rb index 31b357c1616..f53c63d2b01 100644 --- a/app/services/packages/helm/process_file_service.rb +++ b/app/services/packages/helm/process_file_service.rb @@ -68,6 +68,7 @@ module Packages package = project_packages.with_package_type(:helm) .with_name(metadata['name']) .with_version(metadata['version']) + .not_pending_destruction .last package || temp_package end diff --git a/app/services/packages/npm/create_package_service.rb b/app/services/packages/npm/create_package_service.rb index 76a7f3bdc72..b0a5f37cfa3 100644 --- a/app/services/packages/npm/create_package_service.rb +++ b/app/services/packages/npm/create_package_service.rb @@ -33,6 +33,7 @@ module Packages .npm .with_name(name) .with_version(version) + .not_pending_destruction .exists? end diff --git a/app/services/packages/nuget/update_package_from_metadata_service.rb b/app/services/packages/nuget/update_package_from_metadata_service.rb index d1e47ad00a1..5456ad4cad7 100644 --- a/app/services/packages/nuget/update_package_from_metadata_service.rb +++ b/app/services/packages/nuget/update_package_from_metadata_service.rb @@ -98,6 +98,7 @@ module Packages .nuget .with_name(package_name) .with_version(package_version) + .not_pending_destruction .first end end diff --git a/app/services/packages/rubygems/process_gem_service.rb b/app/services/packages/rubygems/process_gem_service.rb index 109c87a0444..c771af28f73 100644 --- a/app/services/packages/rubygems/process_gem_service.rb +++ b/app/services/packages/rubygems/process_gem_service.rb @@ -91,6 +91,7 @@ module Packages .rubygems .with_name(gemspec.name) .with_version(gemspec.version.to_s) + .not_pending_destruction .last package || temp_package end diff --git a/app/services/packages/terraform_module/create_package_service.rb b/app/services/packages/terraform_module/create_package_service.rb index d1bc79089a3..3afecc6c1ca 100644 --- a/app/services/packages/terraform_module/create_package_service.rb +++ b/app/services/packages/terraform_module/create_package_service.rb @@ -29,6 +29,7 @@ module Packages .for_projects(project.root_namespace.all_projects.id_not_in(project.id)) .with_package_type(:terraform_module) .with_name(name) + .not_pending_destruction .exists? end @@ -37,6 +38,7 @@ module Packages .with_package_type(:terraform_module) .with_name(name) .with_version(params[:module_version]) + .not_pending_destruction .exists? end |