Skip to content

Parallel builds feature corrupts and grossly inflates coverage numbers if cobertura.xml has multiple entries per file with different path separators #1830

@HebaruSan

Description

@HebaruSan

Hi!

I am attempting to move from Ubuntu-only coverage numbers to Ubuntu-and-Windows coverage numbers in KSP-CKAN/CKAN#4454. As far as I can tell, the Parallel Builds feature is supposed to be able to handle this. Toward that end, I set up a matrix-strategy job in our GitHub workflows that collects and uploads coverage data from both platforms, then finalizes them with the parallel-finished input (including the rerun_build workaround from #1629).

After struggling to get merged data that made sense, I set up a temporary test in which only the Windows numbers were "merged" (scare quotes because there's only one source build) into the final parallel build. If parallel builds were working as they're supposed to, I would expect to see the same numbers for all stats between the two builds, but that's not what happens.

Windows build: https://coveralls.io/jobs/173106504

image

The numbers are approximately accurate, comparing to the previous build on the main branch; they're a bit higher than I expected, but it's not inconceivable that the differences between platforms are significant enough to account for that. More investigation is called for once this parallel builds project is completed.

However, the "merged" data bears almost no resemblance to the only sole single build upon which it is supposedly based (and to which it links):

Merged: https://coveralls.io/builds/76114443

Image image
  • 89.66% became 100.0%
  • 84.46% became 99.05%
  • 83.68% became 98.35%
  • 88.92% became 98.93%
  • 87.67% became 99.35%

These numbers are clearly not accurate or usable for the intended purpose of assessing the overall coverage.

The picture is no rosier at the individual file level. The accurate data in the Windows build shows the same "usual suspects" that show up as having double- and triple-digit missed lines in our main branch builds up to this point:

Image

In the "combined" build, no file has more than 4 missed lines!

Image

This data is not usable for the purpose of finding files that need more or better tests.

Coverage data that we are generating before the GitHub Action runs:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions