-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] set up additional config totalBuildsToKeep
for deleteOldBuilds Job
#997
base: main
Are you sure you want to change the base?
Conversation
Another alternative is to set target projects in the cronJob that way we could create jobs per project with reduced |
Any thoughts on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah shoot, I forgot to "push" this pending review - sorry!
@@ -202,7 +202,8 @@ declare global { | |||
|
|||
export interface DeleteOldBuildsCron { | |||
schedule: string; | |||
maxAgeInDays: number; | |||
maxAgeInDays?: number; | |||
totalBuildsToKeep?: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer maxBuildsToKeep
, just to match the other field here that defines a limit.
actually, just maxBuilds
should do it?
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?