-
Notifications
You must be signed in to change notification settings - Fork 608
Description
Search before asking
- I had searched in the issues and found no similar issues.
What happened
When collecting data using the SonarQube plugin, an error occurred indicating that the id
field in the cq_file_metrics
table (which belongs to the domain layer) exceeded its current length limit of 255 characters. This prevented successful data ingestion.
Upon investigation and review of both the SonarQube tool layer and the DevLake CQ (Code Quality) domain layer models, we identified several fields that might frequently exceed their current length limits based on real-world SonarQube data. These fields and their proposed increased lengths are:
cq_projects.name
: Current 255, proposed 2000cq_issues.component
: Current 255, proposedTEXT
(or equivalent long text type)cq_file_metrics.file_name
: Current 255, proposed 2000cq_file_metrics.id
: Current 255, proposed 3000_tool_sonarqube_file_metrics.file_name
: Current 255, proposed 2000_tool_sonarqube_file_metrics.file_metrics_key
: Current 500, proposed 3000
The specific error encountered points to cq_file_metrics.id
as the immediate blocker, but the others are likely to cause similar issues with varied SonarQube project data.
What do you expect to happen
We expect the SonarQube plugin to successfully collect and ingest all relevant data without encountering field length constraint errors. The DevLake database schema should be robust enough to accommodate the typical lengths of data originating from SonarQube, ensuring seamless data synchronization and analysis.
How to reproduce
- Set up an Apache DevLake instance.
- Configure the SonarQube plugin by adding a SonarQube connection.
- Ensure your SonarQube instance contains projects with components, file names, or metrics keys that generate IDs or names longer than the currently defined field lengths in DevLake's schema (e.g., a file path or an internal metric key that exceeds 255 characters for
cq_file_metrics.id
orfile_name
). - Create and run a DevLake blueprint/pipeline to collect data from the configured SonarQube project.
- Observe the pipeline execution logs; an error related to
Data too long for column 'id' at row 1
(or similar, depending on the database backend) should appear for thecq_file_metrics
table during the data transformation or saving phase.
Anything else
No response
Version
main
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct