mesa/bin/ci
Guilherme Gallo eb1945c3d9 bin/ci: Add StructuredLogger to improve log handling
This commit introduces the StructuredLogger module, which provides a
robust and flexible logging utility supporting multiple data formats
(CSV, JSON, and YAML). By incorporating this module into our CI system,
we enhance our log management capabilities, making it easier to:

1. Monitor and analyze logs: The StructuredLogger is a dict-like data
   abstraction which autosaves into a structured data file, whenever it
   is updated. With this file, one can easily know specifics of the job
   execution without having to grep it in the traces logs or exploring
   the job artifacts. The autosave feature makes it useful even when the
   CI job fails unexpectedly, since the partial dict is always written
   back to the disk.
2. Maintain data integrity: The module includes context managers for
   file locking and editing log data, ensuring data integrity and
   preventing race conditions.
3. Support multiple formats: With built-in support for CSV, JSON, and
   YAML formats, this module caters to a wide range of use cases and
   user preferences.
4. Increase maintainability: The modular design of the StructuredLogger
   and its corresponding strategies simplifies maintenance and allows
   for seamless integration of additional formats in the future.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22500>
2023-04-19 14:36:37 +00:00
..
test bin/ci: Add StructuredLogger to improve log handling 2023-04-19 14:36:37 +00:00
.gitignore bin/ci: add gitlab_gql.py.cache to the .gitignore 2023-01-16 15:27:38 +00:00
ci_run_n_monitor.py ci/ci_run_n_monitor: while we usually disable many jobs, print them inline 2023-03-06 01:51:59 +01:00
download_gl_schema.sh ci: move the CI handling scripts into bin/ci 2022-12-19 16:36:19 +01:00
gitlab_common.py ci: move the CI handling scripts into bin/ci 2022-12-19 16:36:19 +01:00
gitlab_gql.py bin: Fix typos 2023-03-30 21:37:00 +00:00
job_details.gql ci: move the CI handling scripts into bin/ci 2022-12-19 16:36:19 +01:00
pipeline_details.gql ci: move the CI handling scripts into bin/ci 2022-12-19 16:36:19 +01:00
requirements.txt ci: move the CI handling scripts into bin/ci 2022-12-19 16:36:19 +01:00
structured_logger.py bin/ci: Add StructuredLogger to improve log handling 2023-04-19 14:36:37 +00:00
update_traces_checksum.py ci: move the CI handling scripts into bin/ci 2022-12-19 16:36:19 +01:00