We are trying to achieve Quality gate to act on new code as soon as the second analysis is performed on the newly created project.
We are using SonarQube 8.9 LTS (8.9.0.43852)
Issue: When we have new project created, SonarQube is not showing the analysis on new code for next 5 hours (Time between Project Creation Time till +5 hrs)
Steps to reproduce:
check in a baseline build of any code
Build the code and get a Sonar Report
Check in changes to TFS. These should be analyzed as new code
View the timestamp on the change in Sonar (this is the bug, the timestamp doesn’t match TFS)
The timestamp reflected in Sonar Matches the actual time of checkin.
New code checked in after initial build is analyzed
We tried building the project multiple times by changing the code and the scanner didn’t show the changes on the new code. We see the updates on new code only after 5 Hours (UTC to CST time difference)
We had similar issue in 7.9 LTS version so we upgraded to 8.9 LTS assuming the issue could be fixed.
We also tried updating the Time zone in sonar.properties file to use UTC, America/Chicago and the default values for the below properties but didn’t help.
Thanks for your response.
For your question, No, both TFS and SonarQube are in the same location but some how SonarQube doesn’t detect New Code for the next 5 hrs as shown in the above screenshot. This happens only for the new projects and stay there for the first 5 hrs period (Time difference between UTC and CST).
Sonarqube server is in CST timezone. (TFS & Build Agent servers are also in the same timezone)
Also, We are using the default values in the sonar.properties file #sonar.web.javaAdditionalOpts= #sonar.ce.javaAdditionalOpts= #sonar.search.javaAdditionalOpts=
Do we have any references in Database. If yes, then do we have a query to pull the data?
Thanks for the verification. TBH, whether or not your server timezone matches your timezone, there’s something wrong here. I just wanted to get the “dumb” questions out of the way.
I’ve flagged this for more expert attention since I’m out of my depth at this point. Hopefully they’ll be along soon.
Do I need to provide any other details for this Issue, Or do we have anything that i need to do from my end to get it fixed? Can someone help on this issue.
It’s just been noticed that you created duplicate threads and a different SonarSourcer has engaged with each one. So I’m going to close this thread and you can pursue the issue in your other thread