fix(sonarqube): support long issue code block components#8986
Open
DoDiODev wants to merge 1 commit into
Open
Conversation
Signed-off-by: DoDiODev <DoDiDev@proton.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
SonarQube issue code block component paths can exceed both the domain layer's previous default string length and the tool layer's
varchar(500)limit. This causes conversion failures such asData too long for column 'component'.Changes
SonarqubeIssueCodeBlock.ComponentandCqIssueCodeBlock.ComponenttoTEXTTEXTcolumns consistently across supported databasesDropIndexesAPI and propagate errorsExplicitly excluded
Automated validation
make buildmake -C backend migration-script-lintgo test ./core/models/migrationscripts ./plugins/sonarqube/models/migrationscripts ./plugins/sonarqube/tasks -count=1go test ./plugins/sonarqube/e2e -run '^$' -count=1TestSonarqubeIssueCodeBlockLongComponentagainst MySQL 8.4.10TestSonarqubeIssueCodeBlockLongComponentagainst PostgreSQL 18.1git diff --check upstream/main...HEADThe database tests create the previous indexed VARCHAR schemas, insert existing records, execute both registered migrations, verify the resulting TEXT columns and removed indexes, confirm data preservation, and process values longer than 500 characters.
Manual validation
The reconstructed branch and database migration results were reviewed and approved before commit and push.
Rollback
Revert this commit before release. After the migration has accepted values beyond the old limits, narrowing the columns again requires validating or truncating those values first.