CFamily analysis cache questions

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension): SonarQube 9.9.0.65466,
  • how is SonarQube deployed: zip

Hey, a long time ago I set up our C++ scanning to work off an analysis cache not long after that feature was added. To achieve this, I had to:

  • In our Azure Devops CI pipeline
    • copy the source directory from its default checkout location (C:\agent_work?\s\ where ? would be a random number depending on the build machine) to a static location (C:\static-agent)
    • build
    • Cache the output to our pipeline
  • In our Azure Devops PR pipeline
    • Grab the cache from the CI pipeline, using TargetBranch property to find the right one
    • copy the source directory from its default checkout location to the static directory, to ensure it matches

Im doing some updates at the minute and wanted to revisit this. I see there is a server cache option now also, and have a couple questions:

  1. The docs say to use filesystem (as we are today) if

The server cache size becomes a concern.

Is this a storage question for us, or is there some recommendation that if the caches are over X size, use filesystem?

  1. Is moving the files to a static location still a requirement for filesystem implementation, so the filepaths always match across a build agent pool? Is this also a requirement if using server cache?

thanks for any advice

1 Like

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your upgrade path is:

9.9.0 → 2025.1.1-> 2025.2 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

Regarding your question that docs recommendation is relevant if you have concerns about your DB size. There’s no requirement for a static location (or any location) if you use server caching. And I’m not seeing a requirement in current docs for a static location even if you use filesystem caching.

 
HTH,
Ann