ci/lava: Feed yaml.load with raw bytes data
authorGuilherme Gallo <guilherme.gallo@collabora.com>
Mon, 28 Nov 2022 02:38:33 +0000 (23:38 -0300)
committerMarge Bot <emma+marge@anholt.net>
Wed, 21 Dec 2022 12:44:49 +0000 (12:44 +0000)
commitf040122bedb64bb6f4c26d7e272da874ae7f9a05
treef1d2610395d96c21273f932a22ecef66303f3ce6
parentce0ca7ed21d6c621812db82fce70d4e06881818f
ci/lava: Feed yaml.load with raw bytes data

LAVA uses XMLRPC to send jobs information and control, more specifically
it sends device logs via YAML dumps encoded in UTF-8 bytes.

In Python, we have xmlrpc.client.Binary class as the serializer
protocol, we get the logs wrapped by this class, which encodes the data
as UTF-8 bytes data.

We were converting the encoded data to a string via the `str` function,
but this led the loaded YAML data to use single quotes instead of double
quotes for string values that made special characters, such as `\x1b` to
be escaped as `\\x1b`.

With this fix, we can now drop one of the hacks that fixed the bash
colors.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20051>
.gitlab-ci/lava/lava_job_submitter.py
.gitlab-ci/lava/utils/__init__.py
.gitlab-ci/lava/utils/log_follower.py
.gitlab-ci/tests/test_lava_job_submitter.py
.gitlab-ci/tests/utils/test_lava_log.py