pulp / pulp/pulp_deb

Show total number of items in sync-tasks

Open
#537 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

.feature Triage-Needed
Dominant language
Python
Stars
71
Forks
91
Avg merge
1d 19h
Merged PRs (30d)
22

Description

Is your feature request related to a problem? Please describe.
pulp_deb progress_reports during sync tasks should show the total number of items to process. Currently it just says null:

"progress_reports": [
        {
            "code": "update.release_file",
            "done": 0,
            "message": "Update ReleaseFile units",
            "state": "running",
            "suffix": null,
            "total": null
        },
        {
            "code": "update.packageindex",
            "done": 10,
            "message": "Update PackageIndex units",
            "state": "running",
            "suffix": null,
            "total": null
        },
        {
            "code": "associating.content",
            "done": 544,
            "message": "Associating Content",
            "state": "running",
            "suffix": null,
            "total": null
        },
        {
            "code": "sync.downloading.artifacts",
            "done": 938,
            "message": "Downloading Artifacts",
            "state": "running",
            "suffix": null,
            "total": null
        }
    ]

Describe the solution you'd like
I reckon this could mean iterating over the PackageIndex before actually processing it, maybe a 'nicer' solution is possible.
Nevertheless, it would make the current state of the task more transparent.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how pulp_deb sync tasks build their progress_reports, especially the PackageIndex processing path and the reported total fields. Determine where the item count can be obtained before processing; done means the relevant progress reports expose a populated total instead of null.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.