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

Moved module disappears from code page if it's key doesn't change

    XMLWordPrintable

    Details

      Description

      Reproducer with Maven
      Analysis a multi-module project (eg. project contains module C in module B in module A).
      Move a module (eg. remove module B).
      Moved module can not be accessed from the UI anymore.

      First analysis with modules A, B and C:

      • code page for project:
      • code page for module A:
      • code page for module B:
      • code page for module C:

      Second analysis with only module A and C:

      • code page for module A (it is empty!):
      • note that module B and C can still be accessed by direct link and that they are displayed in the same location as the first analysis

      Reproducer with CLI scanner
      Override the key of module C to be constant using property sonar.moduleKey.

      Cause
      The column UUID_PATH is never updated even though it can change over time: eg. when a module B is moved.

      Another identified bug with the same cause
      When renaming or moving a file such as it's new key is the same as a file which was (logically) deleted at the time of the migration to 6.0, the file will appear at the root of the project.
      The cause is the same of this behaviour is the same as above, the UUID_PATH of the component is not updated, combined with the fact that the UUID_PATH of deleted component is set to "I belong directly to the project" during the migration which creates and populates the UUID_PATH column.

        Attachments

        1. Sélection_001.png
          Sélection_001.png
          27 kB
        2. Sélection_002.png
          Sélection_002.png
          26 kB
        3. Sélection_003.png
          Sélection_003.png
          30 kB
        4. Sélection_004.png
          Sélection_004.png
          30 kB
        5. Sélection_005.png
          Sélection_005.png
          30 kB

          Activity

            People

            Assignee:
            sebastien.lesaint Sebastien Lesaint
            Reporter:
            sebastien.lesaint Sebastien Lesaint
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: