Provide status updates for long-running jobs in non-interactive mode
- Dominant language
- Python
- Stars
- 140
- Forks
- 45
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 6
Description
[See original issue on GitLab](https://gitlab.com/BuildStream/buildstream/-/issues/1298)
In GitLab by [[Gitlab user @doraskayo]](https://gitlab.com/doraskayo) on Apr 29, 2020, 10:29
## Background
Sometimes jobs can hang, or take a long time to finish. In non-interactive mode, there is no easy way to know which of the jobs in the pipeline are still ongoing and at which stage they are at. Not having this information means that it's hard to understand the status of the pipeline and whether there are specific jobs that require the attention of the user.
This information would be helpful to users, as it would allow them to understand if they should find a better source for a particular element, fix an infinite loop in an integration command, solve a networking issue, etc.
To find this information, users currently have to write their own scripts to parse the output of the `bst` command, by searching for the jobs that have the "START" message, but not the "SUCCESS" or "SKIPPED" message. Not user-friendly at all.
Unlike #1029, which is more focused on providing the facilities to allow more granular progress updated for start up activities, this issue is about providing a status update on any job in general, and only in the non-interactive mode.
In the interactive mode, the status of all the active jobs is always present at the bottom of the output within the status line, so this issue is irrelevant there.
## Task description
Provide periodic feedback on jobs that are taking a long time to finish. The frequency should be user configurable, and may have a default value.
[//]: # (Short summary of the action to be executed)
* [ ] Provide a user configuration, possibly with a CLI option, allowing the user to configure the frequency at which they wish to receive status updates for ongoing jobs.
* [ ] Make sure to always provide some kind of feedback on the ongoing jobs within the specified frequency. This can be achieved by either:
* Printing a status line showing all the active jobs, in case there hasn't been any status update within the specified update frequency.
* Print a reminder line with the current status of a particular job if this specific job hasn't had any status update within the specified frequency.
## Acceptance Criteria
Users would always receive an update about the status of their ongoing jobs within their specified update frequency. This status update should allow them to know which specific jobs are still ongoing.
---
CC: [[Gitlab user @tristanvb]](https://gitlab.com/tristanvb), [[Gitlab user @valentindavid]](https://gitlab.com/valentindavid)
Contributor guide
Research direction
Start by tracing the bst command's non-interactive output and the existing interactive status line. Review how ongoing jobs report START, SUCCESS, or SKIPPED, then determine where a configurable update frequency belongs. Done means non-interactive users receive periodic updates identifying each ongoing job within the configured interval.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100