RPM packages process worker
What does this MR do and why?
Added Packages::Rpm::Process worker which is called via RPM package upload or destruction. Depending on it worker passes package file to Packages::Rpm::InitializePackageService for Packages::Rpm::RepositoryFiles creation (if needed) and Packages::Rpm::ProcessPackageService for parsing package, updating package attributes and adding it to repository metadata files. In case of destruction, it calls Packages::Rpm::DestroyPackageService for removing repository files if the last package is removed.
Screenshots or screen recordings
How to set up and validate locally
For testing locally disable authentication by removing code from rpm_project_packages.rb:18 and adding authenticate_non_get!
to before block
#remove these
authenticate_with do |accept|
accept.token_types(:personal_access_token_with_username, :deploy_token_with_username, :job_token_with_username)
.sent_through(:http_basic_auth)
end
#add this
before do
require_packages_enabled!
not_found! unless ::Feature.enabled?(:rpm_packages, authorized_user_project)
authorize_read_package!(authorized_user_project)
end
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #372737