Skip to content

Simplecov json report fails to process #3592

@spalmurray

Description

@spalmurray

See thread in codecov/feedback#726 for example report that will have this bug looks like the key is "coverage" not "files" as we expect.

Note that this isn't reproducible without either fixing #3591 or a manual override (comment our VOneProcessor in json processor list).

It seems our simplecov format is outdated. We may need to support multiple versions. Maybe check usage of simplecov though, it might be possible to do a breaking change if nobody uses the current implementation. A quick look at the last 5 years of simplecov changelog didn't reveal anything relevant, so maybe this was just always broken...

worker-1  |  File "/app/apps/worker/services/report/languages/simplecov.py", line 38, in from_json
worker-1  |     for data in json["files"]:
worker-1  |                 ~~~~^^^^^^^^^
worker-1  | KeyError: 'files'

Edit: Simplecov is not necessarily JSON. HTML is the default format, but many formats are supported. Our current docs suggest cobertura and lcov with simplecov, and both of these seem to work. This issue concerns specifically json. See the above thread for details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions