debian-forge-composer/cmd
Ondřej Budai 2070800244 worker/osbuild: print raw osbuild output if it cannot be parsed
osbuild output should be always JSON-parsable. However, if a user has a weird
installation of osbuild, it can return malformed JSON. In this case, it's
very hard to debug what happened because the worker doesn't provide any
useful information. This commit adds the non-parsable osbuild output to the
error so there's at least some clue in the logs what happened.

Let me reiterate: In 99% these cases, this shouldn't be needed. It will give
us some hints in these 1% cases though.

You may want to ask if using json.Decoder isn't better because it doesn't
buffer the input. However, it does buffer. Firstly, json.Decoder.Decode()
buffers the whole JSON value (it contains kinda cool state machine to do it)
and in the second run, it parses the buffer. Therefore, the only thing that
this commit actually does is that it moves the buffer out of json.Decoder.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2020-11-25 07:37:44 +00:00
..
cloud-cleaner ci: fix artifact name generation in cloud cleaner 2020-10-14 13:00:48 +02:00
osbuild-auth-tests test/auth: rework the test to use the new openssl setup 2020-11-05 13:48:48 +01:00
osbuild-composer worker/server: move it to the style of koji server 2020-11-19 17:39:24 +00:00
osbuild-composer-cli-tests tests: rename composer-cli tests 2020-10-06 13:08:26 +02:00
osbuild-dnf-json-tests tree-wide: drop f31 support 2020-10-21 09:04:13 +02:00
osbuild-image-tests test: restructure dir layout 2020-10-21 09:04:13 +02:00
osbuild-koji upload/koji: don't pass task_id to cg_init_build 2020-09-16 00:15:02 +01:00
osbuild-koji-tests test/koji: move the koji test to schutzbot 2020-11-02 19:59:28 +01:00
osbuild-pipeline distro: add rhel 84 support 2020-11-19 10:36:49 +01:00
osbuild-store-dump distro: replace BasePackages() with Packages() 2020-06-29 16:04:38 +02:00
osbuild-upload-aws Refactor Azure upload code to a separate package 2019-11-27 12:14:07 +01:00
osbuild-upload-azure cmd/osbuild-upload-azure: improve error message on wrong arguments 2020-04-27 20:34:20 +02:00
osbuild-worker worker/osbuild: print raw osbuild output if it cannot be parsed 2020-11-25 07:37:44 +00:00