mesa/bin
Vignesh Raman aa0c4078de ci: Add CustomLogger class and CLI tool
This commit introduces the CustomLogger class, which provides methods
for updating, creating, and managing dut jobs and phases in a structured
log in below json format.
{
  "_timestamp": "2023-10-05T06:16:42.603921",
  "dut_job_type": "rpi3",
  "farm": "igalia",
  "dut_jobs": [
    {
      "status": "pass",
      "submitter_start_time": "2023-10-05T06:16:42.745862",
      "dut_start_time": "2023-10-05T06:16:42.819964",
      "dut_submit_time": "2023-10-05T06:16:45.866096",
      "dut_end_time": "2023-10-05T06:24:13.533394",
      "dut_name": "igalia-ci01-rpi3-1gb",
      "dut_state": "finished",
      "dut_job_phases": [
        {
          "name": "boot",
          "start_time": "2023-10-05T06:16:45.865863",
          "end_time": "2023-10-05T06:17:14.801002"
        },
        {
          "name": "test",
          "start_time": "2023-10-05T06:17:14.801009",
          "end_time": "2023-10-05T06:24:13.610296"
        }
      ],
      "submitter_end_time": "2023-10-05T06:24:13.680729"
    }
  ],
  "job_combined_status": "pass",
  "dut_attempt_counter": 1
}

This class uses the existing StructuredLogger module,
which provides a robust and flexible logging utility supporting multiple
formats. It also includes a command-line tool for updating, creating,
and modifying dut jobs and phases through command-line arguments.
This can be used in ci job scripts to update information in structured logs.
Unit tests also have been added for the new class.

Currently, only LAVA jobs create structured log files, and this will be
extended for other jobs using this tool.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25179>
2023-12-19 10:09:35 +00:00
..
ci ci: Add CustomLogger class and CLI tool 2023-12-19 10:09:35 +00:00
pick pick-ui: add Backport-to: XX.Y nomination 2023-10-07 19:00:17 +00:00
.editorconfig bin: use tabs for coding style on *.sh files 2017-05-09 14:05:00 +03:00
__init__.py scripts: Add a gen_release_notes.py script 2019-10-03 20:15:19 +00:00
commit_in_branch.py commit_in_branch.py: variables cleanup 2022-11-30 17:08:48 +00:00
commit_in_branch_test.py commit_in_branch.py: variables cleanup 2022-11-30 17:08:48 +00:00
gen_calendar_entries.py bin: Fix typos 2023-03-30 21:37:00 +00:00
gen_calendar_entries_test.py bin: Fix typos 2023-03-30 21:37:00 +00:00
gen_release_notes.py docs: Generate document with utf8 encoding 2023-12-07 12:41:07 +00:00
gen_release_notes_test.py bin/gen_release_notes: escape at-symbols 2023-10-16 08:59:07 +00:00
gen_vs_module_defs.py bin: Fix typos 2023-03-30 21:37:00 +00:00
git_sha1_gen.py git_sha1_gen.py: fix whitespace 2020-05-20 22:05:41 +00:00
install_megadrivers.py python: drop python2 support 2021-08-14 21:44:32 +00:00
khronos-update.py bin: Update spirv sources 2023-08-18 16:57:22 +00:00
meson-cmd-extract.py bin/meson-cmd-extract: Also handle cross and native files 2019-01-18 09:37:01 -08:00
meson.build meson: fixes mingw-clang32 building 2022-11-11 05:38:19 +00:00
perf-annotate-jit.py bin: Fix typos 2023-03-30 21:37:00 +00:00
pick-ui.py bin/pick-ui: use asyncio.new_event_loop 2023-06-15 22:37:31 +00:00
pick-ui.sh bin/pick-ui: use venv wrapper 2023-08-03 23:21:32 +00:00
post_version.py gen_release_notes: include links in relnotes.rst when generating the new release note 2023-01-12 14:34:59 +00:00
post_version_test.py docs: store the release-calendar information in csv (and fix tests) 2021-01-07 00:07:56 +00:00
python-venv.sh bin/python-venv: fix venv folder check 2023-12-02 11:48:35 +00:00
refcnt-log-helper.py bin: Add a script for filtering/sorting refcount logs 2022-05-02 16:58:20 +00:00
symbols-check.py bin: Fix typos 2023-03-30 21:37:00 +00:00
update-android-headers.sh android_stub: update platform headers to include atrace 2021-10-09 00:42:32 +00:00