Upgrade SonarQube v9.3 to v9.6.1 - coverage problem on PR

Hi,

  • We used SonarQube 9.3.0.51899 Community Edition
  • I did an upgrade to a version 9.6.1.59531 and everything works fine except enumerating coverage on Pull Request.
  • JaCoCo is responsible for the coverage however I haven’t noticed any configuration changes for the newer version.
  • After upgrading project data was reloaded, and in “Projects” → “Backgroud Tasks” I can see new scan dates for all tasks and I wonder if this could possibly affect coverage in some way.
  • Users send scans with the same parameters as in version 9.3, where coverage worked on both ‘master’ and ‘PR’. Maybe a higher version of maven-jacoco-plugin is required?
  • I checked the date on the GIT and Sonar side, there are no differences here.
  • I don’t see anything disturbing in /logs/ce.log (TRACE).
  • I made sure new lines of code came whenever I run a scan

Can I ask for any tips?
Thank you in advance.

Hi,

Welcome to the community!

Your screenshot (thanks for including it!) shows “- Coverage on 0 New Lines to cover”.

It looks to me like that particular PR didn’t include any changes to coverable code. Can you verify what the changes in the PR actually were?

 
Ann

Thank you Ann.
We compared this many times between versions and I have many such examples where new lines of code came and the coverage showed:
"Coverage on 0 New Lines to cover:
Teams contacted me with this particular issue after upgrading to 9.6.1.

In version 9.3, when we made a new PR-86 on the same project, Sonar detected 3 new lines to cover.

Hi,

How many lines actually changed in the particular PR from your first screenshot? And how many of them do you consider code? More importantly, how many of them are executable lines, i.e. lines that can be tested? For instance, an import is a line of code, but it’s not executable.

 
Ann