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

save grype db cache on updates to avoid using stale cache db #147

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

saisatishkarra
Copy link
Collaborator

@saisatishkarra saisatishkarra commented Aug 22, 2024

  • Fixes the issue to restore old cache when exists
  • On DB drift, updates DB
  • Save any DB updates back to same cache key and then use it

Issue:
Screenshot 2024-08-21 at 11 54 53 PM

Cache for main branch before PR is merged is stale (5 days old)
Screenshot 2024-08-22 at 12 01 18 AM

Error Saving cache with same key (when multiple jobs / parallel workflows are running at the same time)
Refer Workaround / Refer using-short-lived-caches
Screenshot 2024-08-22 at 12 41 12 AM

After PR is merged into main branch (Refer to action run after PR is merged for main branch):
Screenshot 2024-08-22 at 1 49 15 AM

@saisatishkarra saisatishkarra requested a review from a team as a code owner August 22, 2024 04:42
Copy link

Luacheck Report

1 files  ±0  1 suites  ±0   0s ⏱️ ±0s
4 tests ±0  4 ✅ ±0  0 💤 ±0  0 ❌ ±0 
8 runs  ±0  8 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit fecaf6f. ± Comparison against base commit a213265.

@saisatishkarra saisatishkarra merged commit 7886e65 into main Aug 22, 2024
12 checks passed
@saisatishkarra saisatishkarra deleted the fix/save-grype-db-cache-update branch August 22, 2024 05:10
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.

2 participants