Skip to content

use #use_open_file for Packages::Debian::ExtractDebMetadataService

What does this MR do and why?

This MR was extracted from !78385 (closed), on the way to fix #340307 (closed).

quoting @10io for #340307 (closed):

Tests on staging showed that background jobs for the debian registry are not working as expected with object storage.

[...]

  • I see several uses of #use_file. This is known to leave the package_file in an improper state that can't be saved. Basically, if package_file.file.use_file is called, then package_file.save! or package_file.update! can't be called (triggers a validation error).
  • 🔧 Solution: package file updates where the package id or file_name are modified must be handled in a custom way. This is the result of the work on a similar nuget bug. In short, use this. Also use use_open_file which is better than use_file.

^ Fixed (#use_file replaced by #use_open_file).

Merge request reports

Loading