Lightwell UI lists Python packages, versions, and repository counts through content-sources-backend. That backend reads Pulp Postgres directly (Tangy). We need Pulp HTTP APIs so the path is UI → backend → Pulp REST, not SQL.
Today GET …/content/python/packages/ is one row per file (wheel + sdist). It cannot paginate distinct package names or return versions per package.
{pk} is the repository UUID. Latest complete repository version is implied.
| UI path |
Pulp |
| PackageList |
New GET …/repositories/python/python/{pk}/packages/ — one row per name_normalized, paginate, name_normalized__istartswith |
| PackageVersions |
Extend existing GET …/content/python/packages/ with collapse_builds=true and serializer field base_version (still use packagetype=sdist) |
| PackageGet |
Existing content list (name + version + packagetype=sdist); add base_version on the serializer. Omit collapse_builds. |
| RepoMetrics |
New GET …/repositories/python/python/{pk}/metrics/ — package_count, version_count, build_count |
collapse_builds=true (default false): strip trailing \.[a-zA-Z]+-\d+$ from version, one row per (name_normalized, base_version).
PackageList rows: name, name_normalized, versions[], latest_releases[] (version, created_at, release). Same version keys in both lists. Pulp-native shape, not Tangy DTOs.
Lightwell UI lists Python packages, versions, and repository counts through content-sources-backend. That backend reads Pulp Postgres directly (Tangy). We need Pulp HTTP APIs so the path is UI → backend → Pulp REST, not SQL.
Today
GET …/content/python/packages/is one row per file (wheel + sdist). It cannot paginate distinct package names or return versions per package.{pk}is the repository UUID. Latest complete repository version is implied.GET …/repositories/python/python/{pk}/packages/— one row pername_normalized, paginate,name_normalized__istartswithGET …/content/python/packages/withcollapse_builds=trueand serializer fieldbase_version(still usepackagetype=sdist)name+version+packagetype=sdist); addbase_versionon the serializer. Omitcollapse_builds.GET …/repositories/python/python/{pk}/metrics/—package_count,version_count,build_countcollapse_builds=true(default false): strip trailing\.[a-zA-Z]+-\d+$fromversion, one row per(name_normalized, base_version).PackageList rows:
name,name_normalized,versions[],latest_releases[](version,created_at,release). Same version keys in both lists. Pulp-native shape, not Tangy DTOs.