Inconsistent Analysis Results Across Two SonarQube Instances (Version 10.2.1.78527)

Hello SonarQube Community,

We are experiencing an issue with our SonarQube setup. We have two SonarQube instances running version 10.2.1.78527 in our organization. Despite analyzing the same branches and commits, the scan results differ between the two instances.

Details:

  • SonarQube Version: 10.2.1.78527
  • Issue: Different analysis results for the same branches and commits
  • Steps Taken:
    1. Verified that both instances are running the same version.
    2. Ensured that the same quality profiles and rules are applied.
    3. Checked that the same plugins and configurations are used on both instances.
    4. Re-ran the analysis multiple times to confirm the inconsistency.

Observed Behavior: We see different lines of code, issues, and code duplications when we analyze both instances for the same project/branch and quality profiles. We have done our best to confirm that the quality profiles are the same and that they have the same rules activated and parameters set.

Expected Behavior: The analysis results should be consistent across both instances for the same branches and commits.

Actual Behavior: The analysis results differ between the two instances.

Additional Information:

  • Both instances are hosted on a similar infrastructure.
  • No recent changes have been made to the configurations or plugins.

We would appreciate any guidance or suggestions on how to resolve this issue.

Hi @virender.singh,
It will be difficult to help you as 10.2 is no longer supported. The Latest/current version is 10.6.
Nevertheless I can try to give you some ideas
Do you use some cache in the scanner ?
Have you encountered this problem on all types of branches (Short and Long-lived branches) ?
Do you always do analysis on both instances ?

Hello

Thank you for your suggestions!

  • We will update to the latest/current version 10.6 (in testing )
  • Can you please explain how I can check if am using a cache in the scanner
  • I will test and get back to you if I encounter the same problems in all types of branches
  • Yes we analyze on both instances

Hi @virender.singh,

You can check it at the beginning of the scanner logs.

If you want to provide logs, i can try to check if i see any difference.

Hello @Bachri_Abdel

Sorry, I was on vacation and not able to reply!

So current situation:

  • we updated both instances to the latest version 10.6

  • rerun scanner on both instances on the same branch and commit with the same plugin quality profile and quality gate

  • We can still see some difference in results in both instances

  • Instance 1 result :

  • instance 2 result :

  • can you please tell me which logs you want for me?

Thank you

Hello @Bachri_Abdel

After upgrading to the latest version to 10.6, I have cross-checked the quality profile and quality gates and we are good with what results are displayed on both instances, so we close the case!

Thank you for all your support and time!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.