Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

metalix2
Copy link
Contributor

@metalix2 metalix2 commented Dec 22, 2023

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

  • 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?

@metalix2
Copy link
Contributor Author

metalix2 commented Jan 3, 2024

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 👍

@metalix2
Copy link
Contributor Author

Any thoughts on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant