Template for a good bug report, formatted with Markdown:
versions used (SonarQube : * Community Edition
Version 7.7 (build 23042) LGPL v3 Community
error observed : quality profile for one project in sonarqube getting changed for each analysis. when we check in quality profiles it show the project is assigned to that particular profile but when we go in project overview it shows different profile which is default sonar_way.
Also from activity logs we come to know that the sonar profiles changed from this to this.
PFB are the sonar analysis steps added in project:
potential workaround : checked the logs for build output. in logs it is showing as used profiles. the profiles are changing for each run even we have set the appropriate profile to project.
P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour
In fact, the sonar.profile has been removed in recent versions partly because of exactly what you’re experiencing. When you specify sonar.profile in your analysis, you override the profile that would normally be used. It is expected that you still see the other profile in the UI. Analysis parameters provide a temporary override; they do not re-assign.
Hi Ann,
As you suggested we have removed the sonar.profile from our analysis code.
but still the profile got changed after execution of sonar analysis.
so even after we are not overriding the profile why it is getting changed ? we have not done any kind of change in source code before execution and after execution as well.
I admit that I’m stumped at the moment. I’m not sure how useful this will be, but could you check your analysis logs? If possible I’d like to see everything from the analysis command itself through to the line(s) listing the profiles that will be used.
The above are the analysis commands for my project where i have commented out the quality profile which i am passing thorugh my code. bbut still i am facing the quality profile change issue.
My colleague has pointed out SONAR-11878 to me, which sounds like your problem (altho without analysis logs it’s only a guess). Since that ticket is fixed in 7.8 your best bet is to upgrade to at least 7.9.2 - the current LTS - if not 8.1, the current version.
Thanks Ann,
i am working on upgrade of sonarqube to 8.1 LTS.
but could you please let me know why the issue is happening for only single project, not for the rest all.
Hi Ann,
i have upgraded the version to 8.1 LTS and its working perfectly fine for the project which was facing issue previously. he cause was only the line of code it is having.