From 8e3ada2afcc2dd5153d3ae162afbb0633a570285 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Mon, 28 Mar 2022 09:26:28 -0700 Subject: [PATCH 1/4] Revert "Use `copyClosure` instead of `computeFSClosure` + `copyPaths`" This reverts commit f14c583ce5188903f7c9db6f99c8c3fb42c77416. --- src/hydra-queue-runner/build-remote.cc | 6 +++--- src/hydra-queue-runner/queue-monitor.cc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/hydra-queue-runner/build-remote.cc b/src/hydra-queue-runner/build-remote.cc index 69c82e72..464a35c8 100644 --- a/src/hydra-queue-runner/build-remote.cc +++ b/src/hydra-queue-runner/build-remote.cc @@ -287,9 +287,9 @@ void State::buildRemote(ref destStore, this will copy the inputs to the binary cache from the local store. */ if (localStore != std::shared_ptr(destStore)) { - copyClosure(*localStore, *destStore, - step->drv->inputSrcs, - NoRepair, NoCheckSigs, NoSubstitute); + StorePathSet closure; + localStore->computeFSClosure(step->drv->inputSrcs, closure); + copyPaths(*localStore, *destStore, closure, NoRepair, NoCheckSigs, NoSubstitute); } { diff --git a/src/hydra-queue-runner/queue-monitor.cc b/src/hydra-queue-runner/queue-monitor.cc index 3f19d36a..49caf8e3 100644 --- a/src/hydra-queue-runner/queue-monitor.cc +++ b/src/hydra-queue-runner/queue-monitor.cc @@ -513,9 +513,9 @@ Step::ptr State::createStep(ref destStore, // FIXME: should copy directly from substituter to destStore. } - copyClosure(*localStore, *destStore, - StorePathSet { *path }, - NoRepair, CheckSigs, NoSubstitute); + StorePathSet closure; + localStore->computeFSClosure({*path}, closure); + copyPaths(*localStore, *destStore, closure, NoRepair, CheckSigs, NoSubstitute); time_t stopTime = time(0); From 127a64459577f470c0b981f22049735b402246f9 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Mon, 28 Mar 2022 09:24:31 -0700 Subject: [PATCH 2/4] Revert "Update Nix to 2.6" This reverts commit 5ae26aa7604f714dcc73edcb74fe71ddc8957f6c. --- flake.lock | 43 +++++++++++-------------------------- flake.nix | 1 - t/jobs/empty-dir-builder.sh | 3 --- 3 files changed, 13 insertions(+), 34 deletions(-) diff --git a/flake.lock b/flake.lock index e4bf8c71..fa71ceb5 100644 --- a/flake.lock +++ b/flake.lock @@ -3,15 +3,16 @@ "lowdown-src": { "flake": false, "locked": { - "lastModified": 1633514407, - "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", + "lastModified": 1617481909, + "narHash": "sha256-SqnfOFuLuVRRNeVJr1yeEPJue/qWoCp5N6o5Kr///p4=", "owner": "kristapsdz", "repo": "lowdown", - "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", + "rev": "148f9b2f586c41b7e36e73009db43ea68c7a1a4d", "type": "github" }, "original": { "owner": "kristapsdz", + "ref": "VERSION_0_8_4", "repo": "lowdown", "type": "github" } @@ -19,31 +20,28 @@ "nix": { "inputs": { "lowdown-src": "lowdown-src", - "nixpkgs": "nixpkgs", - "nixpkgs-regression": "nixpkgs-regression" + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1643066034, - "narHash": "sha256-xEPeMcNJVOeZtoN+d+aRwolpW8mFSEQx76HTRdlhPhg=", + "lastModified": 1628586117, + "narHash": "sha256-8hS4xy7fq3z9XZIMYm4sQi9SzhcYqEJfdbwgDePoWuc=", "owner": "NixOS", "repo": "nix", - "rev": "a1cd7e58606a41fcf62bf8637804cf8306f17f62", + "rev": "a6ba313a0aac3b6e2fef434cb42d190a0849238e", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "2.6.0", - "repo": "nix", - "type": "github" + "id": "nix", + "type": "indirect" } }, "nixpkgs": { "locked": { - "lastModified": 1632864508, - "narHash": "sha256-d127FIvGR41XbVRDPVvozUPQ/uRHbHwvfyKHwEt5xFM=", + "lastModified": 1624862269, + "narHash": "sha256-JFcsh2+7QtfKdJFoPibLFPLgIW6Ycnv8Bts9a7RYme0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "82891b5e2c2359d7e58d08849e4c89511ab94234", + "rev": "f77036342e2b690c61c97202bf48f2ce13acc022", "type": "github" }, "original": { @@ -52,21 +50,6 @@ "type": "indirect" } }, - "nixpkgs-regression": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "indirect" - } - }, "root": { "inputs": { "nix": "nix", diff --git a/flake.nix b/flake.nix index d69048ed..56cb2960 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,6 @@ description = "A Nix-based continuous build system"; inputs.nixpkgs.follows = "nix/nixpkgs"; - inputs.nix.url = github:NixOS/nix/2.6.0; outputs = { self, nixpkgs, nix }: let diff --git a/t/jobs/empty-dir-builder.sh b/t/jobs/empty-dir-builder.sh index 949216e0..addc7ef6 100755 --- a/t/jobs/empty-dir-builder.sh +++ b/t/jobs/empty-dir-builder.sh @@ -1,6 +1,3 @@ #! /bin/sh -# Workaround for https://github.com/NixOS/nix/pull/6051 -echo "some output" - mkdir $out From 2ba83a5cba8db06cb26aa14e6ba99e6764682ace Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Mon, 28 Mar 2022 09:33:58 -0700 Subject: [PATCH 3/4] t/jobs/empty-dir-builder: provide output for `nix log` --- t/jobs/empty-dir-builder.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/jobs/empty-dir-builder.sh b/t/jobs/empty-dir-builder.sh index addc7ef6..949216e0 100755 --- a/t/jobs/empty-dir-builder.sh +++ b/t/jobs/empty-dir-builder.sh @@ -1,3 +1,6 @@ #! /bin/sh +# Workaround for https://github.com/NixOS/nix/pull/6051 +echo "some output" + mkdir $out From 921e27d6c0e1974adb53f8db4a2a0da120ff65c4 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Mon, 28 Mar 2022 11:36:14 -0700 Subject: [PATCH 4/4] Build against Nix 2.5.1 --- flake.lock | 25 +++++++++++++------------ flake.nix | 1 + 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index fa71ceb5..377aed12 100644 --- a/flake.lock +++ b/flake.lock @@ -3,16 +3,15 @@ "lowdown-src": { "flake": false, "locked": { - "lastModified": 1617481909, - "narHash": "sha256-SqnfOFuLuVRRNeVJr1yeEPJue/qWoCp5N6o5Kr///p4=", + "lastModified": 1633514407, + "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", "owner": "kristapsdz", "repo": "lowdown", - "rev": "148f9b2f586c41b7e36e73009db43ea68c7a1a4d", + "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", "type": "github" }, "original": { "owner": "kristapsdz", - "ref": "VERSION_0_8_4", "repo": "lowdown", "type": "github" } @@ -23,25 +22,27 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1628586117, - "narHash": "sha256-8hS4xy7fq3z9XZIMYm4sQi9SzhcYqEJfdbwgDePoWuc=", + "lastModified": 1639739069, + "narHash": "sha256-GOsiqy9EaTwDn2PLZ4eFj1VkXcBUbqrqHehRE9GuGdU=", "owner": "NixOS", "repo": "nix", - "rev": "a6ba313a0aac3b6e2fef434cb42d190a0849238e", + "rev": "b4f250417ab64f237c8b51439fe1f427193ab23b", "type": "github" }, "original": { - "id": "nix", - "type": "indirect" + "owner": "NixOS", + "ref": "2.5.1", + "repo": "nix", + "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1624862269, - "narHash": "sha256-JFcsh2+7QtfKdJFoPibLFPLgIW6Ycnv8Bts9a7RYme0=", + "lastModified": 1632864508, + "narHash": "sha256-d127FIvGR41XbVRDPVvozUPQ/uRHbHwvfyKHwEt5xFM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f77036342e2b690c61c97202bf48f2ce13acc022", + "rev": "82891b5e2c2359d7e58d08849e4c89511ab94234", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 56cb2960..188f2bf9 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,7 @@ description = "A Nix-based continuous build system"; inputs.nixpkgs.follows = "nix/nixpkgs"; + inputs.nix.url = "github:NixOS/nix/2.5.1"; outputs = { self, nixpkgs, nix }: let