action #92179
Updated by okurz over 3 years ago
## Observation
See #92164#note-2 :
```
make coverage KEEP_DB=1 TESTS=t/01-test-utilities.t
```
fails with
```
Can't read …/cover_db/runs/1620218733.13161.31806/cover.14 with Sereal: Sereal: Error: Bad Sereal header: Not a valid Sereal document. at offset 1 of input at srl_decoder.c line 600 at /usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi/Devel/Cover/DB/IO/Sereal.pm line 34, <$fh> chunk 1.
```
on openSUSE Leap 15.2
## Workaround
See https://github.com/os-autoinst/openQA/pull/3885
## Further details
See https://chat.suse.de/group/qa-tools?msg=nHxLEavqJPA5bFR3k
It seems like currently the DEVEL_COVER_DB_FORMAT=JSON is only used when running tests, and when producing the report, it is trying to use Sereal, and Sereal complains about JSON
the former "fix" made DEVEL_COVER_DB_FORMAT not set (or passed to the processes) at all. Sereal is the format, and Sereal::Encoder is the perl module that encodes a perl data structure to this format, and Sereal::Decoder decodes it. The Sereal perl module is just a kind of a placeholder requiring Encoder and Decoder.
Devel::Cover uses this format as the default format to enode the coverage data.
We switched to using JSON for codecov. We can say whenever we use Sereal then it's wrong because we use JSON within CI, don't want to support something else in other cases and it fails like it does for us.
e should just make sure that DEVEL_COVER_DB_FORMAT=JSON is correctly set for every target. If it's getting too hard we can move stuff into an external script.
checking if sereal is loaded might break if Sereal is used for something else then coverage in our code. If that would ever happen we could think about it at that time.
it seems like we do not really rely on perl-Sereal elsewhere within the openQA context.