From 23c6a292be9862d792e85fd9533c6aaac2a84597 Mon Sep 17 00:00:00 2001 From: Joshua Leivenzon Date: Thu, 16 Oct 2025 16:35:31 +1100 Subject: [PATCH 1/4] GithubRefs: Allow arbitrary ref types GitHub's reference list API does not actually restrict the specified type, so don't artificially restrict it. The API does not actually make a distinction between the "type" and "prefix" at all, but this is maintained for backwards compatibility. The two are simply concatenated. --- src/lib/Hydra/Plugin/GithubRefs.pm | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/lib/Hydra/Plugin/GithubRefs.pm b/src/lib/Hydra/Plugin/GithubRefs.pm index a03452c6..a686260b 100644 --- a/src/lib/Hydra/Plugin/GithubRefs.pm +++ b/src/lib/Hydra/Plugin/GithubRefs.pm @@ -18,9 +18,8 @@ tags) from GitHub following a certain naming scheme =head1 DESCRIPTION -This plugin reads the list of branches or tags using GitHub's REST API. The name -of the reference must follow a particular prefix. This list is stored in the -nix-store and used as an input to declarative jobsets. +This plugin reads the list of branches or tags using GitHub's REST API. This +list is stored in the nix-store and used as an input to declarative jobsets. =head1 CONFIGURATION @@ -34,7 +33,7 @@ The declarative project C file must contains an input such as "pulls": { "type": "github_refs", - "value": "[owner] [repo] heads|tags - [prefix]", + "value": "[owner] [repo] [type] - [prefix]", "emailresponsible": false } @@ -42,12 +41,11 @@ In the above snippet, C<[owner]> is the repository owner and C<[repo]> is the repository name. Also note a literal C<->, which is placed there for the future use. -C denotes that one of these two is allowed, that is, the third -position should hold either the C or the C keyword. In case of the former, the plugin -will fetch all branches, while in case of the latter, it will fetch the tags. +C<[type]> is the type of ref to list. Typical values are "heads", "tags", and +"pull". "." will include all types. C denotes the prefix the reference name must start with, in order to be -included. +included. "." will include all references. For example, C<"value": "nixos hydra heads - release/"> refers to L repository, and will fetch all branches that @@ -102,8 +100,6 @@ sub fetchInput { return undef if $input_type ne "github_refs"; my ($owner, $repo, $type, $fut, $prefix) = split ' ', $value; - die "type field is neither 'heads' nor 'tags', but '$type'" - unless $type eq 'heads' or $type eq 'tags'; my $auth = $self->{config}->{github_authorization}->{$owner}; my $githubEndpoint = $self->{config}->{github_endpoint} // "https://api.github.com"; -- 2.52.0 From 20a0857660483e941a0eee44e9a9022556958044 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 30 Oct 2025 14:01:38 -0400 Subject: [PATCH 2/4] Revert "Deduplicate protocol code more with `ServeProto::BasicClientConnection`" This reverts commit 58846b0a1c896c55f3897f45b363ad2ba8a53ed5. --- src/hydra-queue-runner/build-remote.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/hydra-queue-runner/build-remote.cc b/src/hydra-queue-runner/build-remote.cc index 1489f7d6..4111a8fb 100644 --- a/src/hydra-queue-runner/build-remote.cc +++ b/src/hydra-queue-runner/build-remote.cc @@ -104,9 +104,9 @@ static void copyClosureTo( std::unique_lock sendLock(conn.machine->state->sendLock, std::chrono::seconds(600)); - conn.importPaths(destStore, [&](Sink & sink) { - exportPaths(destStore, missing, sink); - }); + conn.to << ServeProto::Command::ImportPaths; + exportPaths(destStore, missing, conn.to); + conn.to.flush(); if (readInt(conn.from) != 1) throw Error("remote machine failed to import closure"); @@ -301,10 +301,11 @@ static void copyPathFromRemote( lambda function only gets executed if someone tries to read from source2, we will send the command from here rather than outside the lambda. */ - conn.narFromPath(localStore, info.path, [&](Source & source) { - TeeSource tee(source, sink); - extractNarData(tee, localStore.printStorePath(info.path), narMembers); - }); + conn.to << ServeProto::Command::DumpStorePath << localStore.printStorePath(info.path); + conn.to.flush(); + + TeeSource tee(conn.from, sink); + extractNarData(tee, localStore.printStorePath(info.path), narMembers); }); destStore.addToStore(info, *source2, NoRepair, NoCheckSigs); -- 2.52.0 From 39b2c7c0dab85ca2ee861c0cdb8e4038d242e83e Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 25 Nov 2025 13:27:04 +0100 Subject: [PATCH 3/4] package.nix: update postgresql to 17 NixOS 25.11 does not ship with PostgreSQL 13 any more. --- package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.nix b/package.nix index 2ea21b1e..3d25ab2d 100644 --- a/package.nix +++ b/package.nix @@ -31,7 +31,7 @@ , perl , pixz , boost -, postgresql_13 +, postgresql_17 , nlohmann_json , prometheus-cpp @@ -192,7 +192,7 @@ stdenv.mkDerivation (finalAttrs: { subversion breezy openldap - postgresql_13 + postgresql_17 pixz nix-eval-jobs ]; -- 2.52.0 From 7123dd8981bc1dfadbea009441c5e7d3ad770578 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 25 Nov 2025 15:23:17 +0100 Subject: [PATCH 4/4] flake.nix: update to nixos-25.11 And squashes eval warnings from accessing pkgs.hostPlatform. --- flake.lock | 8 ++++---- flake.nix | 4 ++-- nixos-modules/default.nix | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 63897d26..c0eb94e2 100644 --- a/flake.lock +++ b/flake.lock @@ -36,16 +36,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1759652726, - "narHash": "sha256-2VjnimOYDRb3DZHyQ2WH2KCouFqYm9h0Rr007Al/WSA=", + "lastModified": 1764020296, + "narHash": "sha256-6zddwDs2n+n01l+1TG6PlyokDdXzu/oBmEejcH5L5+A=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "06b2985f0cc9eb4318bf607168f4b15af1e5e81d", + "rev": "a320ce8e6e2cc6b4397eef214d202a50a4583829", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-25.05-small", + "ref": "nixos-25.11-small", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 703a76f4..537a18b4 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { description = "A Nix-based continuous build system"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05-small"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11-small"; inputs.nix = { url = "github:NixOS/nix/2.32-maintenance"; @@ -59,7 +59,7 @@ manual = forEachSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; - hydra = self.packages.${pkgs.hostPlatform.system}.hydra; + hydra = self.packages.${pkgs.stdenv.hostPlatform.system}.hydra; in pkgs.runCommand "hydra-manual-${hydra.version}" { } '' diff --git a/nixos-modules/default.nix b/nixos-modules/default.nix index d12d8338..336869c5 100644 --- a/nixos-modules/default.nix +++ b/nixos-modules/default.nix @@ -4,7 +4,7 @@ hydra = { pkgs, lib,... }: { _file = ./default.nix; imports = [ ./hydra.nix ]; - services.hydra-dev.package = lib.mkDefault self.packages.${pkgs.hostPlatform.system}.hydra; + services.hydra-dev.package = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.hydra; }; hydraTest = { pkgs, ... }: { -- 2.52.0