Portfolio recalculation time

I’m using SonarQube EE v7.9.1.
Working on Setting up Portfolio.
How does the recalculation work, does it compute every time when a project is analyzed or just at the start of the hour which I set in config->portfolios->recaluclate?

image

If I leave it blank it will recalculate when portfolio is outdated. when do portfolios get outdated?

Thanks.

Hi,

Congratulations! You’re the first one to ask about this brand new feature! :joy:

By default, all affected portfolios will be recalculated automatically after each project analysis or issue update, and that’s the behavior you get if you leave that setting blank.

However, some people want to throttle that back, so in the setting you’ve shown you can give the hours of the day at which recalculation will take place. When the clock ticks around to one of those hours, each ‘stale’ portfolio will be recalculated. Portfolios without changes to underlying projects will be left alone.

 
HTH,
Ann

Hi Ann,

Thanks for the response.

You mentioned by default all affected portfolios will be recalculated automatically after each project analysis.
Do the portfolios be recalculated only if project analysis is on master branch? or can it be on feature branches as well?
I observe it being recalculated only when there is a project analysis on master branch:

Portfolio background tasks:

Project background tasks:

Hi,

You’re correct that this is for master branches only in Portfolios. For Applications, you can set up Long-Lived Branches that aggregate the underlying projects’ Long-Lived Branches. In that case the correct Application branch calculation is triggered when the underlying project branch is re-analyzed. But this is not available (yet?..) for Portfolios.

Since I’ve raised the topic of Applications, I need to clarify that they’re exempt from the scheduling; they’re always “live.” Why the difference? Portfolios can aggregate hundreds of projects, either directly or through the tree and thus clog your queue for significant periods, but Applications are likely to always be small since they’re manually configured and you can’t construct a tree of them.

 
HTH,
Ann