Files
grafana-zabbix/pkg/zabbix/methods_test.go
Jocelyn Collado-Kuri e073382983 Fix always fetch Zabbix version before issuing new requests (#2133)
Previously we were only fetching the version when the version was `0`.
This generally worked, but posed some problems when customers were
updating their Zabbix version, specifically when upgrading from a
version < `7.2.x` to `7.2.x` or above.

Before `7.2.x`, an `auth` parameter was still supported when issuing a
zabbix request, this was deprecated in `6.4.x` and later removed in
`7.2.x`. When a user was on a version < `7.2.x` all the outgoing
requests would add this `auth` parameter. When upgrading to `7.2.x` this
was a problem, because the version was not `0`, hence, not requiring
getting the version again, but also because we were still building the
request considering an older version and adding the `auth` parameter,
when this was no longer supported.

This PR removes the check for `version == 0`, though this now means that
every request that goes out will check the version before hand, I think
this will give us a more accurate representation of the version that
needs to be used.

fixes
https://github.com/orgs/grafana/projects/457/views/40?pane=issue&itemId=3683181283&issue=grafana%7Coss-big-tent-squad%7C135
2025-12-05 17:34:20 -08:00

12 KiB