Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-6174

Handle corrupted duplication measures when doing migration of file_sources table

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.1
    • Component/s: Database
    • Labels:
      None

      Description

      When some duplication measures are corrupted (XML is invalid) then it is impossible to migrate to 5.0.
      Error is not detailed enough:

      2015.02.10 13:48:22 ERROR RubyThread-5: /usr/local/sonarqube-5.0/web/WEB-INF/app/models/database_migration_manager.rb:102 web[o.s.s.d.m
      .DatabaseMigrator]  Fail to execute database migration: org.sonar.server.db.migrations.v50.FeedFileSources
      org.sonar.api.utils.SonarException: Unexpected character 'C' (code 67) excepted space, or '>' or "/>"
       at [row,col {unknown-source}]: [1,80]
              at org.sonar.server.db.migrations.v50.FileSourceDto.parseDuplicationData(FileSourceDto.java:188) ~[sonar-server-5.0.jar:na]
      

      We should at least improve the error to allow user to fix the offending measure. And maybe skip the measure and continue the migration.

        Attachments

          Activity

            People

            Assignee:
            henryju OLD - Julien HENRY
            Reporter:
            henryju OLD - Julien HENRY
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: