Skip to content

Convert PURL types to registry IDs when reading License DB export buckets

Oscar Tovar requested to merge add-purl_type-registry-mapping into master

What does this MR do and why?

Describe in detail what your merge request does and why.

This MR updates the GCP connector so that it reads from the license-db bucket using the registry id instead of the purl type. This is needed because PURL types and registry ids (used by the license-db export file structure) do not map 1:1. See the following table taken from Package metadata sync service reads from GCP bu... (#391749 - closed):

PURL type Registry ID Same?
conan conan
gem rubygem
golang go
maven maven
npm npm
nuget nuget
composer packagist
pypi pypi

Without this mapping, the connector will attempt to ready from a structure that does not exist.

# Does not exist ❌
gs://<bucket>/v1/gem/00001/00001.csv
# Does exist ✅
gs://<bucket>/v1/rubygem/00001/00001.csv

Relates to #391749 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

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

Merge request reports

Loading