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

Wrong total in WS api/components/search response

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.7
    • Component/s: Web API
    • Labels:

      Description

      Problem

      The components returned filters the unauthorized ones whereas the total does not.
      It's possible to have a response similar to the extract below.

      {
          "components": [],
          "paging": {
              "pageIndex": 1,
              "pageSize": 100,
              "total": 51
          }
      }
      

      Technical Solution

      The problem highlights some strong limitations with the current implementation:

      • pagination is applied before filtering out unauthorized components (bug)
      • it is not possible to count only authorized component
      • performance are not good if searching for files with a great page size (no hard limitation)

      It should rely on the ES component index which provides out of the box:

      • fast response
      • pagination with 'Browse' permission

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                teryk.bellahsene Teryk Bellahsene (Inactive)
                Reporter:
                teryk.bellahsene Teryk Bellahsene (Inactive)
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: