Docs: Document how to add a new purl_type to package metadata
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
The package metadata models and tables are tied to the purl_type of the underlying data. Models support a given set of PURL types according to their enum. The tables are partitioned according to purl_type
Because of the complex way these interact, documentation is needed to describe on how to add a new purl_type.
Further details
Supporting a new PURL type in package metadata tables and models involves:
- Adding a new value to the
PURL_TYPESenum, in the codebase. - Creating new partitions for that PURL type for
pm_packages,pm_package_versions, andpm_package_version_licenses. - Attaching these partitions.
(This is a non-exhaustive list.)
See !104155 (merged)
Proposal
Document how to edit the models to add a new purl_type and how to edit the database to add a new partition.
The new doc page would be under Contribute to the development of GitLab > Contribute to GitLab > Sec section development.
The new doc page would be similar to Contribute to the development of GitLab > Contribute to GitLab > Package Development > Developing support for a new package format.