We've found over time that different Projects have more activity than others. We've seen the MAX history for a specific runURL can be as little as 3 weeks ago. Where less frequently tested projects can have a history of 3 Months within the same amount of builds shown in the graph. Due to this wide range we have 2 months worth of builds for the busier project that are unviewable in the UI.
To keep storage optimisied we think the option to be able to keep a MAX amount of builds (like 150 or whatever is available to be viewed in the UI) would be more suitable for the different project types. We don't want to limit all projects to three weeks as they may not make as many frequent changes.
Changes
Added server config totalBuildsToKeep as part of deleteOldBuildsCron
Added findRemainingBuilds method to storage-method to return builds found after totalBuildsToKeep
Changed Configuration Docs for totalBuildsToKeep
Changed Tests and Logic around deleteOldBuilds
Changed maxAgeInDays to be an optional config option. Now either totalBuildsToKeep or maxAgeInDays can be used or both?
Another alternative is to set target projects in the cronJob that way we could create jobs per project with reduced maxAgeInDays. Let me know your preference and I'll update 👍
Background
We've found over time that different Projects have more activity than others. We've seen the MAX history for a specific runURL can be as little as 3 weeks ago. Where less frequently tested projects can have a history of 3 Months within the same amount of builds shown in the graph. Due to this wide range we have 2 months worth of builds for the busier project that are unviewable in the UI.
To keep storage optimisied we think the option to be able to keep a MAX amount of builds (like 150 or whatever is available to be viewed in the UI) would be more suitable for the different project types. We don't want to limit all projects to three weeks as they may not make as many frequent changes.
Changes
totalBuildsToKeep
as part ofdeleteOldBuildsCron
findRemainingBuilds
method tostorage-method
to return builds found aftertotalBuildsToKeep
totalBuildsToKeep
maxAgeInDays
to be an optional config option. Now eithertotalBuildsToKeep
ormaxAgeInDays
can be used or both?