diff --git a/pkgs/servers/monitoring/grafana-agent/default.nix b/pkgs/servers/monitoring/grafana-agent/default.nix index 41b8b56fc441..c772b76cf031 100644 --- a/pkgs/servers/monitoring/grafana-agent/default.nix +++ b/pkgs/servers/monitoring/grafana-agent/default.nix @@ -2,16 +2,21 @@ buildGoModule rec { pname = "grafana-agent"; - version = "0.15.0"; + version = "0.16.1"; src = fetchFromGitHub { rev = "v${version}"; owner = "grafana"; repo = "agent"; - sha256 = "sha256-mRDd9G/VMbDwp/GYPoUE0v9j+BmUd08wOMJjgcg2qdo="; + sha256 = "0kqbn6fqlrxjqdkkhbr7qmm2m05a7dlskfdb7y4gr5ggi65m6ik5"; }; - vendorSha256 = "sha256-sQFWdBOjfYb1e7ZzHGgtgnuEQCU4xnkJTyzC/9DRcYs="; + vendorSha256 = "0xi69a1zkcmi5q8m7lfwp3xb4cbkwc2dzqm24lfqsq13xj5jq6ph"; + + patches = [ + # https://github.com/grafana/agent/issues/731 + ./skip_test_requiring_network.patch + ]; # uses go-systemd, which uses libsystemd headers # https://github.com/coreos/go-systemd/issues/351 diff --git a/pkgs/servers/monitoring/grafana-agent/skip_test_requiring_network.patch b/pkgs/servers/monitoring/grafana-agent/skip_test_requiring_network.patch new file mode 100644 index 000000000000..fcba11dd2fb4 --- /dev/null +++ b/pkgs/servers/monitoring/grafana-agent/skip_test_requiring_network.patch @@ -0,0 +1,15 @@ +diff --git a/pkg/operator/selector_eventhandler_test.go b/pkg/operator/selector_eventhandler_test.go +index 7b6ec602..e79bae0e 100644 +--- a/pkg/operator/selector_eventhandler_test.go ++++ b/pkg/operator/selector_eventhandler_test.go +@@ -39,6 +39,10 @@ var ( + // TestEnqueueRequestForSelector creates an example Kubenretes cluster and runs + // EnqueueRequestForSelector to validate it works. + func TestEnqueueRequestForSelector(t *testing.T) { ++ // Requires network access, which is not available during ++ // the nixpkgs sandboxed build ++ t.Skip() ++ + l := log.NewNopLogger() + + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)