Skip to content

Render progress information for loading and processing elements

Jonathan Maw requested to merge jonathan/job-progress into master

Description

This is a Merge Request to add a way of rendering progress information, and showing how to use it in two cases - loading elements and resolving elements.

This is an issue that I've discussed and produced a write-up in https://mail.gnome.org/archives/buildstream-list/2019-July/msg00020.html

The basic functionality behind it is to generate Tasks (from _state.py) in a contextmanager for the duration of an activity, providing an object to register changes into, which the frontend will dutifully render, along with creating a job start message.

It will render the task as a job in the usual status widget (extended to be able to show progress as "X" or "X/Y"), with rendering throttled to once per second (as a temporary measure, by checking whether the time exceeds a specified interval, but when the frontend is run in a separate process, this should hopefully not be necessary).

Once the task is finished, it will send a job completed message, where the progress information is printed in the "detail" section.

This merge request is part of the solution to #1029


Edited by Jonathan Maw

Merge request reports