Private project PR's not showing coverage percentage

INTRODUCTION
The error consists in not been able to see in the sonarcloud UI the percentage of coverage from a specific PR that is from a private repository despite that in that PR there are new code implementations as I can see from the code sonarcloud view which does have the jacoco coverage reports.

Also as additional info, that project is configured almost equal as other private projects which don’t have any issue with PR’s.

Also in the part where should be located the coverage percentage is showing the following message which mostly is showed when there is no new code introduced:

  • A few extra steps are needed for SonarCloud to analyze your code coverage.

ENVIRONMENT DETAILS

gradle task in charge of creating jacoco reports, which uses this gradle dependency:

  • jacoco “org.jacoco:jacoco:0.8.8@zip”

also another task related to sonar for pushing the jacoco reports to sonarcloud, this functionality is provided by the following gradle plugin:

  • id “org.sonarqube” version “3.2.0”

Most of the reported code is written in Java

There’s no error shown from both of the gradle task executions.

Hey there.

What do the logs say about the import of code coverage?

The thrown command is the following:

./gradlew sonarqube -Dsonar.login=****** -Dsonar.organization={org} -Duser.home=/{path to sonarcache}/sonarcache -Dsonar.pullrequest.key={numberKey} -Dsonar.pullrequest.branch={branchName} -Dsonar.pullrequest.base=master --no-daemon --stacktrace --info

And the logs are these ones:

[2024-07-11T13:41:59.316Z] Resolve mutations for :sonarqube (Thread[Execution worker,5,main]) started.

[2024-07-11T13:41:59.316Z] :sonarqube (Thread[Execution worker,5,main]) started.

[2024-07-11T13:42:01.821Z]

[2024-07-11T13:42:01.821Z] > Task :sonarqube

[2024-07-11T13:42:01.821Z] Caching disabled for task ':sonarqube' because:

[2024-07-11T13:42:01.821Z] Build cache is disabled

[2024-07-11T13:42:01.821Z] Task ':sonarqube' is not up-to-date because:

[2024-07-11T13:42:01.821Z] Task has not declared any outputs despite executing actions.

[2024-07-11T13:42:01.821Z] User cache: /{pathToProject}/{projectPRName}/sonarcache/.sonar/cache

[2024-07-11T13:42:01.821Z] Default locale: "en", source code encoding: "UTF-8" (analysis is platform dependent)

[2024-07-11T13:42:01.821Z] Load global settings

[2024-07-11T13:42:01.821Z] Load global settings (done) | time=125ms

[2024-07-11T13:42:01.821Z] Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu

[2024-07-11T13:42:01.821Z] Loading required plugins

[2024-07-11T13:42:01.821Z] Load plugins index

[2024-07-11T13:42:01.821Z] Load plugins index (done) | time=50ms

[2024-07-11T13:42:01.821Z] Load/download plugins

[2024-07-11T13:42:01.821Z] Load/download plugins (done) | time=357ms

[2024-07-11T13:42:01.821Z] Found an active CI vendor: 'Jenkins'

[2024-07-11T13:42:01.821Z] Load project settings for component key: '{sonarProjectID}'

[2024-07-11T13:42:01.821Z] Load project settings for component key: '{sonarProjectID}' (done) | time=52ms

[2024-07-11T13:42:01.821Z] Process project properties

[2024-07-11T13:42:01.821Z] Project key: {sonarProjectID}

[2024-07-11T13:42:01.821Z] Base dir: /{pathToProject}/{projectPRName}/y-ext

[2024-07-11T13:42:01.821Z] Working dir: /{pathToProject}/{projectPRName}/build/sonar

[2024-07-11T13:42:01.821Z] Load project branches

[2024-07-11T13:42:01.821Z] Load project branches (done) | time=63ms

[2024-07-11T13:42:01.821Z] Check ALM binding of project '{sonarProjectID}'

[2024-07-11T13:42:01.821Z] Detected project binding: BOUND

[2024-07-11T13:42:01.821Z] Check ALM binding of project '{sonarProjectID}' (done) | time=47ms

[2024-07-11T13:42:01.821Z] Load project pull requests

[2024-07-11T13:42:01.821Z] Load project pull requests (done) | time=246ms

[2024-07-11T13:42:01.821Z] Load branch configuration

[2024-07-11T13:42:02.379Z] Load branch configuration (done) | time=650ms

[2024-07-11T13:42:02.379Z] Load quality profiles

[2024-07-11T13:42:02.633Z] Load quality profiles (done) | time=164ms

[2024-07-11T13:42:02.633Z] Load active rules

[2024-07-11T13:42:05.887Z] Load active rules (done) | time=2978ms

[2024-07-11T13:42:05.887Z] Organization key: {org key}

[2024-07-11T13:42:05.887Z] Pull request 830 for merge into master from {branchName}

[2024-07-11T13:42:05.887Z] The property 'sonar.login' is deprecated and will be removed in the future. Please use the 'sonar.token' property instead when passing a token.

[2024-07-11T13:42:05.887Z] Preprocessing files...

[2024-07-11T13:42:06.810Z]

[2024-07-11T13:42:06.810Z] 2 languages detected in 941 preprocessed files

[2024-07-11T13:42:07.733Z]

[2024-07-11T13:42:07.733Z] > Task :sonarqube

[2024-07-11T13:42:07.733Z] 8584 files ignored because of inclusion/exclusion patterns

[2024-07-11T13:42:07.733Z] 1 file ignored because of scm ignore settings

[2024-07-11T13:42:07.733Z] Loading plugins for detected languages

[2024-07-11T13:42:07.733Z] Load/download plugins

[2024-07-11T13:42:07.733Z] Load/download plugins (done) | time=366ms

[2024-07-11T13:42:07.733Z] Load project repositories

[2024-07-11T13:42:07.733Z] Load project repositories (done) | time=351ms

[2024-07-11T13:42:07.733Z] SCM collecting changed files in the branch

[2024-07-11T13:42:07.733Z] Could not find ref: master in refs/heads, refs/remotes/upstream or refs/remotes/origin

[2024-07-11T13:42:07.733Z] SCM collecting changed files in the branch (done) | time=6ms

[2024-07-11T13:42:07.733Z] Indexing files...

[2024-07-11T13:42:07.733Z] Project configuration:

[2024-07-11T13:42:07.733Z] Included sources: {include source}

[2024-07-11T13:42:07.733Z] Excluded sources: {Excluded sources}

[2024-07-11T13:42:07.733Z] Included tests: {Included tests}

[2024-07-11T13:42:07.733Z] Excluded tests: {Excluded tests}

[2024-07-11T13:42:07.733Z]

[2024-07-11T13:42:07.733Z] 941 files indexed

[2024-07-11T13:42:10.257Z]

[2024-07-11T13:42:10.257Z] > Task :sonarqube

[2024-07-11T13:42:10.257Z] Quality profile for java: Sonar way - no var

[2024-07-11T13:42:10.257Z] Quality profile for xml: EC-hybris-XML

[2024-07-11T13:42:10.257Z] ------------- Run sensors on module {moduleName}

[2024-07-11T13:42:10.257Z] Load metrics repository

[2024-07-11T13:42:10.257Z] Load metrics repository (done) | time=41ms

[2024-07-11T13:42:10.257Z] Sensor cache enabled

[2024-07-11T13:42:10.257Z] Load sensor cache

[2024-07-11T13:42:10.257Z] Load sensor cache (133 KB) | time=1582ms

[2024-07-11T13:42:10.511Z] Sensor JavaSensor [java]

[2024-07-11T13:42:10.511Z] Configured Java source version (sonar.java.source): 17, preview features enabled (sonar.java.enablePreview): false

[2024-07-11T13:42:10.512Z] 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.

[2024-07-11T13:42:10.766Z] Server-side caching is enabled. The Java analyzer was able to leverage cached data from previous analyses for 348 out of 900 files. These files will not be parsed.

[2024-07-11T13:42:10.766Z] Using ECJ batch to parse 529 Main java source files with batch size 214 KB.

[2024-07-11T13:42:11.020Z] Starting batch processing.

[2024-07-11T13:42:20.943Z] 100% analyzed

[2024-07-11T13:42:20.943Z] Batch processing: Done.

[2024-07-11T13:42:20.943Z] Optimized analysis for 488 of 529 files.

[2024-07-11T13:42:20.943Z] Dependencies/libraries were not provided for analysis of SOURCE files. The 'sonar.java.libraries' property is empty. Verify your configuration, as you might end up with less precise results.

[2024-07-11T13:42:20.943Z] Dependencies/libraries were not provided for analysis of TEST files. The 'sonar.java.test.libraries' property is empty. Verify your configuration, as you might end up with less precise results.

[2024-07-11T13:42:20.943Z] Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.

[2024-07-11T13:42:20.943Z] Use of preview features have been detected during analysis. Enable DEBUG mode to see them.

[2024-07-11T13:42:20.943Z] Using ECJ batch to parse 23 Test java source files with batch size 214 KB.

[2024-07-11T13:42:20.943Z] Starting batch processing.

[2024-07-11T13:42:20.943Z] 100% analyzed

[2024-07-11T13:42:20.943Z] Batch processing: Done.

[2024-07-11T13:42:20.943Z] Did not optimize analysis for any files, performed a full analysis for all 23 files.

[2024-07-11T13:42:20.943Z] Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.

[2024-07-11T13:42:20.943Z] Use of preview features have been detected during analysis. Enable DEBUG mode to see them.

[2024-07-11T13:42:20.943Z] No "Generated" source files to scan.

[2024-07-11T13:42:20.943Z] Sensor JavaSensor [java] (done) | time=10283ms

[2024-07-11T13:42:20.943Z] Sensor ThymeLeaf template sensor [securityjavafrontend]

[2024-07-11T13:42:20.943Z] Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=2ms

[2024-07-11T13:42:20.943Z] Sensor SurefireSensor [java]

[2024-07-11T13:42:20.943Z] parsing [/{pathToProject}/{projectPRName}/y-ext/target/surefire-reports]

[2024-07-11T13:42:20.943Z] Sensor SurefireSensor [java] (done) | time=1ms

[2024-07-11T13:42:20.943Z] Sensor XML Sensor [xml]

[2024-07-11T13:42:20.943Z] Sensor XML Sensor is restricted to changed files only

[2024-07-11T13:42:20.943Z]

[2024-07-11T13:42:20.943Z] 2 source files to be analyzed

[2024-07-11T13:42:20.943Z] 2/2 source files have been analyzed

[2024-07-11T13:42:21.502Z] 0 source files to be analyzed

[2024-07-11T13:42:21.502Z] 0/0 source files have been analyzed

[2024-07-11T13:42:21.502Z] 0 source files to be analyzed

[2024-07-11T13:42:21.502Z] 0/0 source files have been analyzed

[2024-07-11T13:42:22.860Z]

[2024-07-11T13:42:22.860Z] > Task :sonarqube

[2024-07-11T13:42:22.860Z] Sensor XML Sensor [xml] (done) | time=374ms

[2024-07-11T13:42:22.860Z] Sensor JaCoCo XML Report Importer [jacoco]

[2024-07-11T13:42:22.860Z] Importing 1 report(s). Turn your logs in debug mode in order to see the exhaustive list.

[2024-07-11T13:42:22.860Z] Sensor JaCoCo XML Report Importer [jacoco] (done) | time=427ms

[2024-07-11T13:42:22.860Z] Sensor Java Config Sensor [iac]

[2024-07-11T13:42:22.860Z] Sensor Java Config Sensor [iac] (done) | time=28ms

[2024-07-11T13:42:22.860Z] Sensor IaC Docker Sensor [iac]

[2024-07-11T13:42:22.860Z] Sensor IaC Docker Sensor is restricted to changed files only

[2024-07-11T13:42:22.860Z] Sensor IaC Docker Sensor [iac] (done) | time=53ms

[2024-07-11T13:42:22.860Z] Sensor Serverless configuration file sensor [security]

[2024-07-11T13:42:22.860Z] 0 Serverless function entries were found in the project

[2024-07-11T13:42:22.860Z] 0 Serverless function handlers were kept as entrypoints

[2024-07-11T13:42:22.860Z] Sensor Serverless configuration file sensor [security] (done) | time=3ms

[2024-07-11T13:42:22.860Z] Sensor AWS SAM template file sensor [security]

[2024-07-11T13:42:22.860Z] Sensor AWS SAM template file sensor [security] (done) | time=1ms

[2024-07-11T13:42:22.860Z] Sensor AWS SAM Inline template file sensor [security]

[2024-07-11T13:42:22.860Z] Sensor AWS SAM Inline template file sensor [security] (done) | time=1ms

[2024-07-11T13:42:22.860Z] Sensor javabugs [dbd]

[2024-07-11T13:42:22.860Z] Reading IR files from: /{pathToProject}/{projectPRName}/build/sonar/ir/java

[2024-07-11T13:42:22.860Z] No IR files have been included for analysis.

[2024-07-11T13:42:22.860Z] Sensor javabugs [dbd] (done) | time=2ms

