spack / spack-gantry

A Dynamic Resource Allocation System for Spack CI and Kubernetes
Other
2 stars 0 forks source link

Implement pruning mechanism #6

Open cmelone opened 9 months ago

cmelone commented 9 months ago

Problem/Opportunity Statement

We are going to be collecting every single successful build on AWS, but for the prediction, we are only going to need the past 4-5 builds for each potential build. We should remove extraneous entries in the database on a regular basis

What would success / a fix look like?

Cron job that prunes the database. Make sure to pay special attention to what you decide to remove. We probably want to come up with each combination of pkg+ver, compiler+ver, variants to make sure we don't inadvertently delete something that's useful.

cmelone commented 6 months ago

can do this through a k8s cron job, will need to create a container image with the script and access to the db/pvc

see this for an example

https://github.com/spack/spack-infrastructure/blob/main/k8s/production/custom/prune-buildcache/cron-jobs.yaml

cmelone commented 1 month ago

or do this in the existing app and essentially wait for 12 hours before running the pruning function

don't keep longer than 3 months