-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch Grafana version from /api/frontend/settings
#144
Fetch Grafana version from /api/frontend/settings
#144
Conversation
11fffe5
to
e8f243b
Compare
if not isinstance(response, dict): | ||
error = f"{error_template}: Invalid response, content was: {response}" | ||
|
||
response = Munch(response) | ||
response = response.get("buildInfo") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole response is quite large. It makes sense to return only basic buildInfo
which contains similar to /api/health
response data.
e8f243b
to
1b9ef80
Compare
health = wtf.health | ||
assert "commit" in health | ||
assert "version" in health | ||
assert health.database == "ok" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
database
status is not represented in the buildInfo
response.
/api/frontend/settings
/api/frontend/settings
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #144 +/- ##
==========================================
- Coverage 87.21% 87.15% -0.06%
==========================================
Files 9 9
Lines 1079 1082 +3
==========================================
+ Hits 941 943 +2
- Misses 138 139 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a stack!
Your improvement has been included into version 0.20.0, just released. Thanks again. |
AMG API doesn't contain
/api/health
endpoint, which makes it impossible to usegrafana-wtf
with this kind of setup.The proposal is to use
/api/frontend/settings
for the same purpose, which works for both regular and AWS-managed Grafana versions.Fixes #141