Avoid the copy operation during Package Registry uploads
## :fire: Problem After applying the needed gitlab~3098698 change in https://gitlab.com/gitlab-org/gitlab/-/issues/429060+ and making sure all are deemed stable in the ~"Generic Package Repository" upload, we can move forward with the other package formats. ## :fire_engine: Solution * Start with one package format. We can choose the gitlab~16847689 as a starting point. * Add a new column named `file_final_path` to the `packages_package_files` table with `text` type and `1024` char length. * Pass the needed keyword arguments to any call to `::Packages::PackageFileUploader.workhorse_authorize` * `use_final_store_path: true` * `final_store_path_root_id: <project_or_group_id>` * This change needs a gitlab~7884237 and close monitoring during the rollout. * Some formats need additional code changes to work: | format | upload | download | delete | additional changes needed? | |--------|--------|----------|--------|----------------------------| | gitlab~13087961 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | | gitlab~13748067 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | | gitlab~13087967 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | | gitlab~30217685 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | | gitlab~18940348 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | | gitlab~13087969 | :white_check_mark: | :white_check_mark: | :white_check_mark: | `else` [branch](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/services/packages/update_package_file_service.rb#L26) should be removed. | | gitlab~17707180 | :white_check_mark: | :white_check_mark: | :white_check_mark: | `else` [branch](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/services/packages/update_package_file_service.rb#L26) should be removed. | | gitlab~23095439 | :white_check_mark: | :white_check_mark: | :white_check_mark: | This [line](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/services/packages/helm/process_file_service.rb#L46) should be removed. No need to pass the file again. That would fire a needless additional upload request to the gitlab~3612448 | | gitlab~17707177 | :white_check_mark: | :white_check_mark: | :white_check_mark: | This [line](https://gitlab.com/gitlab-org/gitlab/-/blame/master/app/services/packages/rubygems/process_gem_service.rb#L62) should be removed. No need to pass the file again. That would fire a needless additional upload request to the gitlab~3612448 |
epic