From 3757137462eadc03273cdab012c1e2965c91af9d Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Sat, 13 May 2023 09:58:44 +0200 Subject: [PATCH] thanos: pin to Go 1.19 It panics when running with Go 1.20 with the following error: ``` panic: Something in this program imports go4.org/unsafe/assume-no-moving-gc to declare that it assumes a non-moving garbage collector, but your version of go4.org/unsafe/assume-no-moving-gc hasn't been updated to assert that it's safe against the go1.20 runtime. If you want to risk it, run with environment variable ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH=go1.20 set. Notably, if go1.20 adds a moving garbage collector, this program is unsafe to use. ``` --- pkgs/servers/monitoring/thanos/default.nix | 2 +- pkgs/top-level/all-packages.nix | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/monitoring/thanos/default.nix b/pkgs/servers/monitoring/thanos/default.nix index 76c8996dd7f8..240b77168d35 100644 --- a/pkgs/servers/monitoring/thanos/default.nix +++ b/pkgs/servers/monitoring/thanos/default.nix @@ -12,7 +12,7 @@ buildGoModule rec { vendorHash = "sha256-bNQwDttJ7YuQFrpp0alqe37/lue0CX5gB2UDRWWtTXQ="; - doCheck = false; + doCheck = true; subPackages = "cmd/thanos"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c57fe2eef51a..1b3046329c64 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26096,7 +26096,11 @@ with pkgs; tailspin = callPackage ../tools/misc/tailspin { }; - thanos = callPackage ../servers/monitoring/thanos { }; + thanos = callPackage ../servers/monitoring/thanos { + # Fails to run with go1.20 due to go4.org/unsafe/assume-no-moving-gc not being + # update to be compatible with Go 1.20 + buildGoModule = buildGo119Module; + }; trafficserver = callPackage ../servers/http/trafficserver { };