Skip to content

Create Generic package class

Context

Step by step we want to complete the refactoring and extract every package format from Packages::Package to its own class.

What does this MR do and why?

This MR introduces Packages::Generic::Package class for generic packages.

Generic package registry is in GA https://docs.gitlab.com/ee/user/packages/generic_packages/index.html, hence the changes are introduced with the feature flag.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

No.

Database queries

SELECT "packages_packages".*
FROM "packages_packages"
WHERE "packages_packages"."package_type" = 7
  AND "packages_packages"."project_id" = XXX
  AND "packages_packages"."status" IN (0,
                                       1)
  AND "packages_packages"."name" = 'XXX'
  AND "packages_packages"."version" = 'XXX'
LIMIT 1;

https://console.postgres.ai/gitlab/gitlab-production-main/sessions/31002/commands/96341

How to set up and validate locally

  1. Enable the feature flag: Feature.enable(:generic_extract_generic_package_model)
  2. Try basic package registry actions like publishing and installing a package docs.

Related to #435829 (closed)

Edited by Dzmitry (Dima) Meshcharakou

Merge request reports

Loading