Hi @Bachri_Abdel,
thanks for the reply.
Yes, I can see that incremental caching seems to be a rather new addition. Though that in my opinion makes it only more difficult to understand everything about caching and some updates to the documentation are due.
Could you share some light on this “Plugin Cache”? Is it somewhere documented what it downloads and where it stores it? Sadly this still isn’t 100% clear to me on how it behaves and how it compares to any (as mentioned in my post) local analysis cache (in terms of location, setup, etc… of course I understand that it stores different data).
Looking at the verbose/debug log, I assume you are talking about this?
I can see that it stores data in .sonar/_tmp and isn’t touching .sonar/cache, I am still not 100% certain how this relates to caching.
debug log snippet
2024-09-13T09:31:34.940+0200 [INFO] [org.sonarqube.gradle.SonarTask] Loading required plugins
2024-09-13T09:31:34.941+0200 [INFO] [org.sonarqube.gradle.SonarTask] Load plugins index
2024-09-13T09:31:34.941+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] --> GET https://sonar.somesite.com/api/plugins/installed
2024-09-13T09:31:34.951+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] <-- 200 https://sonar.somesite.com/api/plugins/installed (10ms, unknown-length body)
2024-09-13T09:31:34.976+0200 [DEBUG] [okhttp3.internal.concurrent.TaskRunner] Q10000 scheduled after 0 µs: OkHttp ConnectionPool
2024-09-13T09:31:34.976+0200 [INFO] [org.sonarqube.gradle.SonarTask] Load plugins index (done) | time=36ms
2024-09-13T09:31:34.976+0200 [INFO] [org.sonarqube.gradle.SonarTask] Load/download plugins
2024-09-13T09:31:34.977+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Download plugin 'cayc' to '/builds/project/repo/.sonar/_tmp/fileCache18085346404613052130.tmp'
2024-09-13T09:31:34.979+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] --> GET https://sonar.somesite.com/api/plugins/download?plugin=cayc
2024-09-13T09:31:34.985+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] <-- 200 https://sonar.somesite.com/api/plugins/download?plugin=cayc (6ms, unknown-length body)
2024-09-13T09:31:34.997+0200 [DEBUG] [okhttp3.internal.concurrent.TaskRunner] Q10000 scheduled after 0 µs: OkHttp ConnectionPool
2024-09-13T09:31:35.004+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Download plugin 'iac' to '/builds/project/repo/.sonar/_tmp/fileCache10202762265121085898.tmp'
2024-09-13T09:31:35.004+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] --> GET https://sonar.somesite.com/api/plugins/download?plugin=iac
2024-09-13T09:31:35.030+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] <-- 200 https://sonar.somesite.com/api/plugins/download?plugin=iac (25ms, unknown-length body)
2024-09-13T09:31:35.400+0200 [DEBUG] [okhttp3.internal.concurrent.TaskRunner] Q10000 scheduled after 0 µs: OkHttp ConnectionPool
2024-09-13T09:31:35.429+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Download plugin 'jacoco' to '/builds/project/repo/.sonar/_tmp/fileCache15026281678329345347.tmp'
2024-09-13T09:31:35.429+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] --> GET https://sonar.somesite.com/api/plugins/download?plugin=jacoco
2024-09-13T09:31:35.434+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] <-- 200 https://sonar.somesite.com/api/plugins/download?plugin=jacoco (4ms, unknown-length body)
2024-09-13T09:31:35.434+0200 [DEBUG] [okhttp3.internal.concurrent.TaskRunner] Q10000 scheduled after 0 µs: OkHttp ConnectionPool
2024-09-13T09:31:35.435+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Download plugin 'python' to '/builds/project/repo/.sonar/_tmp/fileCache12672099416329084750.tmp'
2024-09-13T09:31:35.435+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] --> GET https://sonar.somesite.com/api/plugins/download?plugin=python
2024-09-13T09:31:35.439+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] <-- 200 https://sonar.somesite.com/api/plugins/download?plugin=python (3ms, unknown-length body)
2024-09-13T09:31:35.683+0200 [DEBUG] [okhttp3.internal.concurrent.TaskRunner] Q10000 scheduled after 0 µs: OkHttp ConnectionPool
2024-09-13T09:31:35.708+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Download plugin 'text' to '/builds/project/repo/.sonar/_tmp/fileCache16533199212220783691.tmp'
2024-09-13T09:31:35.708+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] --> GET https://sonar.somesite.com/api/plugins/download?plugin=text
2024-09-13T09:31:35.713+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] <-- 200 https://sonar.somesite.com/api/plugins/download?plugin=text (4ms, unknown-length body)
2024-09-13T09:31:35.833+0200 [DEBUG] [okhttp3.internal.concurrent.TaskRunner] Q10000 scheduled after 0 µs: OkHttp ConnectionPool
2024-09-13T09:31:35.845+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Download plugin 'textenterprise' to '/builds/project/repo/.sonar/_tmp/fileCache11489382043522876673.tmp'
2024-09-13T09:31:35.845+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] --> GET https://sonar.somesite.com/api/plugins/download?plugin=textenterprise
2024-09-13T09:31:35.850+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] <-- 200 https://sonar.somesite.com/api/plugins/download?plugin=textenterprise (5ms, unknown-length body)
2024-09-13T09:31:35.980+0200 [DEBUG] [okhttp3.internal.concurrent.TaskRunner] Q10000 scheduled after 0 µs: OkHttp ConnectionPool
2024-09-13T09:31:35.998+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Download plugin 'xml' to '/builds/project/repo/.sonar/_tmp/fileCache12512019228720803834.tmp'
2024-09-13T09:31:35.998+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] --> GET https://sonar.somesite.com/api/plugins/download?plugin=xml
2024-09-13T09:31:36.005+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] <-- 200 https://sonar.somesite.com/api/plugins/download?plugin=xml (6ms, unknown-length body)
2024-09-13T09:31:36.068+0200 [DEBUG] [okhttp3.internal.concurrent.TaskRunner] Q10000 scheduled after 0 µs: OkHttp ConnectionPool
2024-09-13T09:31:36.073+0200 [INFO] [org.sonarqube.gradle.SonarTask] Load/download plugins (done) | time=1096ms
2024-09-13T09:31:36.073+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Plugins not loaded because they are optional: [abap, sonarapex, csharp, cpp, cfamilydependencies, cobol, dbd, dbdjavafrontend, dbdpythonfrontend, flex, go, web, jcl, javasymbolicexecution, java, javascript, kotlin, php, pli, plsql, rpg, ruby, sonarscala, swift, tsql, vbnet, vb, security, securitycsharpfrontend, securityjsfrontend, securityjavafrontend, securityphpfrontend, securitypythonfrontend]
2024-09-13T09:31:36.097+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Plugins loaded:
2024-09-13T09:31:36.097+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] * Text Code Quality and Security 2.12.1.2905 (textenterprise)
2024-09-13T09:31:36.097+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] * Python Code Quality and Security 4.19.0.15616 (python)
2024-09-13T09:31:36.097+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] * Clean as You Code 2.3.0.1782 (cayc)
2024-09-13T09:31:36.097+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] * XML Code Quality and Security 2.10.0.4108 (xml)
2024-09-13T09:31:36.097+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] * JaCoCo 1.3.0.1538 (jacoco)
2024-09-13T09:31:36.097+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] * IaC Code Quality and Security 1.31.0.10579 (iac)
2024-09-13T09:31:36.097+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] * Text Code Quality and Security 2.12.1.2905 (text)
[...]
2024-09-13T09:31:50.655+0200 [INFO] [org.sonarqube.gradle.SonarTask] Loading plugins for detected languages
2024-09-13T09:31:50.655+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Detected languages: [java]
2024-09-13T09:31:50.655+0200 [INFO] [org.sonarqube.gradle.SonarTask] Load/download plugins
2024-09-13T09:31:50.655+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Download plugin 'dbd' to '/builds/project/repo/.sonar/_tmp/fileCache6523159669426988533.tmp'
2024-09-13T09:31:50.656+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] --> GET https://sonar.somesite.com/api/plugins/download?plugin=dbd
2024-09-13T09:31:50.661+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] <-- 200 https://sonar.somesite.com/api/plugins/download?plugin=dbd (5ms, unknown-length body)
2024-09-13T09:31:50.724+0200 [DEBUG] [okhttp3.internal.concurrent.TaskRunner] Q10000 scheduled after 0 µs: OkHttp ConnectionPool
2024-09-13T09:31:50.734+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Download plugin 'dbdjavafrontend' to '/builds/project/repo/.sonar/_tmp/fileCache9632236013435957344.tmp'
2024-09-13T09:31:50.734+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] --> GET https://sonar.somesite.com/api/plugins/download?plugin=dbdjavafrontend
2024-09-13T09:31:50.739+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] <-- 200 https://sonar.somesite.com/api/plugins/download?plugin=dbdjavafrontend (5ms, unknown-length body)
2024-09-13T09:31:50.764+0200 [DEBUG] [okhttp3.internal.concurrent.TaskRunner] Q10000 scheduled after 0 µs: OkHttp ConnectionPool
2024-09-13T09:31:50.769+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Download plugin 'javasymbolicexecution' to '/builds/project/repo/.sonar/_tmp/fileCache16262239370953974656.tmp'
2024-09-13T09:31:50.769+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] --> GET https://sonar.somesite.com/api/plugins/download?plugin=javasymbolicexecution
2024-09-13T09:31:50.774+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] <-- 200 https://sonar.somesite.com/api/plugins/download?plugin=javasymbolicexecution (5ms, unknown-length body)
2024-09-13T09:31:50.953+0200 [DEBUG] [okhttp3.internal.concurrent.TaskRunner] Q10000 scheduled after 0 µs: OkHttp ConnectionPool
2024-09-13T09:31:50.972+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Download plugin 'java' to '/builds/project/repo/.sonar/_tmp/fileCache16487487931468384048.tmp'
2024-09-13T09:31:50.972+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] --> GET https://sonar.somesite.com/api/plugins/download?plugin=java
2024-09-13T09:31:50.979+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] <-- 200 https://sonar.somesite.com/api/plugins/download?plugin=java (6ms, unknown-length body)
2024-09-13T09:31:51.346+0200 [DEBUG] [okhttp3.internal.concurrent.TaskRunner] Q10000 scheduled after 0 µs: OkHttp ConnectionPool
2024-09-13T09:31:51.378+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Download plugin 'security' to '/builds/project/repo/.sonar/_tmp/fileCache2868986549702474490.tmp'
2024-09-13T09:31:51.379+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] --> GET https://sonar.somesite.com/api/plugins/download?plugin=security
2024-09-13T09:31:51.385+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] <-- 200 https://sonar.somesite.com/api/plugins/download?plugin=security (5ms, unknown-length body)
2024-09-13T09:31:51.602+0200 [DEBUG] [okhttp3.internal.concurrent.TaskRunner] Q10000 scheduled after 0 µs: OkHttp ConnectionPool
2024-09-13T09:31:51.629+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Download plugin 'securityjavafrontend' to '/builds/project/repo/.sonar/_tmp/fileCache730296424197319892.tmp'
2024-09-13T09:31:51.630+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] --> GET https://sonar.somesite.com/api/plugins/download?plugin=securityjavafrontend
2024-09-13T09:31:51.635+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] <-- 200 https://sonar.somesite.com/api/plugins/download?plugin=securityjavafrontend (5ms, unknown-length body)
2024-09-13T09:31:51.795+0200 [DEBUG] [okhttp3.internal.concurrent.TaskRunner] Q10000 scheduled after 0 µs: OkHttp ConnectionPool
2024-09-13T09:31:51.810+0200 [INFO] [org.sonarqube.gradle.SonarTask] Load/download plugins (done) | time=1156ms
2024-09-13T09:31:51.811+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Optional language-specific plugins not loaded: [abap, sonarapex, csharp, cpp, cfamilydependencies, cobol, dbdpythonfrontend, flex, go, web, jcl, javascript, kotlin, php, pli, plsql, rpg, ruby, sonarscala, swift, tsql, vbnet, vb, securitycsharpfrontend, securityjsfrontend, securityphpfrontend, securitypythonfrontend]
2024-09-13T09:31:51.874+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Plugins loaded:
2024-09-13T09:31:51.874+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] * Vulnerability Rules for Java 10.6.0.31509 (securityjavafrontend)
2024-09-13T09:31:51.874+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] * Vulnerability Analysis 10.6.0.31509 (security)
2024-09-13T09:31:51.874+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] * Java Code Quality and Security 8.0.1.36337 (java)
2024-09-13T09:31:51.874+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] * Dataflow Bug Detection Rules for Java 1.28.0.9315 (dbdjavafrontend)
2024-09-13T09:31:51.874+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] * Java Advanced Code Quality Analyzer 8.0.1.36337 (javasymbolicexecution)
2024-09-13T09:31:51.874+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] * Dataflow Bug Detection 1.28.0.9315 (dbd)
Looking at the log, there is one line:
2024-09-13T09:31:33.385+0200 [DEBUG] [org.sonarqube.gradle.SonarTask] Download https://sonar.somesite.com/batch/file?name=scanner-enterprise-10.6.0.92116-all.jar to /builds/project/repo/.sonar/cache/_tmp/fileCache12079997518889350775.tmp
This seems to store some data in the cache dir, albeit also in _tmp and does not give any direct indication of how long it takes.
Regarding testing in CI, what should I test and which cache should I clean when I update SonarQube?
Another cache appears… SonarLint, interesting. Can you share some documentation? The current SonarLint setup we have is terribly slow and everyone just disables it. Maybe there are some improvements to be done with caching.
Thanks for the feedback, but I am still a bit lost and now have new questions…
Regards,
Patrick