Hi! We have an issue with a project in Sonarcloud. The analysis from a pull request reports several code smells, but we cannot see them in the Sonarcloud issues. We start the analysis from an Azure Devops pipeline. The pull request cannot be completed, because we have a quality gate configured, but the team cannot see the issues that need to be solved or accepted as ‘won’t fix’.
After the analysis there are 8 code smells reported:
Clicking on the ‘8’ to see the code smells leadd to the issues page. There are no issues found. When we navigate to the issues page manually (without filters) we still don’t see the code smells.
Does anyone have an idea how we can see the code smells?
So far we have rerun the analysis, but this issues persists. It also happens on another pull request in this project (23 code smells).
I’ve reached out for some private details.
Hi @nv010 ,
I’ll dig into this issue and update here if I come up with anything relevant. It is definitely something on the SonarCloud side.
I heard the issue is gone for you at the moment, I’m happy to know that.
If it were to happen again, I suspect the situation could be fixed by a new analysis of the same branch, or a new analysis of the main branch of the project maybe. It is just a guess at this point of the investigation, for you to have something to try if it happens again.
Nevermind, I see some analyses happened in between. I continue digging.
Thanks for your patience and for providing the helpful details to Colin,
I don’t know what caused the initial issue with that branch.
We will work on improving our logging so that next time we can find the root cause.
It seems this problem is happening once again, only this time it is a different branch.
@Colin or @Claire_Villard would one of you happen to know solve this problem?
Could you give me the project key and the name of the impacted branch or the pull request key please? I’ll dig immediately.
We were not able to find the root cause on the previous attempt but improved our internal monitoring in case this issue happens again, hopefully, we will be better equipped to dig into it today.
Project key: ------------
Pull request key: ---------
Thank you a lot, I’ll get back to you
We already made progress. The issues are present in our data storage. Now I need to understand why they are not showing up in the results when they should.
Could you confirm that at the moment the issue is still there?
Could you confirm that with the same user account, you are able to see the issues on the other branches of the project?
If the answer is yes to both questions, could you try to ask a project administrator to make any change to the user account permissions related to this project, set them back to their previous value, and test again?
Thanks a lot for your help on the investigation!
- The issues/code smells are still not visible in SonarCloud
- If i visit another branch within my organization, I can view the issues
ex: project key ---------- and PR key ---------- I can see the 3 code smells
I will ask the project admin to try your suggestion.
I will come back when I know more, thanks for your help so far!
Thanks for the details!
Could you test if you can see any issue (whatever the type, not only code smells, bugs, vulnerabilities or security hotspots also work) on any other branch of the same project too, please?
For a different branch on the same project, I cannot see any issues, while there is stated that there are issues.
Okay, it confirms my hypothesis that there is a permission issue within our system. Are you the only one impacted in your team or do some colleagues also experience it?
The workaround I suggested should solve the issue, and I’ll continue digging to understand where it comes from. Could you ask a project administrator if any permission changes were made to your project recently, or were you recently added to the project or the organization maybe?
Other coworkers are also not able to see the issues for this branch.
I am afraid our project admin can only look at the permissions after the weekend.
As far as I know I do not think the permissions are changed recently, I will ask our project admin about this.
I will keep you updated on this.
Okay, that’s interesting! It means it is not a problem related to your account but to the whole project. That’s helpful for the investigation.
About the workaround, to fix for all your coworkers at once, if the permissions are set by user groups, then changing the permissions of the group(s) should work. If the permissions are set at the organization level also.
Do you have any idea when this problem appeared?
The problem occured last thursday, 23rd of November.
Changing the permissions has fixed the problem for me.
Thank you for your help, I hope you can find the problem causing this.