Skip to content

bots/host.py: Fix output capturing, add CI test

Santiago Gil requested to merge santigl/hosttools-bot-outputs into master

Before raising this MR, consider whether the following are required, and complete if so:

  • Unit tests
  • [ ] Metrics
  • [ ] Documentation update(s)

If not required, please explain in brief why not.

Description

Currently the bgd bot host-tools bot could end up not capturing the outputs and returning an ActionResult with no output paths.

This slightly changes the way that the bot obtains the list of paths from the Command, which depends on the REAPI version that the message follows, and adds a CI test for the the host-tools bot.

Changes proposed in this merge request:

  • Add _app/bots/utils.py::command_output_paths() helper and unit tests
  • Change bots/host.py::work_host_tools() to always read the list of outputs using the getter, ensuring it always reads from the beginning.
  • .gitlab-ci.yml: Add host-tools-bot-test job that tests an execution with the host-tools bot.

Validation

Send BuildGrid an action that expects at least an output file or directory to be serviced by the host-tools bot. The expected output should be missing before these changes are incorporated.

Edited by Santiago Gil

Merge request reports