From 4fdedf5f0810efc4dd28f4586c2f7e972e60acc5 Mon Sep 17 00:00:00 2001 From: Bouke van der Bijl Date: Wed, 11 Mar 2026 11:13:11 +0100 Subject: [PATCH] grafanaPlugins: prefer per-platform hashes to 'any' Some packages have both per-platform _and_ an 'any' packages (e.g. grafana-clickhouse-datasource) and the update script fails for those cases. Prefer the per-platform packages if available. --- .../monitoring/grafana/plugins/update-grafana-plugin.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/monitoring/grafana/plugins/update-grafana-plugin.sh b/pkgs/servers/monitoring/grafana/plugins/update-grafana-plugin.sh index db1463c7333c..34638be8d264 100755 --- a/pkgs/servers/monitoring/grafana/plugins/update-grafana-plugin.sh +++ b/pkgs/servers/monitoring/grafana/plugins/update-grafana-plugin.sh @@ -35,8 +35,8 @@ update() { update-source-version $system "grafanaPlugins.${plugin_name}" "$latest_version" "$hash" } -if echo "$api_response" | jq -e .packages.any > /dev/null; then - # the package contains an "any" package, so there should be only one zipHash. +if echo "$api_response" | jq -e '.packages | select(length == 1) | .any' > /dev/null; then + # the package only contains an "any" package, so there should be only one zipHash. update "any" else update "linux-amd64" "x86_64-linux"