From 81cc4f06abc644b047e0758309cfbd982dac18ed Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 12 Nov 2026 02:33:44 +0000 Subject: populate pipe: deliver changed output of the same size pipe sources get a fixed modification time, so rsync's quick check took changed output of the same size, e.g. a new commit hash or token, for unchanged, and didn't deliver it. pipe sources get synced comparing checksums now. An edge case changes a pipe source's output without changing its size. --- tests/scenarios.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'tests/scenarios.nix') diff --git a/tests/scenarios.nix b/tests/scenarios.nix index f1a5958..0e54054 100644 --- a/tests/scenarios.nix +++ b/tests/scenarios.nix @@ -919,6 +919,32 @@ assert !(krops.isLocalTarget (targets.remote "/")); ''; }; }) + # Output of the same length, which rsync's quick check doesn't notice. + (s "pipe-change" { + prepareDeployer = '' + echo piped > /fixtures/pipe2-data + ''; + phases = [ + { + sources.x.pipe = "/fixtures/pipe2"; + check = '' + expect_eq x "$(cat "$T"/x)" piped + ''; + mutateDeployer = '' + echo PIPED > /fixtures/pipe2-data + ''; + } + { + sources.x.pipe = "/fixtures/pipe2"; + check = '' + expect_eq x "$(cat "$T"/x)" PIPED + ''; + mutateDeployer = '' + echo piped > /fixtures/pipe2-data + ''; + } + ]; + }) ] ++ lib.optional (targetKind == "local") # The target has the path the input is locked to. (s "uselocal" { -- cgit v1.3.1