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

Component page doesn't always refresh after background task is completed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.5
    • Component/s: Web
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      When a Project is first analyzed, or a Portfolio is computed, the ComponentContainer component should automatically refresh once the background task is completed, triggering a re-render of the overview and the component navigation. However, in some cases, this doesn't occur, and either you stay on the same page (say, tutorial page for projects), or some parts of the UI dont get updated (the component navigation, for instance).

      Problem:

      Upon initializing the ComponentContainer, we check whether any tasks were already "done" (returned as current), or if any are in the queue.

      • If one was done, we assume it's a report that was processed, and load the overview.
      • If we only find pending tasks, we wait until one of them moves to "In progress", and reload the overview.

      The problem occurs if, upon initial load, no task is current, and, when checking again, nothing is marked as "in progress", but goes straight to current. This can happen on fast systems, especially when analyzing small projects. In that case, SQ will continue pinging the queue, to see if anything moves to "in progress".

      Solution:

      If anything is set as current, whereas before there wasn't anything, we can safely assume the report was processed, and treat it like any "initial" analysis.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              wouter.admiraal Wouter Admiraal
              Reporter:
              jeremy.davis Jeremy Davis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: