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

Grype DB save/cache fails during matrix jobs #151

Open
saisatishkarra opened this issue Sep 3, 2024 · 0 comments
Open

Grype DB save/cache fails during matrix jobs #151

saisatishkarra opened this issue Sep 3, 2024 · 0 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@saisatishkarra
Copy link
Collaborator

saisatishkarra commented Sep 3, 2024

Summary

  • The Grype cache in matrix jobs requires unique cache key lock to be acquired while saving cache
  • Key: <run_id>_<attempt_id> is not UNIQUE during matrix jobs and requires a fix to override / specific key from downstream workflows.

Options

  1. Skip cache by default and always leverage updated cdn
  • As an emergency failurein case of CDN failures, there won't be caches since they are expired and skipped
  1. Option to override default [<run_id>_<attempt_id>] to make it save unique caches in matrix job
    a. specify option to override cache key as input
    b. Detect if running in matrix contex and generate unique caches based on some prameter.
  • Either way, this is also NOT recommended since multipple cache keys might exhaust github default cache limits of 10GB since each file is 150MB and will be unique for run and attempt and each item in matrix
  1. Host a mirror as Kong repo and use this URL
  • Overhead of effort and maintenance to maintain a list of updated offline grype dbs and consume them
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants