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

Errors raised because of duplication of notification keys after upgrading to SonarQube 8.4+

    XMLWordPrintable

    Details

    • Edition:
      Community
    • Production Notes:
      None

      Description

      Description

      When upgrading to SonarQube version >= 8.4, some users cannot go anymore on the Administration > System page.
      Indeed, the following error is raised by api/system/info WS :

      {"errors":[
              {
                "msg": "Duplicate key notification.CeReportTaskFailure.EmailNotificationChannel"
              }
          ]}
      

      The following notification keys have been detected as beein duplicated by different users :

      • notification.CeReportTaskFailure.EmailNotificationChannel
      • notification.ChangesOnMyIssue.EmailNotificationChannel
      • notification.NewAlerts.EmailNotificationChannel
      • notification.SQ-MyNewIssues.EmailNotificationChannel
      • sonar.lf.logoUrl

      Duplicate key (prop_key) referenced in the error shows a null component_uuid and null user_uuid in the properties table.

      Investigation

      This issue is most probably coming from the migration of the PROPERTIES#USER_ID to {{USER_UUID done in 8.4 by PopulatePropertiesUserUuid.

      Indeed, during this migration, an inner join is done from PROPERTIES#USER_ID to USERS#ID => If the USER_ID does not exist in the USERS table, then the row will be inserted with a NULL as USER_ID.

      This migration should then be updated to remove rows where PROPERTIES#USER_ID does not match any existing user ID in USERS#ID.

       

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              zipeng.wu Zipeng Wu
              Reporter:
              julien.lancelot Julien Lancelot
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: