My sonarcloud github action is taking about 3 minutes to run now. I’m trying to see if caching the ~/.sonar/cache directory will help, as I saw done in another sample.
I have the cache working, but I still see this log line when I do the begin step for the sonar scanner CLI:
Cache data is empty. A full analysis will be performed
Does this mean I’m not doing something right? I clearly see the action/cache step downloading the cache from a previous build. But I see the above message in later steps, and my overall workflow time to complete doesn’t change.
My workflow and code is completely open source. You can see an example workflow run here. My workflow YAML is here.
Analyzer cache, stored in ~/.sonar/cache, which prevents analyzers from having to be redownloaded on each run
Analysis cache, reusing results that are stored on SonarCloud to make analysis faster (not having to reanalyze everything).
This message refers to the latter:
This only works in the context of pull requests right now, not of standalone branch analyses (maybe someday!). As a result, it’s normal that the cache data is empty for your workflow run, as it’s for a branch analysis rather than a pull request analysis.
EDIT: Hmm, now that I’m looking, the releases page here does not have release notes. So I’m not really sure where I can keep up to date on new changes to the CLI.
To be very transparent, we’ve put a lot of work into incremental analysis in the last year, and given some other priorites I’m not sure this topic will come up again soon – but the groundwork is laid.
That page you linked is a great resource. Unfortunately I don’t see a way to sign up for a mailing list or subscribe to updates. Would be nice if you had a newsletter of some kind, or release notes I could subscribe to on github.