diff --git a/changelogs/fragments/294-bump-grafana-version.yml b/changelogs/fragments/294-bump-grafana-version.yml index f171f15c..a3050c01 100644 --- a/changelogs/fragments/294-bump-grafana-version.yml +++ b/changelogs/fragments/294-bump-grafana-version.yml @@ -1,2 +1,4 @@ minor_changes: - Bump version of Python used in tests to 3.10 +bugfixes: + - grafana_folder, fix an issue during delete (starting Grafana 9.3) diff --git a/plugins/modules/grafana_folder.py b/plugins/modules/grafana_folder.py index d39e56e4..380a510c 100644 --- a/plugins/modules/grafana_folder.py +++ b/plugins/modules/grafana_folder.py @@ -215,7 +215,10 @@ def _send_request(self, url, data=None, headers=None, method="GET"): error_msg = resp.read()['message'] self._module.fail_json(failed=True, msg=error_msg) elif status_code == 200: - return self._module.from_json(resp.read()) + # XXX: Grafana folders endpoint stopped sending back json in response for delete operations + # see https://github.com/grafana/grafana/issues/77673 + response = resp.read() or "{}" + return self._module.from_json(response) self._module.fail_json(failed=True, msg="Grafana Folders API answered with HTTP %d" % status_code) def get_version(self):