Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-19630

Unable to filter/query repositories using the OFFLINE state option

XMLWordPrintable

      Issue Summary

      Search for repositories API returns empty list when filtering using state as OFFLINE

      This is reproducible on Data Center: yes

      Steps to Reproduce

      • Terminate the mesh sidecar process. (Don't try it in production)
      • Execute the API without specifying a query option state; it will return repositories with the state set to OFFLINE.
        curl -s -u admin --request GET   --url '<Bitbucket-Base-URL>/rest/api/latest/repos'   --header 'Accept: application/json' | jq "."
        {
          "size": 1,
          "limit": 25,
          "isLastPage": true,
          "values": [
            {
              "slug": "repo5",
              "id": 1,
              "name": "repo5",
              "hierarchyId": "110d85dccf2ecf3fc09b",
              "scmId": "git",
              "state": "OFFLINE",
              "statusMessage": "Offline",
              "forkable": true,
              "project": {
                "key": "PRO1",
                "id": 1,
                "name": "PROJECT1",
                "public": false,
                "type": "NORMAL",
                "links": {
                  "self": [
                    {
                      "href": "<Bitbucket-Base-URL>/projects/PRO1"
                    }
                  ]
                }
        .
        .
        .
                ],
                "self": [
                  {
                    "href": "<Bitbucket-Base-URL>/projects/PRO1/repos/repo5/browse"
                  }
                ]
              }
            }
          ],
          "start": 0
        }
        
      • Execute the same API using query parameter "state=OFFLINE".
        curl -s -u admin--request GET   --url '<Bitbucket-Base-URL>/rest/api/latest/repos?state=OFFLINE'   --header 'Accept: application/json' | jq "."
        {
          "size": 0,
          "limit": 25,
          "isLastPage": true,
          "values": [],
          "start": 0
        }
        

      Expected Results

      When using the query parameter "state=OFFLINE," the API should return repositories that are in this state.

      Actual Results

      When using the query parameter "state=OFFLINE," the API returns an empty list.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              e74118b4e28d David Jansons
              83b3279fad28 Aman Shrivastava
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: