We are using both the Portfolio Overview and the Project Overview within SonarCloud Enterprise. Here we have noticed that the measures do not align with the actual underlying projects. The integration we are using is done with Azure DevOps Services.
For example: The portfolio displays a LoC count of 48,5k (overall), while the project itself displays 46,6k (overall on main). We have a couple (not all) projects where this is the case.
The same occurs for the code coverage, i.e. the portfolio displays the overall coverage for one of our projects at ~55%, while the project overview shows overall 75% (on main). Generally the difference for our coverage results is the biggest, which are quite far apart from each other.
I cannot explain the behavior on why this happens. I can share further details on our project setup within a private conversation.
Can you share some screenshots of the discrepancies you’re seeing? I can’t reproduce this on any of our internal portfolios. It would be good to see exactly where you’re seeing the discrepancy.
Have any of the portfolio definitions changed recently, or did you delete any projects that were in this portfolio? (Asking because we recently found some buggy behavior in that space.)
Are these individual, siloed git projects, or are some of them grouped together in a monorepo?
If you remove any project from the portfolio and then re-add it, it should cause the portfolio to be recomputed. Could you try that to see if it somehow fixes these weird discrepancies?
Also, I’ll send you a private message that you can reply to with any screenshots you think might be helpful.
We have a Portfolio, and import projects via a regular expression, similar to: “something_example_.*”.
I have removed the filter (deleting all projects from them) and set the filter again, thus reimported them. This resulted in the overview showing the correct numbers and measures.
So I assume that this is an issue with the portfolio not updating when a regular expression is used to select the projects.
Hi, I discovered a bug today that prevents portfolios with dynamic project selection (regex in this case) from being recalculated when matching projects are reanalyzed.
This is likely the same issue. We will do our best to fix this bug next iteration!