apache / incubator-devlake

Apache DevLake is an open-source dev data platform to ingest, analyze, and visualize the fragmented data from DevOps tools, extracting insights for engineering excellence, developer experience, and community growth.
https://devlake.apache.org/
Apache License 2.0
2.6k stars 523 forks source link

SonarQube Pipelines run successfully but no data in dashboard - v1.0.2-beta1 #8091

Closed mrpaapi closed 1 month ago

mrpaapi commented 1 month ago

Looks like SonarQube Dashboard is crashing. After successful import using pipelines, dashboard has no data.

image

dosubot[bot] commented 1 month ago

Hello @mrpaapi! I'm here to help you with any bugs, questions, or contributions you may have. If you need assistance, feel free to ask. Dosu

I found two similar closed issues that might be relevant to your problem:

  1. [Bug][Dashboard] Wrong bug title in the Sonarqube dashboard: This issue was resolved by modifying the character set of several tables. The suggested solution was to run the following scripts to change the collation, then run the SonarQube blueprint again:

    ALTER TABLE _tool_sonarqube_projects CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
    ALTER TABLE _tool_sonarqube_issues CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
    ALTER TABLE _tool_sonarqube_issue_code_blocks CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
    ALTER TABLE _tool_sonarqube_hotspots CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
    ALTER TABLE _tool_sonarqube_file_metrics CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
    ALTER TABLE _tool_sonarqube_accounts CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
    ALTER TABLE cq_projects CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
    ALTER TABLE cq_issues CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
    ALTER TABLE cq_issue_code_blocks CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
    ALTER TABLE cq_file_metrics CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;

    You can find more details here [1].

  2. [Bug][Sonarqube] Lack of metrics for dashboard: This issue was resolved by adding the number of lines metric. You can find more details here [2].

Additionally, common reasons for the SonarQube dashboard displaying 'No data' after a successful pipeline run could include:

For more detailed troubleshooting, you can refer to the Troubleshooting section or the SonarQube Configuration Documentation [3][4].

To continue talking to Dosu, mention @dosu.

klesh commented 1 month ago

Looks like a known issue to me. Can you confirm? @Startrekzky

mrpaapi commented 1 month ago

I ran this but still no Luck

can you run the following scripts to change collation, then run the sonarqube bp again: ALTER TABLE _tool_sonarqube_projects CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE _tool_sonarqube_issues CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE _tool_sonarqube_issue_code_blocks CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE _tool_sonarqube_hotspots CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE _tool_sonarqube_file_metrics CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE _tool_sonarqube_accounts CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE cq_projects CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE cq_issues CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE cq_issue_code_blocks CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; ALTER TABLE cq_file_metrics CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;

mrpaapi commented 1 month ago

Any update please? @klesh @Startrekzky @nathenharvey @tonyjw

VadimVoykin commented 1 month ago

Hello @Startrekzky! We managed to determine that the issue lies in the Grafana queries. In order to fix it, we changed the Data Source of each "Panel" from "Mixed" to "mysql" and changed the table in the query by appending the "lake." prefix.

2024-10-01_09h13_18