Skip to content

Rename project.repository_files into project.rpm_repository_files

David Fernandez requested to merge 387168-rename-project-repository_files into master

🌴 Context

In &5128, work for adding support for RPM packages started.

Among other things, the RPM Repository needs files that describe the complete state of the registry. Think of it like the complete list of all files with additional information such as urls to download them or digests to verify their integrity.

Since those files are not linked to a specific package (but the entire registry, scoped by a project), the model Packages::Rpm::RepositoryFile was created.

A few things to notice on that model:

  • it is linked to a specific project (and not package).
  • it has a file that lives in object storage.

Because the model references a file in object storage, we needed to make sure that when a project is deleted, those rpm repository files (we have max 4 files) are deleted too.

To achieve that, a new association was introduced in the project model.

The problem is that the name of the association is simply repository_files, which is confusing. A GitLab project can be seen as a git repository and so, we could expect to access git files through project.repository_files.

This is #387168 (closed).

🤔 What does this MR do and why?

  • Renames project.repository_files into project.rpm_repository_files.
  • Add a related spec.

This is a pure maintenancerefactor MR. No change or impact on any feature. This is even more true as the RPM Repository is still under development and as such it is behind a feature flag that is disabled.

📺 Screenshots or screen recordings

n / a

How to set up and validate locally

Not sure that we really have something to validate locally here.

🚓 MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by David Fernandez

Merge request reports