Portfolio: wrong number of analyzed projects

Hi,

I’m using SonarQube Cloud Enterprise and I have a Portfolio whose definition used an explicit list of component project names.

I updated the portfolio definition to use a regex-based list of components.

The portfolio overview page says the portfolio metrics are based on 13 analyzed components projects (out of 21 total components).

But the number of analyzed components for that portfolio is 14.

Is it another issue related to portfolios?

I can share portfolio and missing component URLs in private, if needed.

Thanks in advance!

Hi,

Perhaps. :sweat_smile:

Can you tell me if the 14th item conforms to your regex? Can you share your regex?

 
Thx,
Ann

Hi @ganncamp,

I can confirm the 14th item conforms to my regex, as it is listed in the portfolio breakdown page (and in that page I can see its analyses overview).

I can share my regex, by I’d prefer to do that privately as it exposes company details I’d prefer to keep private.

Hi,

Okay, so it’s the count that’s off, not what’s in the portfolio.

I’ve flagged this for the team.

 
Thx,
Ann

Hi @ftlvz , we’re starting to investigate this. We are aware of an issue that can cause this to happen for brief periods of time - wanted to check in with you whether you are still seeing this happening in your portfolio?

Hi @christoph.sachse,

at the momento I am NOT seeing the issue happening in the portfolio.

Hi @christoph.sachse, I’m sorry, my previous answer was wrong: I checked again the portfolio and the issue is still happening.

The portfolio overview page says the portfolio metrics are based on 15 analyzed components projects (out of 22 total components), but the number of analyzed components for that portfolio is 16.

Update: I’ve just realized that the component project that is not counted (despite being analyzed) has 0 lines of code (as it contains only JSON files)! That’s strange, but maybe that could be the issue here?

1 Like

Hi @ftlvz, after some investigation, I don’t see any evidence that an “empty” project, or even one that hasn’t yet been analyzed, would be excluded from the project count.

Could it be that you have a “branch” specified in your portfolio definition that is missing from this project?

@ftlvz I sent you a private message to collect some information that will hopefully help us get to the bottom of these portfolio bugs.

Hi @ftlvz,

It turns out that the “Project distribution” numbers on the overview page are based only on projects that have been analyzed. So, if you have some projects in your portfolio that have not been analyzed, the numbers will not match the project count.

Here’s an example from a portfolio where some of the projects don’t have any measures yet, due to not being analyzed:

This could be the reason your project is being excluded from the counts here. You can verify this by navigating to your project in the UI. If the summary says “Not computed”, then it would be excluded.

For the portfolio breakdown strangeness: It turns out there is a bug with the “Show More” button on this page where not all the projects are displayed (we’re triaging this now). Before you click on “Show More”, does the count displayed next to the button seem accurate (it should say “15 of 22 shown”)?

Hi @cody.simms

thank you for your reply, and I am aware that the portfolio metrics are based only on components that have been analyzed.

But that’s not what I’m reporting on this topic.
Here I’m pointing out that my portfolio has 16 analyzed components, but the portfolio Project distribution is based on 15.
So it’ missing one analyzed component.

Incidentally, the missing project has 0 lines of code (it currently consists only of JSON files), but I confirm that its summary page reports the analysis results.

@ftlvz Thanks for clarifying. The only way a project should be excluded from from a distribution on the portfolio overview would be if that project does not contain a measure for the given metric. The most common reason for this would be that the project is not yet analyzed, so I just want to rule that out.

I’ve verified that projects with 0 lines of code should still appear in the distribution if they’ve been analyzed. So something else must be going on here.

You’ve mentioned that the project distribution is based on 15 components. Can you confirm that this is the case for all distributions on the overview? For example, here is a portfolio with differing distribution counts due to constituent projects missing certain measures:

Silly question: How did you determine that this JSON-only project is the one that is missing from the distribution(s)?

Hi @cody.simms,

I confirm all distributions in the portfolio overview page are based on 15 components.

I’m assuming a specific component is the one missing from the distribution because that component is never listed among the analyzed projects in the portfolio measure pages, despite it’s been analyzed.

I’m sending a few screenshots as a reply to your private message.

1 Like