narrowizard opened a new issue, #8452: URL: https://github.com/apache/incubator-devlake/issues/8452
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) 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 2000 * `cq_issues.component`: Current 255, proposed `TEXT` (or equivalent long text type) * `cq_file_metrics.file_name`: Current 255, proposed 2000 * `cq_file_metrics.id`: Current 255, proposed 3000 * `_tool_sonarqube_file_metrics.filename`: 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 1. Set up an Apache DevLake instance. 2. Configure the SonarQube plugin by adding a SonarQube connection. 3. 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` or `file_name`). 4. Create and run a DevLake blueprint/pipeline to collect data from the configured SonarQube project. 5. 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 the `cq_file_metrics` table during the data transformation or saving phase. ### Anything else _No response_ ### Version main ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@devlake.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org