Must-share information (formatted with Markdown):
- which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension): Community Build v25.2.0.102705
So I have a public repo: GitHub - baobabsoluciones/cornflow: An open source multi-solver optimization server with a REST API.
Where I have the following Github action: cornflow/.github/workflows/sonarqube.yml at develop · baobabsoluciones/cornflow · GitHub
This actions runs three different test suites and uploads their respective coverage reports as an artifact to be then downloaded and uploaded with the sonarqube scan action.
For that I have the following sonar-project.properties file:
# Project identification
sonar.projectKey=cornflow
sonar.projectVersion=1.0
# Source code location
sonar.sources=cornflow-dags,cornflow-server,libs
sonar.tests=cornflow-server/cornflow/tests,cornflow-dags/tests,libs/client/cornflow_client/tests
# Encoding of source files
sonar.sourceEncoding=UTF-8
# Coverage settings
sonar.python.coverage.reportPaths=coverage-server.xml,coverage-client.xml,coverage-dags.xml
# Python specific settings
sonar.python.version=3
# Exclusions
sonar.exclusions=**/__pycache__/**,**/*.pyc,**/venv/**,**/.env/**,docs/**,**/tests/**
When running the last job of the action I get the downloaded artifacts:
Found 3 artifact(s)
Filtering artifacts by pattern 'coverage-*.xml'
Preparing to download the following artifacts:
- coverage-client.xml (ID: 2905358904, Size: 5923, Expected Digest: sha256:113ae8d8f1e79e37bf3cc7fc3e419422883c6b9022038d7f12caf1f52c915c21)
- coverage-server.xml (ID: 2905312944, Size: 15019, Expected Digest: sha256:b3d67a6b482aa025741b4b446b46895adf69ddafc2e7c41526755292459f86b2)
- coverage-dags.xml (ID: 2905276006, Size: 19420, Expected Digest: sha256:00f9a57e44dddc590cc6a773ef5f095973d30d77bebde8148e4d1679b0037c33)
Redirecting to blob download url: https://productionresultssa13.blob.core.windows.net/actions-results/ba2047cc-f6c5-44ff-8b7b-e91555748a38/workflow-job-run-892519c9-2193-5677-6fbc-81aa76fa971a/artifacts/cca311c9bec5fc010c399b7408badcf85c3f218aff427b1c37af8d0b5d640195.zip
Starting download of artifact to: /home/runner/work/cornflow/cornflow/coverage-client.xml
Redirecting to blob download url: https://productionresultssa13.blob.core.windows.net/actions-results/0eb1a61b-60e9-4fae-a954-7401421df54e/workflow-job-run-8a0296dd-f818-5bdb-4cfb-a6b2ce09069b/artifacts/55b17eb6713003f3c7dd85e7d30a6f70ec6c365bcb0a450e12abbc3d8dd3a057.zip
Starting download of artifact to: /home/runner/work/cornflow/cornflow/coverage-server.xml
(node:1830) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Redirecting to blob download url: https://productionresultssa13.blob.core.windows.net/actions-results/0eb1a61b-60e9-4fae-a954-7401421df54e/workflow-job-run-ebc41999-9411-5e91-bb01-028bb8fcecc8/artifacts/9cdfefe77bba3ca16e4d1ad2030b7ac81fe9d894ed3094a25690555614882473.zip
Starting download of artifact to: /home/runner/work/cornflow/cornflow/coverage-dags.xml
And then I get the following warning on the sonarqube scan:
18:02:15.384 INFO Python test coverage
18:02:15.385 INFO Parsing report '/home/runner/work/cornflow/cornflow/coverage-server.xml'
18:02:15.395 WARN Cannot read coverage report '/home/runner/work/cornflow/cornflow/coverage-server.xml', the following exception occurred: 'Error parsing the report '/home/runner/work/cornflow/cornflow/coverage-server.xml''
18:02:15.395 INFO Parsing report '/home/runner/work/cornflow/cornflow/coverage-client.xml'
18:02:15.395 WARN Cannot read coverage report '/home/runner/work/cornflow/cornflow/coverage-client.xml', the following exception occurred: 'Error parsing the report '/home/runner/work/cornflow/cornflow/coverage-client.xml''
18:02:15.395 INFO Parsing report '/home/runner/work/cornflow/cornflow/coverage-dags.xml'
18:02:15.396 WARN Cannot read coverage report '/home/runner/work/cornflow/cornflow/coverage-dags.xml', the following exception occurred: 'Error parsing the report '/home/runner/work/cornflow/cornflow/coverage-dags.xml''
18:02:15.396 INFO Sensor Cobertura Sensor for Python coverage [python] (done) | time=64ms
I have attached one of the coverage reports so that it can be checked as well, but, why does the sonarqube scan action fail to parse the report? How can I get more informaton about the error?
coverage-client.xml.zip (5.8 KB)
EDIT: I have run the github action with loglevel DEBUG and verbose=true and the log does not contain more information about why the warning is getting raised and the coverage report can not be read.
