Github plugin not reporting even critical and blocker issues in PR

Versions
Sonarqube server: 6.7.4 community
Scanner: sonar-scanner-3.3.0
Github Plugin: 1.4.2
CI: Bitrise

Quality gate fails because of critical and blocker issues but when i integrate it with github plugin
check is passed(green) for PR though critical and blocker issues are present.

Hi,

How about some screenshots?

 
Ann

Hi,

Only Quality Gate conditions “on New Code” are applied to PRs. Your failing QG conditions are on overall code. That’s why they’re not being applied.

 
HTH,
Ann

When first time code is analyzed its new for sonar right. So, it should report under PR?

Hi,

In the first analysis of a project, nothing is “new”. In the first analysis of a PR the SCM data is used to determine what’s new IIRC.

 
Ann

Thanks a lot for your help @ganncamp!!!

Hi @ganncamp recently deliberately generated new critical issue still it was not reported under PR in Github.

Hi,

I’m gonna need a little more than this…

 
Ann

Please let me know if you need anything else

Hi,

How about a screenshot of the blame data for the line the issue is raised on? E.G.:

Selection_999(085)

 
Ann

Hi @ganncamp,
Please check the below screenshots

Screenshot from 2020-05-12 10-04-26

Hi,

Thanks for the screenshots. Your initial post said you were on SonarQube 6.7.4. IIRC, that version didn’t include PR decoration. What version are you on today?

I’ll be honest, nothing’s jumping out at me here, but I don’t have a firm handle on how “new” is calculated in every version. (As you would imagine, we’ve refined and improved it from version to version.)

 
Ann

Yes, I’m on the same version. When we implemented the github plugin and tested,
I found it was working. At that time also, generated critical issues deliberately and they were reported.
But now its not reporting any issue, always showing green for the check. I tried generating critical issues in couple of PR’s but always getting green check.

Hi,

It’s difficult for me to tell what’s going on. What I can say though is that 6.7.4 is past EOL. The current version is 8.3, and the current LTS is 7.9.3. You should upgrade at your earliest convenience and come back to us if the problem persists.

 
Ann

Hi @ganncamp getting this in CI logs

WARN: Invalid character encountered in file /var/lib/jenkins/workspace/xxxxxxxxxxxxxxxxxxxxx/src/main/resources/config/tls/keystore.p12 at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property ‘sonar.sourceEncoding’.
INFO: 858/858 components tracked
INFO: ANALYSIS SUCCESSFUL
INFO: Executing post-job GitHub Pull Request Issue Publisher

is this warning is the matter of concern?

It’s “only” a warning. You might want to take care of it (or you might decide it’s not worth your time).

 
HTH,
Ann