[2024-07-11T13:42:22.860Z] Sensor pythonbugs [dbd]

[2024-07-11T13:42:22.860Z] Reading IR files from: /{pathToProject}/{projectPRName}/build/sonar/ir/python

[2024-07-11T13:42:22.860Z] No IR files have been included for analysis.

[2024-07-11T13:42:22.860Z] Sensor pythonbugs [dbd] (done) | time=0ms

[2024-07-11T13:42:22.860Z] Sensor TextAndSecretsSensor [text]

[2024-07-11T13:42:22.860Z] Sensor TextAndSecretsSensor is restricted to changed files only

[2024-07-11T13:42:22.860Z] Available processors: 4

[2024-07-11T13:42:22.860Z] Using 4 threads for analysis.

[2024-07-11T13:42:22.860Z] Using JGit to retrieve untracked files

[2024-07-11T13:42:25.364Z] Analyzing language associated files and files included via "sonar.text.inclusions" that are tracked by git

[2024-07-11T13:42:25.364Z]

[2024-07-11T13:42:25.364Z] 65 source files to be analyzed

[2024-07-11T13:42:25.618Z] 65/65 source files have been analyzed

[2024-07-11T13:42:27.499Z]

[2024-07-11T13:42:27.499Z] > Task :sonarqube

[2024-07-11T13:42:27.499Z] Sensor TextAndSecretsSensor [text] (done) | time=4199ms

[2024-07-11T13:42:27.499Z] Sensor JavaSecuritySensor [security]

[2024-07-11T13:42:27.499Z] Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5167, S5334, S6096

[2024-07-11T13:42:27.499Z] Load type hierarchy and UCFGs: Starting

[2024-07-11T13:42:27.499Z] Load type hierarchy: Starting

[2024-07-11T13:42:27.499Z] Reading type hierarchy from: /{pathToProject}/{projectPRName}/build/sonar/ucfg2/java

[2024-07-11T13:42:27.499Z] Read 811 type definitions

[2024-07-11T13:42:27.499Z] Load type hierarchy: Time spent was 00:00:00.078

[2024-07-11T13:42:27.499Z] Load UCFGs: Starting

[2024-07-11T13:42:27.499Z] Reading UCFGs from: /{pathToProject}/{projectPRName}/build/sonar/ucfg2/java

[2024-07-11T13:42:27.499Z] Load UCFGs: Time spent was 00:00:00.277

[2024-07-11T13:42:27.499Z] Load type hierarchy and UCFGs: Time spent was 00:00:00.357

[2024-07-11T13:42:27.499Z] Analyzing 896 UCFGs to detect vulnerabilities.

[2024-07-11T13:42:27.499Z] Check cache: Starting

[2024-07-11T13:42:27.499Z] Load cache: Starting

[2024-07-11T13:42:27.499Z] Load cache: Time spent was 00:00:00.000

[2024-07-11T13:42:27.500Z] Check cache: Time spent was 00:00:00.000

[2024-07-11T13:42:27.500Z] Create runtime call graph: Starting

[2024-07-11T13:42:27.500Z] Variable Type Analysis #1: Starting

[2024-07-11T13:42:27.500Z] Create runtime type propagation graph: Starting

[2024-07-11T13:42:27.500Z] Create runtime type propagation graph: Time spent was 00:00:00.034

[2024-07-11T13:42:27.500Z] Run SCC (Tarjan) on 3272 nodes: Starting

[2024-07-11T13:42:27.500Z] Run SCC (Tarjan) on 3272 nodes: Time spent was 00:00:00.005

[2024-07-11T13:42:27.500Z] Tarjan found 3203 strongly connected components

[2024-07-11T13:42:27.500Z] Propagate runtime types to strongly connected components: Starting

[2024-07-11T13:42:27.500Z] Propagate runtime types to strongly connected components: Time spent was 00:00:00.008

[2024-07-11T13:42:27.500Z] Variable Type Analysis #1: Time spent was 00:00:00.050

[2024-07-11T13:42:27.500Z] Variable Type Analysis #2: Starting

[2024-07-11T13:42:27.500Z] Create runtime type propagation graph: Starting

[2024-07-11T13:42:27.500Z] Create runtime type propagation graph: Time spent was 00:00:00.020

[2024-07-11T13:42:27.500Z] Run SCC (Tarjan) on 3272 nodes: Starting

[2024-07-11T13:42:27.500Z] Run SCC (Tarjan) on 3272 nodes: Time spent was 00:00:00.002

[2024-07-11T13:42:27.500Z] Tarjan found 3203 strongly connected components

[2024-07-11T13:42:27.500Z] Propagate runtime types to strongly connected components: Starting

[2024-07-11T13:42:27.500Z] Propagate runtime types to strongly connected components: Time spent was 00:00:00.004

[2024-07-11T13:42:27.500Z] Variable Type Analysis #2: Time spent was 00:00:00.028

[2024-07-11T13:42:27.500Z] Create runtime call graph: Time spent was 00:00:00.083

[2024-07-11T13:42:27.500Z] Load config: Starting

[2024-07-11T13:42:27.500Z] Load config: Time spent was 00:00:00.885

[2024-07-11T13:42:27.500Z] Compute entry points: Starting

[2024-07-11T13:42:28.058Z] Compute entry points: Time spent was 00:00:00.824

[2024-07-11T13:42:28.058Z] No entry points found.

[2024-07-11T13:42:28.058Z] java security sensor: Time spent was 00:00:02.154

[2024-07-11T13:42:28.058Z] java security sensor: Begin: 2024-07-11T13:42:25.584704604Z, End: 2024-07-11T13:42:27.739008552Z, Duration: 00:00:02.154

[2024-07-11T13:42:28.058Z] Load type hierarchy and UCFGs: Begin: 2024-07-11T13:42:25.585903230Z, End: 2024-07-11T13:42:25.942923821Z, Duration: 00:00:00.357

[2024-07-11T13:42:28.058Z] Load type hierarchy: Begin: 2024-07-11T13:42:25.585944559Z, End: 2024-07-11T13:42:25.664329627Z, Duration: 00:00:00.078

[2024-07-11T13:42:28.058Z] Load UCFGs: Begin: 2024-07-11T13:42:25.664732453Z, End: 2024-07-11T13:42:25.942660658Z, Duration: 00:00:00.277

[2024-07-11T13:42:28.058Z] Check cache: Begin: 2024-07-11T13:42:25.943063292Z, End: 2024-07-11T13:42:25.943631020Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.058Z] Load cache: Begin: 2024-07-11T13:42:25.943095473Z, End: 2024-07-11T13:42:25.943320446Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.058Z] Create runtime call graph: Begin: 2024-07-11T13:42:25.943717221Z, End: 2024-07-11T13:42:26.026973724Z, Duration: 00:00:00.083

[2024-07-11T13:42:28.059Z] Variable Type Analysis #1: Begin: 2024-07-11T13:42:25.944231479Z, End: 2024-07-11T13:42:25.994380416Z, Duration: 00:00:00.050

[2024-07-11T13:42:28.059Z] Create runtime type propagation graph: Begin: 2024-07-11T13:42:25.944868496Z, End: 2024-07-11T13:42:25.979672732Z, Duration: 00:00:00.034

[2024-07-11T13:42:28.059Z] Run SCC (Tarjan) on 3272 nodes: Begin: 2024-07-11T13:42:25.980238890Z, End: 2024-07-11T13:42:25.985640571Z, Duration: 00:00:00.005

[2024-07-11T13:42:28.059Z] Propagate runtime types to strongly connected components: Begin: 2024-07-11T13:42:25.985802963Z, End: 2024-07-11T13:42:25.994250214Z, Duration: 00:00:00.008

[2024-07-11T13:42:28.059Z] Variable Type Analysis #2: Begin: 2024-07-11T13:42:25.997316255Z, End: 2024-07-11T13:42:26.025576065Z, Duration: 00:00:00.028

[2024-07-11T13:42:28.059Z] Create runtime type propagation graph: Begin: 2024-07-11T13:42:25.997358655Z, End: 2024-07-11T13:42:26.018151557Z, Duration: 00:00:00.020

[2024-07-11T13:42:28.059Z] Run SCC (Tarjan) on 3272 nodes: Begin: 2024-07-11T13:42:26.018349919Z, End: 2024-07-11T13:42:26.020754431Z, Duration: 00:00:00.002

[2024-07-11T13:42:28.059Z] Propagate runtime types to strongly connected components: Begin: 2024-07-11T13:42:26.020898084Z, End: 2024-07-11T13:42:26.025476104Z, Duration: 00:00:00.004

[2024-07-11T13:42:28.059Z] Load config: Begin: 2024-07-11T13:42:26.027067854Z, End: 2024-07-11T13:42:26.912446084Z, Duration: 00:00:00.885

[2024-07-11T13:42:28.059Z] Compute entry points: Begin: 2024-07-11T13:42:26.912708997Z, End: 2024-07-11T13:42:27.737454702Z, Duration: 00:00:00.824

[2024-07-11T13:42:28.059Z] java security sensor peak memory: 677 MB

[2024-07-11T13:42:28.059Z] Sensor JavaSecuritySensor [security] (done) | time=2157ms

[2024-07-11T13:42:28.059Z] Sensor CSharpSecuritySensor [security]

[2024-07-11T13:42:28.059Z] Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5334, S5883, S6096, S6173, S6287, S6350, S6399, S6639, S6641

[2024-07-11T13:42:28.059Z] Load type hierarchy and UCFGs: Starting

[2024-07-11T13:42:28.059Z] Load type hierarchy: Starting

[2024-07-11T13:42:28.059Z] Reading type hierarchy from: /{pathToProject}/{projectPRName}/build/ucfg2/cs

[2024-07-11T13:42:28.059Z] Read 0 type definitions

[2024-07-11T13:42:28.059Z] Load type hierarchy: Time spent was 00:00:00.000

[2024-07-11T13:42:28.059Z] Load UCFGs: Starting

[2024-07-11T13:42:28.059Z] Load UCFGs: Time spent was 00:00:00.000

[2024-07-11T13:42:28.059Z] Load type hierarchy and UCFGs: Time spent was 00:00:00.000

[2024-07-11T13:42:28.059Z] No UCFGs have been included for analysis.

[2024-07-11T13:42:28.059Z] csharp security sensor: Time spent was 00:00:00.000

[2024-07-11T13:42:28.059Z] csharp security sensor: Begin: 2024-07-11T13:42:27.740865337Z, End: 2024-07-11T13:42:27.741622026Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.059Z] Load type hierarchy and UCFGs: Begin: 2024-07-11T13:42:27.741022969Z, End: 2024-07-11T13:42:27.741455824Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.059Z] Load type hierarchy: Begin: 2024-07-11T13:42:27.741049599Z, End: 2024-07-11T13:42:27.741254492Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.059Z] Load UCFGs: Begin: 2024-07-11T13:42:27.741342193Z, End: 2024-07-11T13:42:27.741394273Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.059Z] csharp security sensor peak memory: 677 MB

[2024-07-11T13:42:28.059Z] Sensor CSharpSecuritySensor [security] (done) | time=2ms

[2024-07-11T13:42:28.059Z] Sensor PhpSecuritySensor [security]

[2024-07-11T13:42:28.059Z] Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5334, S5335, S5883, S6173, S6287, S6350

[2024-07-11T13:42:28.059Z] Load type hierarchy and UCFGs: Starting

[2024-07-11T13:42:28.059Z] Load type hierarchy: Starting

[2024-07-11T13:42:28.059Z] Reading type hierarchy from: /{pathToProject}/{projectPRName}/build/sonar/ucfg2/php

[2024-07-11T13:42:28.059Z] Read 0 type definitions

[2024-07-11T13:42:28.059Z] Load type hierarchy: Time spent was 00:00:00.000

[2024-07-11T13:42:28.059Z] Load UCFGs: Starting

[2024-07-11T13:42:28.059Z] Load UCFGs: Time spent was 00:00:00.000

[2024-07-11T13:42:28.059Z] Load type hierarchy and UCFGs: Time spent was 00:00:00.000

[2024-07-11T13:42:28.059Z] No UCFGs have been included for analysis.

[2024-07-11T13:42:28.059Z] php security sensor: Time spent was 00:00:00.000

[2024-07-11T13:42:28.059Z] php security sensor: Begin: 2024-07-11T13:42:27.742225814Z, End: 2024-07-11T13:42:27.742987294Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.059Z] Load type hierarchy and UCFGs: Begin: 2024-07-11T13:42:27.742340836Z, End: 2024-07-11T13:42:27.742724871Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.059Z] Load type hierarchy: Begin: 2024-07-11T13:42:27.742372656Z, End: 2024-07-11T13:42:27.742489828Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.059Z] Load UCFGs: Begin: 2024-07-11T13:42:27.742583599Z, End: 2024-07-11T13:42:27.742621510Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.059Z] php security sensor peak memory: 677 MB

[2024-07-11T13:42:28.059Z] Sensor PhpSecuritySensor [security] (done) | time=1ms

[2024-07-11T13:42:28.059Z] Sensor PythonSecuritySensor [security]

[2024-07-11T13:42:28.059Z] Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5147, S5334, S5496, S6287, S6350, S6639, S6680, S6776, S6839

[2024-07-11T13:42:28.059Z] Load type hierarchy and UCFGs: Starting

[2024-07-11T13:42:28.059Z] Load type hierarchy: Starting

[2024-07-11T13:42:28.059Z] Reading type hierarchy from: /{pathToProject}/{projectPRName}/build/sonar/ucfg2/python

[2024-07-11T13:42:28.059Z] Read 0 type definitions

[2024-07-11T13:42:28.059Z] Load type hierarchy: Time spent was 00:00:00.000

[2024-07-11T13:42:28.059Z] Load UCFGs: Starting

[2024-07-11T13:42:28.059Z] Load UCFGs: Time spent was 00:00:00.000

[2024-07-11T13:42:28.059Z] Load type hierarchy and UCFGs: Time spent was 00:00:00.000

[2024-07-11T13:42:28.059Z] No UCFGs have been included for analysis.

[2024-07-11T13:42:28.059Z] python security sensor: Time spent was 00:00:00.000

[2024-07-11T13:42:28.059Z] python security sensor: Begin: 2024-07-11T13:42:27.743638713Z, End: 2024-07-11T13:42:27.744307162Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.059Z] Load type hierarchy and UCFGs: Begin: 2024-07-11T13:42:27.743765895Z, End: 2024-07-11T13:42:27.744119679Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.059Z] Load type hierarchy: Begin: 2024-07-11T13:42:27.743789675Z, End: 2024-07-11T13:42:27.743928137Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.059Z] Load UCFGs: Begin: 2024-07-11T13:42:27.744014948Z, End: 2024-07-11T13:42:27.744045528Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.059Z] python security sensor peak memory: 677 MB

[2024-07-11T13:42:28.059Z] Sensor PythonSecuritySensor [security] (done) | time=1ms

[2024-07-11T13:42:28.059Z] Sensor JsSecuritySensor [security]

[2024-07-11T13:42:28.059Z] Enabled taint analysis rules: S6350, S5144, S6287, S2083, S5883, S5146, S3649, S5131, S2631, S6096, S2076, S5334, S5696, S6105, S5147

[2024-07-11T13:42:28.059Z] Load type hierarchy and UCFGs: Starting

[2024-07-11T13:42:28.059Z] Load type hierarchy: Starting

[2024-07-11T13:42:28.059Z] Reading type hierarchy from: /{pathToProject}/{projectPRName}/build/sonar/ucfg2/js

[2024-07-11T13:42:28.059Z] Read 0 type definitions

[2024-07-11T13:42:28.059Z] Load type hierarchy: Time spent was 00:00:00.000

[2024-07-11T13:42:28.060Z] Load UCFGs: Starting

[2024-07-11T13:42:28.060Z] Load UCFGs: Time spent was 00:00:00.000

[2024-07-11T13:42:28.060Z] Load type hierarchy and UCFGs: Time spent was 00:00:00.000

[2024-07-11T13:42:28.060Z] No UCFGs have been included for analysis.

[2024-07-11T13:42:28.060Z] js security sensor: Time spent was 00:00:00.000

[2024-07-11T13:42:28.060Z] js security sensor: Begin: 2024-07-11T13:42:27.744902529Z, End: 2024-07-11T13:42:27.745638679Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.060Z] Load type hierarchy and UCFGs: Begin: 2024-07-11T13:42:27.745050621Z, End: 2024-07-11T13:42:27.745406206Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.060Z] Load type hierarchy: Begin: 2024-07-11T13:42:27.745073372Z, End: 2024-07-11T13:42:27.745175303Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.060Z] Load UCFGs: Begin: 2024-07-11T13:42:27.745275234Z, End: 2024-07-11T13:42:27.745305445Z, Duration: 00:00:00.000

[2024-07-11T13:42:28.060Z] js security sensor peak memory: 677 MB

[2024-07-11T13:42:28.060Z] Sensor JsSecuritySensor [security] (done) | time=2ms

[2024-07-11T13:42:28.060Z] ------------- Run sensors on project

[2024-07-11T13:42:28.060Z] Sensor Zero Coverage Sensor

[2024-07-11T13:42:28.060Z] Sensor Zero Coverage Sensor (done) | time=5ms

[2024-07-11T13:42:28.060Z] Sensor Java CPD Block Indexer

