Scanning seems to work fine but for the cache, it won’t find any hits:
Restoring cache
00:05
Checking cache for Run Sonarqube-non_protected...
Downloading cache.zip from https://<s3-bucket>
Successfully extracted cache
INFO: The Python analyzer was able to leverage cached data from previous analyses for 0 out of 298 files. These files were not parsed.
INFO: Hit the cache for 0 out of 22
INFO: Miss the cache for 22 out of 22: ANALYSIS_MODE_INELIGIBLE [22/22]
I’m not sure why it doesn’t have any hits, the cache extraction/location is the same (/.sonar/cache)
SonarQube version: Enterprise Edition Version 9.9 SonarScanner 4.8.0.2856
Forgive me, Its been a couple of years since I did this at another job. I thought the .sonar/cache directory was where it would cache previously analyzed file data to speed up the process for future scans of the same builds, but .sonar/cache is for the plugins of the scanner, is that correct?
So, after reading some other posts, I see where my confusion was here, for anybody coming across this:
For language analyzers, it seems that caching locally c/c++ is available, but i don’t see that for python/javascript/etc.
Next, that only Pull Requests/Merge Request analysis will cache hits from the server (thank you Colin). We were doing pipelines only on merges, but will probably change that to be MR’s to make use of the server side caching.