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

ci: Image scanning GitHub Action does not see cached DB #1891

Closed
SanjayVas opened this issue Oct 31, 2024 · 2 comments · Fixed by #1892
Closed

ci: Image scanning GitHub Action does not see cached DB #1891

SanjayVas opened this issue Oct 31, 2024 · 2 comments · Fixed by #1892
Labels
bug Something isn't working

Comments

@SanjayVas
Copy link
Member

The scan-images workflow which uses aquasecurity/trivy-action is not seeing the cached DB from the update-trivy-cache workflow. This was added in #1878 following documentation from the Trivy action. This includes when the update-trivy-cache workflow is run on the same ref as the scan-images workflow.

Cache not found for input keys: cache-trivy-2024-10-31, cache-trivy-

image

@SanjayVas SanjayVas added the bug Something isn't working label Oct 31, 2024
@SanjayVas
Copy link
Member Author

Seeing the following with debug logging:

##[debug]No matching cache found for cache key 'cache-trivy-2024-10-29', version 'cfdc2bcf67bb1c3559bbfba62a7ed98abe2868ecc65f79ee627e58280adbf4d3 and scope refs/tags/nightly/20241028.1. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key 
##[debug]Other caches with similar key:
##[debug]Cache Key: cache-trivy-2024-10-29, Cache Version: 07dc9f6516584e901e644e11f92897f94dbdb6b82f1dda2bb2c3e7fd20bb931a, Cache Scope: refs/heads/main, Cache Created: 2024-10-29T05:13:41.6566667Z

I'm not sure why it's claiming it's a different version or scope, as the default branch (refs/heads/main) should always be in scope.

@SanjayVas
Copy link
Member Author

Filed actions/cache#1491 since according to the documentation, this should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant