-
Bug
-
Resolution: Fixed
-
Medium
-
8.0.0, 9.2.0
-
1
-
Severity 2 - Major
-
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