mbox series

[0/3] toaster: changes with regards to read-only log viewer

Message ID 20261109-toaster-projects-nobuild-v1-0-7e65cadc2d39@belden.com
Headers show
Series toaster: changes with regards to read-only log viewer | expand

Message

Patrick Vogelaar via B4 Relay Nov. 9, 2026, 7:46 a.m. UTC
We use Toaster as a read-only build viewer for CI. Every CI build
uploads its bitbake event log to a shared Toaster instance, which
imports it with toaster-eventreplay and is started without build mode.
This works today, but has three limitations that this series removes:

* All imported builds land in the "Command line builds" project, so
  builds of differeent branches or CI instances cannot be told appart.
* Whithuot the build mode. projects are hard to reach because the
  "All projects" tab is hidden and project links lead to the configuration
  page for builds.
* And IMHO there was a bug that the time of the import instead of the
  actual start time.

Patch 1 shows projects and their builds without build mode and hides
the configuration pages and build actions there.

Patch 2 adds the TOASTER_PROJECT variable: if it is set, a command line
build or replayed event log goes into the project of that name, which
is created if needed. Without the variable nothing changes. It also
decides whether a build is a command line build from the absence of a
BuildRequest instead of from the default project, so command line
builds in named projects get no Rebuild/Cancel actions.

Patch 3 takes the build start and end time from the log and task
events, so a replayed log keeps the times of the original build. Live
builds are unchanged apart from at most a few seconds.

Signed-off-by: Patrick Vogelaar <patrick.vogelaar@belden.com>
---
Patrick Vogelaar (3):
      toaster: show projects and builds without build mode
      toaster: group command line builds by TOASTER_PROJECT
      toaster: take build times from the events

 bin/toaster                                        |   2 +-
 .../bitbake-user-manual-ref-variables.rst          |  13 ++
 lib/bb/ui/buildinfohelper.py                       |  54 +++++++--
 lib/bb/ui/toasterui.py                             |   1 +
 lib/toaster/tests/browser/test_all_builds_page.py  |   2 +
 lib/toaster/tests/buildinfohelper/__init__.py      |   0
 .../tests/buildinfohelper/test_build_time.py       |  62 ++++++++++
 .../tests/buildinfohelper/test_cli_project.py      | 131 +++++++++++++++++++++
 lib/toaster/tests/views/test_nobuild.py            |  94 +++++++++++++++
 lib/toaster/toastergui/templates/base.html         |   2 -
 .../toastergui/templates/basebuildpage.html        |   4 +
 lib/toaster/toastergui/templates/mrb_section.html  |   4 +-
 .../toastergui/templates/projecttopbar.html        |   2 +-
 .../toastergui/templatetags/project_url_tag.py     |  11 +-
 lib/toaster/toastergui/views.py                    |  13 ++
 lib/toaster/toastergui/widgets.py                  |   2 +-
 lib/toaster/tox.ini                                |   3 +-
 17 files changed, 378 insertions(+), 22 deletions(-)
---
base-commit: 0f33b68cbabab26c9ed1585e3ee109689d206812
change-id: 20261104-toaster-projects-nobuild-b23f374c6f08

Best regards,
--  
Patrick Vogelaar <patrick.vogelaar@belden.com>