[2024-07-11T13:42:28.314Z] Sensor Java CPD Block Indexer (done) | time=287ms

[2024-07-11T13:42:28.314Z] SCM Publisher SCM provider for this project is: git

[2024-07-11T13:42:28.314Z] SCM Publisher 65 source files to be analyzed

[2024-07-11T13:42:29.673Z]

[2024-07-11T13:42:29.673Z] SCM Publisher 65/65 source files have been analyzed (done) | time=1186ms

[2024-07-11T13:42:29.673Z] CPD Executor CPD calculation finished (done) | time=92ms

[2024-07-11T13:42:30.230Z]

[2024-07-11T13:42:30.230Z] > Task :sonarqube

[2024-07-11T13:42:30.230Z] CPD Executor 179 files had no CPD blocks

[2024-07-11T13:42:30.230Z] CPD Executor Calculating CPD for 350 files

[2024-07-11T13:42:30.230Z] SCM writing changed lines

[2024-07-11T13:42:30.230Z] Could not find ref: master in refs/heads, refs/remotes/upstream or refs/remotes/origin

[2024-07-11T13:42:30.230Z] SCM writing changed lines (done) | time=3ms

[2024-07-11T13:42:30.230Z] Analysis report generated in 177ms, dir size=1 MB

[2024-07-11T13:42:30.230Z] Analysis report compressed in 339ms, zip size=967 KB

[2024-07-11T13:42:30.484Z] Analysis report uploaded in 346ms

[2024-07-11T13:42:30.484Z] ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id={project_name}&pullRequest=830

[2024-07-11T13:42:30.484Z] Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report

[2024-07-11T13:42:30.484Z] More about the report processing at https://sonarcloud.io/api/ce/task?id={task_id}

[2024-07-11T13:42:30.484Z] Analysis total time: 29.300 s

[2024-07-11T13:42:30.484Z]

[2024-07-11T13:42:30.484Z] BUILD SUCCESSFUL in 50s

[2024-07-11T13:42:30.484Z] 1 actionable task: 1 executed

[2024-07-11T13:42:30.485Z] Some of the file system contents retained in the virtual file system are on file systems that Gradle doesn't support watching. The relevant state was discarded to ensure changes to these locations are properly detected. You can override this by explicitly enabling file system watching.

Well, it sure looks like the report should have been imported.

Can you share a screenshot of your PR Dashboard (in SonarCloud) that shows no coverage? It would be great to make sure the x New Lines figure is visible in the screenshot.

It shows this despite that the reports are being imported into Sonarcloud:

Hey there.

I think you’re facing a bug that was reported last month:

It only affects PRs with no lines of code that can be covered by tests (0 new lines)

A fix is scheduled for an upcoming hardening sprint.

Can you confirm if these issues are happening on PRs with 0 new lines, and that you see coverage reported correctly on your main branch?

Yes, I can confirm that It happens with PR’s with 0 new lines but this PR actually has some modified lines and a new file and despite of that is showing me that there are 0 new lines introduced.
Also I have checked twice that the updated files are being included and are not being excluded, also I can see them from the code view that offers sonarcloud for each PR.

That’s really weird that you can see files in the Code tab on a PR that states there are new lines. Can you share a screenshot?

Yes,
the following file is a new introduced file as I can see from my github platform:

and despite of that as you can see from the number of the PR It is showing 0 new lines introduced:

Thanks!

I reckon this has something to do with it.

Are you performing a shallow clone when checking out your code before analysis?

That log is shown also in other private projects, but in these projects the coverage results work fine.
Also now that you mention the shallow clone, on the private projects that have shallow clone coverage is being displayed in sonarcloud but in this one that I had shared with you does not have shallow clone option selected.

@Colin through activating shallow clone with 1 level of depth I have solved the issue of not showing coverage percentage, Is this a feature or bug in sonarcloud?

It’s definitely strange behavior that turning on the shallow clone resolved the issue (unless a clone-depth of 1 was more than it was cloning before…

Was that all you changed in the clone behavior? Does turning off the shallow clone really bring the issue back?

Yes, that’s the only thing that I have changed, before of that It was cloning the whole repository history

@Colin Is this issue identified as a bug or do you need some extra logs to verify It?

I think a lot of different topics have been mixed here (different projects, different PRs, different clone strategies), and it’s hard to say what is being caused by what.

Is the PR still showing 0 Changed Lines? Has this warning disappeared from the logs?