ProgressReports should report start/finish times.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 598
- Forks
- 168
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 86
Description
ProgressReports are used for tasks that have multiple parts, so you can tell how much they're doing/have done. When debugging large tasks (e.g., a sync of the one Really Big Repo), it would be handy to be able to see which subsection of the task took the bulk of the time, before digging into the logs.
Currently, for example, a sync-task has a progres--report-section that looks like this:
"progress_reports": [
{
"message": "Downloading Metadata Files",
"code": "sync.downloading.metadata",
"state": "completed",
"total": null,
"done": 6,
"suffix": null
},
{
"message": "Skipping Packages",
"code": "sync.skipped.packages",
"state": "completed",
"total": 0,
"done": 0,
"suffix": null
},
{
"message": "Parsed Advisories",
"code": "sync.parsing.advisories",
"state": "completed",
"total": 4565,
"done": 4565,
"suffix": null
},
{
"message": "Parsed Packages",
"code": "sync.parsing.packages",
"state": "completed",
"total": 20851,
"done": 20851,
"suffix": null
},
{
"message": "Parsed Comps",
"code": "sync.parsing.comps",
"state": "completed",
"total": 23,
"done": 23,
"suffix": null
},
{
"message": "Downloading Artifacts",
"code": "sync.downloading.artifacts",
"state": "completed",
"total": null,
"done": 0,
"suffix": null
},
{
"message": "Associating Content",
"code": "associating.content",
"state": "completed",
"total": null,
"done": 0,
"suffix": null
}
It would be very handy if it had a started_at: that was the ProgRpt's create-time (or maybe when state changed to running?) and a finished_at: that was filled in when the state changed to completed. This would make it possible to see at a glance that, for example, "oh, all the time was in 'Downloading Artifacts' - I need to check network-speed".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the ProgressReports implementation and the state transitions used by the sync-task example. Determine how creation and completion are recorded, resolve whether started_at means creation or entry into running, and consider how the timestamps should appear in the progress report output; the work is done when completed reports expose both timestamps and the behavior is covered by tests.
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
- 35/100