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

Add Cache Invalidation Based on Checksum Files for Cached Images #4

Open
safl opened this issue Oct 13, 2024 · 0 comments
Open

Add Cache Invalidation Based on Checksum Files for Cached Images #4

safl opened this issue Oct 13, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@safl
Copy link
Collaborator

safl commented Oct 13, 2024

Currently, images are cached on each self-hosted runner, but there is no automated method for cache invalidation. The only way to invalidate the cache is by manually logging into the QEMU host and removing the .qcow2 images. To improve this, the cache invalidation process should be automated based on .checksum files associated with the cached images.

By using .checksum files, the system can automatically check whether the cached images are outdated or corrupted, and invalidate the cache if necessary, ensuring that the runners always use valid images.

Requirements

  • Implement a cache invalidation mechanism that checks .checksum files for each cached .qcow2 image.
  • Automatically invalidate and remove cached images if their checksums do not match the corresponding .checksum file.
  • Ensure that checksum verification is triggered:
    • At the start of each test run.
    • During periodic maintenance tasks (if applicable).
  • Provide a manual trigger for cache invalidation based on checksum mismatches via a command or API.
  • Ensure that invalidation is efficient and does not interfere with ongoing tasks.

Acceptance Criteria

  • Cache invalidation is based on the comparison of .qcow2 image checksums against their respective .checksum files.
  • If a mismatch is detected, the cached image is invalidated and removed, prompting the system to fetch or recreate a valid image.
  • Users can manually trigger a checksum-based invalidation.
  • The process is automated, ensuring images remain up-to-date without requiring manual intervention.
  • The cache invalidation process is safe and does not disrupt ongoing operations.
@safl safl added the enhancement New feature or request label Oct 13, 2024
@safl safl changed the title Add checksum of images Add Cache Invalidation Based on Checksum Files for Cached Images Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant