Currently we have no easy-to-use API to get/set whiteboard contents of Beaker jobs/recipes. So please implement lacking APIs with some documents such as: - /jobs/<job_id>/whiteboard (GET/PUT) - /recipes/<recipe_id>/whiteboard (GET/PUT) Background: In our usecase, whiteboard contains not only test descriptions, but also some additional information left by reviewers (including review scripts) for testers to easily track the review status (not limited to just 'ack/nack'). Though we can edit job whiteboard via web UI, we also want to do it in an automated manner. Lack of APIs limits the efficiency of our review process of test results. And as for recipe whiteboard, there's no functionality to edit it once the recipe is created, which is inconvenient. Additional information: Optionally, 'bkr' subcommand to access the APIs is also nice. One example of usage is like below: $ w=$(bkr job-modify --get-whiteboard R:1234) $ bkr job-modify --set-whiteboard "$w [Failed but OK]" R:1234
As of Beaker 23, we have GET /jobs/(id) PATCH /jobs/(id) GET /recipes/(id) PATCH /recipes/(id) which produce/consume JSON with a key of 'whiteboard'. However there's no option in bkr job-modify for whiteboard yet. It should be easy enough to add a new option: bkr job-modify --whiteboard "new value", to update it.
I don't think we would add a --get-whiteboard option to bkr job-modify though, since it doesn't fit with the rest of the options (nor with the purpose of that command). The only way to get the whiteboard from the CLI is to use bkr job-results and then parse the XML, for example: bkr job-results J:123 | xmlstarlet sel -t -v 'job/whiteboard'
(In reply to Naoya Horiguchi from comment #0) > $ bkr job-modify --set-whiteboard "$w [Failed but OK]" R:1234 BTW you could also consider using the waiving and commenting functionality, which has been greatly improved in Beaker 23, for this purpose instead. Waiving and commenting are available in the web UI and with new APIs. For the CLI we have bug 853350.
(In reply to Dan Callaghan from comment #1) > As of Beaker 23, we have > > GET /jobs/(id) > PATCH /jobs/(id) > GET /recipes/(id) > PATCH /recipes/(id) > > which produce/consume JSON with a key of 'whiteboard'. However there's no > option in bkr job-modify for whiteboard yet. It should be easy enough to add > a new option: bkr job-modify --whiteboard "new value", to update it. Great to hear that, I'll wait for the new option to be available. Naoya
Converting this RFE to be just about setting the whiteboard with bkr job-modify. I assume that getting the whiteboard from bkr job-results is sufficient -- or if it's not, we can come up with something better, but it wouldn't be in the bkr job-modify command.
http://gerrit.beaker-project.org/5304
This bug fix is included in beaker-client-23.3-0.git.18.3350a63 which is currently available for download here: https://beaker-project.org/nightlies/release-23/
Beaker 23.3 has been released.