Description of problem: In pulpv1 each sync task status object would include the total size of the repo as well as the total package count. Pulpv2 does away with this and only includes the delta count and size. It would help katello greatly if either the total counts were added back, or existing counts were added such that we could combine existing + delta to get the new total.
The total size of the repo is tricky. It's, oddly, due to the fact that the sync is more efficient in v2 since we know before starting the process what it is we need to download. What I could see is a new API outside of any plugin that would iterate over all associated units and sum up the file sizes. Putting this off to 2.2 to give us time to investigate that possibility.
Assigning to Mike to handle with the yum importer rewrite.
Talking just now, Justin indicated that it is sufficient for them to have the ability to query for this data. To get the size of each unit, a query can be done like this: POST path: /pulp/api/v2/repositories/<repo id>/search/units/ POST data: {"criteria": {"fields": {"unit": ["name", "size"], "association": []}, "type_ids": ["rpm"], "filters": {"unit": {}}}} You can of course just count the number of units you get back, or to get the counts of each unit type in a repo, do this query: POST path: /pulp/api/v2/repositories/search/ POST data: {'criteria': {'fields': ['name', 'content_unit_counts']}}
Reopening for me to get some timings to see how performant this is with a larger number of repositories.
closing BZ per jsherrill
Removing Needinfo
trying again