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

Implement support for automated cache pruning maintenance #101

Merged
merged 4 commits into from
Nov 29, 2023

Conversation

jujaga
Copy link
Member

@jujaga jujaga commented Nov 27, 2023

Description

This PR focuses on filling in the maintenance gap of keeping a cache directory within a specified space limit. This is important for ensuring that PVCs do not become full during the runtime of the application. It will come with the following scheduling defaults and behaviors:

  • Aim to keep the PVC volume no more than 80% full
  • Run twice a week (on Mondays and Thursdays)
  • Iteratively delete the oldest files in the cache until the target ratio is achieved

Commits:

  • 0a6b2a5 Add optional cache cleaner cronJob support to Helm chart
  • 356cde2 Update Kinesis Stream default endpoint
  • c5bc7f5 Implement cacheCleaner utility script to drop old cache objects
  • ea6a2ea Set transient files to always leverage OS temp directory

SHOWCASE-3332

Types of changes

Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING doc
  • I have checked that unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the OpenAPI 3.0 v*.api-spec.yaml documentation (if appropriate)
  • I have added necessary documentation (if appropriate)

Further comments

Previously we were writing transient files into the PVC cache save
directory, which fundamentally does not make sense as it may not
necessarily make its way into the cache. By writing it into the temp
directory, we can alleviate some PVC space pressure in the containers.

Signed-off-by: Jeremy Ho <[email protected]>
By default, the cronJob will be enabled for all deployments and attempt to
keep the specified cache directory no more than 80% full twice a week. This
can be disabled as usual via Helm value overrides.

Signed-off-by: Jeremy Ho <[email protected]>
@jujaga jujaga added bug Something isn't working enhancement New feature or request labels Nov 27, 2023
@jujaga jujaga self-assigned this Nov 27, 2023
@jujaga jujaga changed the title Implement support for cache pruning maintenance Implement support for automated cache pruning maintenance Nov 27, 2023
Copy link

Coverage Report

Totals Coverage
Statements: 16.18% ( 139 / 859 )
Methods: 26.47% ( 18 / 68 )
Lines: 15.43% ( 81 / 525 )
Branches: 15.04% ( 40 / 266 )

@jujaga jujaga marked this pull request as ready for review November 27, 2023 23:39
@TimCsaky TimCsaky merged commit 72442a8 into master Nov 29, 2023
14 of 16 checks passed
@jujaga jujaga deleted the fix/filecache branch November 29, 2023 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants