Hello Everyone,
I’m checking the Housekeeping setting under Project Settings > General Settings > HouseKeeping. These are set to some default values at the moment.
To make a change in default values at an organisation level the change needs to be made in “Administration > General > Housekeeping .”
I’m using the below version and documentation for the above info:
Version: Enterprise Edition Version 9.9.3 (build 79811)
Documentation: SonarQube housekeeping
I’m not having access to the Administration Settings so I need help in understanding the below points to complete my analysis and request changes from the admin. The analysis snapshots for the same day are getting deleted (when there are more than one) and I want to prevent that:
Quoted from docs: “Only one snapshot per day is kept after 1 day. Snapshots marked by an event are not deleted.”
- Can this housekeeping rule be simply disabled?
- What is a snapshot marked by an event?
- Can I mark a sonarqube analysis run against any commit SHA in the main/release branch as an event so it’s not deleted?
I also request someone to share a description and acceptable range of values for the following properties:
- sonar.dbcleaner.hoursBeforeKeepingOnlyOneSnapshotByDay
- sonar.dbcleaner.weeksBeforeKeepingOnlyOneSnapshotByWeek
- sonar.dbcleaner.weeksBeforeKeepingOnlyOneSnapshotByMonth
Any reference in documentation of the description or range is also helpful or any use case examples of the above, I couldn’t find any. All I found was this piece of info but not sure of its accuracy.
Source: sonar-tools · PyPI
INFO:
- DB Cleaner:
- Delay to delete inactive SLB (7.9) or branches (8.x) between 10 and 60 days
- Delay to delete closed issues between 10 and 60 days
- sonar.dbcleaner.hoursBeforeKeepingOnlyOneSnapshotByDay between 12 and 240 hours (0.5 to 10 days)
- sonar.dbcleaner.weeksBeforeKeepingOnlyOneSnapshotByWeek between 2 and 12 weeks (0.5 to 3 months)
- sonar.dbcleaner.weeksBeforeKeepingOnlyOneSnapshotByMonth between 26 and 104 weeks (0.5 year to 2 years)
- sonar.dbcleaner.weeksBeforeDeletingAllSnapshots between 104 and 260 weeks (2 to 5 years)
Thank you for your time.