From c05819df402d92e39bdf1b62e995176717902009 Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Mon, 10 Nov 2025 15:51:38 -0700 Subject: [PATCH] chore: bump nix go to 1.25.4 (#19817) --- Makefile | 10 ++++++++++ flake.lock | 8 ++++---- flake.nix | 10 +++++----- nix/default.nix | 3 ++- production/helm/loki/src/helm-test/canary_test.go | 6 +++--- 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 825b52a1b3..b300a85d47 100644 --- a/Makefile +++ b/Makefile @@ -893,3 +893,13 @@ update-loki-release-sha: mv .github/jsonnetfile.json.tmp .github/jsonnetfile.json @echo "Updated successfully" @$(MAKE) release-workflows + +.PHONY: flake-update +flake-update: + @docker run -v $(CURDIR):/loki \ + --workdir /loki \ + nixos/nix \ + nix \ + --extra-experimental-features nix-command \ + --extra-experimental-features flakes \ + flake update diff --git a/flake.lock b/flake.lock index e54e9ae7e0..42dbb85466 100644 --- a/flake.lock +++ b/flake.lock @@ -20,16 +20,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1762361079, - "narHash": "sha256-lz718rr1BDpZBYk7+G8cE6wee3PiBUpn8aomG/vLLiY=", + "lastModified": 1762498405, + "narHash": "sha256-Zg/SCgCaAioc0/SVZQJxuECGPJy+OAeBcGeA5okdYDc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ffcdcf99d65c61956d882df249a9be53e5902ea5", + "rev": "6faeb062ee4cf4f105989d490831713cc5a43ee1", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixpkgs-unstable", + "ref": "nixos-25.05", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 6cc10dc118..d32e39a984 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Grafana Loki"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; flake-utils.url = "github:numtide/flake-utils"; }; @@ -16,13 +16,13 @@ }; in rec { - defaultPackage = pkgs.loki; - packages = import ./nix { inherit self pkgs; inherit (pkgs) lib; }; + defaultPackage = packages.loki; + apps = { lint = { type = "app"; @@ -44,7 +44,7 @@ chart-testing gcc - go + go_1_25 golangci-lint gotools helm-docs @@ -52,7 +52,7 @@ nixpkgs-fmt statix yamllint - ] // packages; + ] ++ (builtins.attrValues packages); }; }); } diff --git a/nix/default.nix b/nix/default.nix index 7078108b06..fabe182508 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -32,7 +32,8 @@ let loki-helm-test = pkgs.callPackage ../production/helm/loki/src/helm-test { inherit pkgs; - inherit (pkgs) lib buildGoModule dockerTools; + inherit (pkgs) lib dockerTools; + buildGoModule = pkgs.buildGo125Module; rev = gitRevision; }; in diff --git a/production/helm/loki/src/helm-test/canary_test.go b/production/helm/loki/src/helm-test/canary_test.go index c8c26e6e53..732d85e6e6 100644 --- a/production/helm/loki/src/helm-test/canary_test.go +++ b/production/helm/loki/src/helm-test/canary_test.go @@ -129,7 +129,7 @@ func testResultCanary(t *testing.T, ctx context.Context, metric string, test fun body, err := io.ReadAll(rsp.Body) require.NoError(t, err, "Failed to read response body") - p, err := textparse.New(body, rsp.Header.Get("Content-Type"), true, false, nil) + p, err := textparse.New(body, rsp.Header.Get("Content-Type"), "", true, false, true, labels.NewSymbolTable()) require.NoError(t, err, "Failed to create Prometheus parser") for { @@ -142,8 +142,8 @@ func testResultCanary(t *testing.T, ctx context.Context, metric string, test fun continue } - l := labels.Labels{} - p.Metric(&l) + var l labels.Labels + p.Labels(&l) // Currently we aren't validating any labels, just the metric name, however this could be extended to do so. name := l.Get(model.MetricNameLabel)