grafana-toolbox / grafana-wtf

Grep through all Grafana entities in the spirit of git-wtf.
GNU Affero General Public License v3.0
159 stars 16 forks source link

Fetch Grafana version from `/api/frontend/settings` #144

Closed squadgazzz closed 2 months ago

squadgazzz commented 2 months ago

AMG API doesn't contain /api/health endpoint, which makes it impossible to use grafana-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 https://github.com/grafana-toolbox/grafana-wtf/issues/141

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 87.15%. Comparing base (a5db83e) to head (7be7d22). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
grafana_wtf/core.py 88.88% 1 Missing :warning:
Additional details and impacted files ```diff @@ 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 ``` | [Flag](https://app.codecov.io/gh/grafana-toolbox/grafana-wtf/pull/144/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/grafana-toolbox/grafana-wtf/pull/144/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `87.15% <88.88%> (-0.06%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

amotl commented 2 months ago

Your improvement has been included into version 0.20.0, just released. Thanks again.