From 21044bc4d9d0373366ca189f27066124f526b3b8 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 21 May 2024 18:01:30 -0400 Subject: [PATCH 1/6] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nix': 'github:NixOS/nix/8f42912c80c0a03f62f6a3d28a3af05a9762565d' (2024-01-30) → 'github:NixOS/nix/ab48ea416a203e9ccefb70aa634e27477e4c1ac4' (2024-05-15) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index d8b2e4a94..3c4c0f759 100644 --- a/flake.lock +++ b/flake.lock @@ -42,11 +42,11 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1706637536, - "narHash": "sha256-fjx+nCOzuSxGWfhwWWc8hCsLFZAjZLDDUcbBtldRqbk=", + "lastModified": 1715805674, + "narHash": "sha256-0CIBMECsA3ISJZrJcOTzi6wa3QENTKGLtOpYIOoxwxo=", "owner": "NixOS", "repo": "nix", - "rev": "8f42912c80c0a03f62f6a3d28a3af05a9762565d", + "rev": "ab48ea416a203e9ccefb70aa634e27477e4c1ac4", "type": "github" }, "original": { From 879ceb5cdc88096004882402d333f27d2afac577 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 21 May 2024 18:23:35 -0400 Subject: [PATCH 2/6] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nix': 'github:NixOS/nix/60824fa97c588a0faf68ea61260a47e388b0a4e5' (2024-04-11) → 'github:NixOS/nix/1ebc34e9c54b740ea4f4466443047d709dccf5b2' (2024-05-16) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 966431f9c..a4be74335 100644 --- a/flake.lock +++ b/flake.lock @@ -42,11 +42,11 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1712849398, - "narHash": "sha256-10z/SoidVl9/lh56cMLj7ntJZHtVrumFvmn1YEqXmaM=", + "lastModified": 1715845907, + "narHash": "sha256-1OigUcZGDInTVZJBTioo9vwRt70yvcfAkSRUeAD/mfg=", "owner": "NixOS", "repo": "nix", - "rev": "60824fa97c588a0faf68ea61260a47e388b0a4e5", + "rev": "1ebc34e9c54b740ea4f4466443047d709dccf5b2", "type": "github" }, "original": { From b472f55563285ae9ecfa1322530a31a81cc3d42d Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Sun, 8 Sep 2024 12:15:34 +1000 Subject: [PATCH 3/6] set a default for hydra-compress-logs service follow up from 99ca560d583239b1bc34485f2f719989642fa697 --- nixos-modules/hydra.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos-modules/hydra.nix b/nixos-modules/hydra.nix index 97906cb34..d001675da 100644 --- a/nixos-modules/hydra.nix +++ b/nixos-modules/hydra.nix @@ -464,10 +464,12 @@ in '' set -eou pipefail compression=$(sed -nr 's/compress_build_logs_compression = ()/\1/p' ${baseDir}/hydra.conf) - if [[ $compression == zstd ]]; then + if [[ $compression == "" ]]; then + compression="bzip2" + elif [[ $compression == zstd ]]; then compression="zstd --rm" fi - find ${baseDir}/build-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r $compression --force --quiet + find ${baseDir}/build-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r "$compression" --force --quiet ''; startAt = "Sun 01:45"; }; From cc1b6d394e2e65575b29093b6a63af7a7b30e4ec Mon Sep 17 00:00:00 2001 From: Michael Bishop Date: Fri, 20 Sep 2024 04:08:22 -0300 Subject: [PATCH 4/6] fix the binary cache calling isValidPath, and 2 other files with the same issue --- src/lib/Hydra/Controller/Root.pm | 2 +- src/lib/Hydra/Plugin/S3Backup.pm | 2 +- src/lib/Hydra/Plugin/SubversionInput.pm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/Hydra/Controller/Root.pm b/src/lib/Hydra/Controller/Root.pm index 473892511..75d35ac3c 100644 --- a/src/lib/Hydra/Controller/Root.pm +++ b/src/lib/Hydra/Controller/Root.pm @@ -329,7 +329,7 @@ sub nar :Local :Args(1) { else { $path = $Nix::Config::storeDir . "/$path"; - gone($c, "Path " . $path . " is no longer available.") unless isValidPath($path); + gone($c, "Path " . $path . " is no longer available.") unless $MACHINE_LOCAL_STORE->isValidPath($path); $c->stash->{current_view} = 'NixNAR'; $c->stash->{storePath} = $path; diff --git a/src/lib/Hydra/Plugin/S3Backup.pm b/src/lib/Hydra/Plugin/S3Backup.pm index 98e797478..a0d678510 100644 --- a/src/lib/Hydra/Plugin/S3Backup.pm +++ b/src/lib/Hydra/Plugin/S3Backup.pm @@ -92,7 +92,7 @@ sub buildFinished { my $hash = substr basename($path), 0, 32; my ($deriver, $narHash, $time, $narSize, $refs) = queryPathInfo($path, 0); my $system; - if (defined $deriver and isValidPath($deriver)) { + if (defined $deriver and $MACHINE_LOCAL_STORE->isValidPath($deriver)) { $system = derivationFromPath($deriver)->{platform}; } foreach my $reference (@{$refs}) { diff --git a/src/lib/Hydra/Plugin/SubversionInput.pm b/src/lib/Hydra/Plugin/SubversionInput.pm index 83c1f39d2..d3579c40f 100644 --- a/src/lib/Hydra/Plugin/SubversionInput.pm +++ b/src/lib/Hydra/Plugin/SubversionInput.pm @@ -46,7 +46,7 @@ sub fetchInput { $MACHINE_LOCAL_STORE->addTempRoot($cachedInput->storepath) if defined $cachedInput; - if (defined $cachedInput && isValidPath($cachedInput->storepath)) { + if (defined $cachedInput && $MACHINE_LOCAL_STORE->isValidPath($cachedInput->storepath)) { $storePath = $cachedInput->storepath; $sha256 = $cachedInput->sha256hash; } else { From 1ef6b5e7b467c67c085facca909f3eafc33d9b55 Mon Sep 17 00:00:00 2001 From: hacker1024 Date: Wed, 21 Aug 2024 22:13:38 +1000 Subject: [PATCH 5/6] Use Nix::Store and Nix::Utils in NARInfo.pm These are required for the `signString` and `readFile` subroutines used when signing NARs. (cherry picked from commit b94a7b6d5c56362af9ea85d944f8454d861ec001) --- src/lib/Hydra/View/NARInfo.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/Hydra/View/NARInfo.pm b/src/lib/Hydra/View/NARInfo.pm index bf8711a4a..801fc06a5 100644 --- a/src/lib/Hydra/View/NARInfo.pm +++ b/src/lib/Hydra/View/NARInfo.pm @@ -6,6 +6,8 @@ use File::Basename; use Hydra::Helper::CatalystUtils; use MIME::Base64; use Nix::Manifest; +use Nix::Store; +use Nix::Utils; use Hydra::Helper::Nix; use base qw/Catalyst::View/; From 029116422d01772bf532988814f529512ab02efb Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 24 Sep 2024 11:28:55 -0400 Subject: [PATCH 6/6] Update to Nix 2.23 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nix': 'github:NixOS/nix/1c8150ac312b5f9ba1b3f6768ff43b09867e5883' (2024-04-23) → 'github:NixOS/nix/5ffd239adc9b7fddca7a2a59a8b87da5af14ec4d' (2024-09-23) --- flake.lock | 8 ++++---- flake.nix | 2 +- src/hydra-queue-runner/state.hh | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index e828aa7b6..535ca0962 100644 --- a/flake.lock +++ b/flake.lock @@ -80,16 +80,16 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1713874370, - "narHash": "sha256-gW1mO/CvsQQ5gvgiwzxsGhPFI/tx30NING+qgF5Do0s=", + "lastModified": 1727132408, + "narHash": "sha256-esYY9tT7Q79rG4+Xvf32L3AZvVGgdVeT1n0uK6Gd6ls=", "owner": "NixOS", "repo": "nix", - "rev": "1c8150ac312b5f9ba1b3f6768ff43b09867e5883", + "rev": "5ffd239adc9b7fddca7a2a59a8b87da5af14ec4d", "type": "github" }, "original": { "owner": "NixOS", - "ref": "2.22-maintenance", + "ref": "2.23-maintenance", "repo": "nix", "type": "github" } diff --git a/flake.nix b/flake.nix index 1f73e3b3b..1acb245ab 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "A Nix-based continuous build system"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11-small"; - inputs.nix.url = "github:NixOS/nix/2.22-maintenance"; + inputs.nix.url = "github:NixOS/nix/2.23-maintenance"; inputs.nix.inputs.nixpkgs.follows = "nixpkgs"; outputs = { self, nixpkgs, nix }: diff --git a/src/hydra-queue-runner/state.hh b/src/hydra-queue-runner/state.hh index 5d242cdf0..839239fe7 100644 --- a/src/hydra-queue-runner/state.hh +++ b/src/hydra-queue-runner/state.hh @@ -23,6 +23,7 @@ #include "nar-extractor.hh" #include "serve-protocol.hh" #include "serve-protocol-impl.hh" +#include "serve-protocol-connection.hh" #include "machines.hh"