we are working with Pull Requests and everything works fine, instead of one thing: the Pull Request Analysis are not deleted as expected after (configured) 21 days.
We have two long-lived branches: master and develop
Our Pull Requests are linked to the develop branch.
The SonarQube documentation says: PR analyses on SonarQube are deleted automatically after 30 days with no analysis.
As mentioned, we changed the configuration to 21 days, but as shown in the screenshot the old pull requests analysis are still there.
Our understanding is, that the pull request analysis where deleted when a new analysis on the parent branch was executed. The last analysis on the parent branch âdevelopâ was today.
To be clear, short-lived branches and PRs arenât deleted on a timer; housekeeping is triggered by analysis. Nonetheless, your screenshot shows that your develop branch was analyzed âyesterdayâ so that should have triggered housekeeping in general.
This is working on our dogfood server. Weâve set our housekeeping period to 7 days, and the oldest PR I see on the project Iâm looking at right now is 7 days old. Iâm assuming it rounded up to 7 days and if I look tomorrow that PR will be gone.
So⌠do you see any errors in your $SONARQUBE_HOME/logs/ce.log? In your projectâs background tasks page?
And just to verify, I wonder if you could trigger analysis of the master branch and see if that does/doesnât trigger the cleanup of those stale PRsâŚ?
thanks for your reply.
Iâve checked some things:
background task page: no Status != âSuccessâ found. In the âscanner contextâ from the last analysis on develop I see : sonar.dbcleaner.daysBeforeDeletingInactiveShortLivingBranches=21
the ce.log shows no error
So I tried to run an analysis on master (which is marked as âMain Branchâ in Sonar) and the PRs and short-lived branches were deleted.
Is this the correct behaviour?
Shouldnât an analysis on every âlong-livedâ branch trigger the houskeeping for his âchildâ-branches?