Project

Profile

Help

Issue #4185

closed

Content summary returns un-qualified plugin type names and counts

Added by dalley over 5 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 46
Quarter:

Description

The detail view of a repository version provides a "content summary". This looks like the following:

"content_summary": {
    "package": 50,
    "update": 2,
    "file": 5
}

The problem is that these names come from the TYPE field on the models, and aren't namespaced by plugin. "package" comes from the RPM plugin, but that name is super generic. If another plugin (hypothetically, let's say the Python plugin", defined a content type named "package", the RPM "package"s and the Python "package"s would be counted together as if they were the same content type.

A solution might be to namespace "type" by plugin somehow like so:

"content_summary": {
    "pulp_rpm.package": 50,
    "pulp_rpm.update": 2,
    "pulp_file.file": 5
}

I would discourage a convention-based solution to this problem since with enough plugins, this will eventually become a problem. I would say it's already a problem for understandability if not correctness.


Related issues

Blocks Pulp - Task #4067: Commit migrations to source controlCLOSED - CURRENTRELEASEdaviddavis

Actions

Also available in: Atom PDF