添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
  • Languages of the repository: Java, JS, TS
  • During our PR analyzing, SonarCloud posts multiple warnings like these for different files:

    [WARNING] Could not find key java:contentHash:MD5:<orgname>:<path to file>in the cache
    

    Should we worry about this/tune something in order to avoid this issue?

    Hello @Colin!

    Here is a bigger part of the log (NOTE: some of strings are replaced because they contain commercial content)

    [INFO] ------------- Run sensors on module <hidden>
    [INFO] Load metrics repository
    [INFO] Load metrics repository (done) | time=80ms
    [INFO] Sensor cache enabled
    [INFO] Load sensor cache
    [INFO] Load sensor cache (404) | time=270ms
    [INFO] Sensor JavaSensor [java]
    [INFO] Configured Java source version (sonar.java.source): 8, preview features enabled (sonar.java.enablePreview): false
    [INFO] JavaClasspath initialization
    [INFO] JavaClasspath initialization (done) | time=19ms
    [INFO] JavaTestClasspath initialization
    [INFO] JavaTestClasspath initialization (done) | time=8ms
    [INFO] The Java analyzer is running in a context where unchanged files can be skipped. Full analysis is performed for changed files, optimized analysis for unchanged files.
    [WARNING] Could not find key java:contentHash:MD5:<hidden>:<path to file> in the cache
    [WARNING] Could not find key java:contentHash:MD5:<hidden>:<path to file2> in the cache
    [WARNING] Could not find key java:contentHash:MD5:<hidden>:<path to file3> in the cache
    [WARNING] Could not find key java:contentHash:MD5:<hidden>:<path to file4> in the cache
    [WARNING] Could not find key java:contentHash:MD5:<hidden>:<path to file5> in the cache
    [WARNING] Could not find key java:contentHash:MD5:<hidden>:<path to file6> in the cache
    [INFO] Server-side caching is enabled. The Java analyzer was able to leverage cached data from previous analyses for 0 out of 6 files. These files will not be parsed.
    [INFO] No "Main" source files to scan.
    [INFO] Using ECJ batch to parse 6 Test java source files with batch size 500 KB.
    [INFO] Starting batch processing.
    [WARNING] Could not find key java:contentHash:MD5:<hidden>:<path to file> in the cache
    [WARNING] Could not find key java:contentHash:MD5:<hidden>:<path to file2> in the cache
    [WARNING] Could not find key java:contentHash:MD5:<hidden>:<path to file3> in the cache
    [WARNING] Could not find key java:contentHash:MD5:<hidden>:<path to file4> in the cache
    [WARNING] Could not find key java:contentHash:MD5:<hidden>:<path to file5> in the cache
    [WARNING] Could not find key java:contentHash:MD5:<hidden>:<path to file6> in the cache
    [INFO] 100% analyzed
    [INFO] Batch processing: Done.
    [INFO] Did not optimize analysis for any files, performed a full analysis for all 6 files.
    [INFO] No "Generated" source files to scan.
    [INFO] Sensor JavaSensor [java] (done) | time=1844ms
    

    (just one example, we have much more). Please let me know if that’s enough or more info is needed from the log or environment we run Sonar in.

    Hi @lrozenblyum,

    Thank you for reporting.

    No need to worry about these log messages. Currently, from your side, there is nothing you can do.
    We reevaluated the log level they have, and we decided to lower them.
    Here is a ticket to track progress [SONARJAVA-4528] - Jira.

    All the best,

    Irina

    [WEBINAR] Driving DevOps Transformation: Leveling up CI/CD with Static Code Analysis - April 17 Register Now