Watch
0
0
Fork
You've already forked hyperhive
0

read the running rev and the hyperhive flake from /etc files, not the unit

This commit is contained in:
atlas 2026-11-06 04:44:27 +01:00 • committed by mara
commit aed7c8451a

View file

@ -127,7 +127,7 @@ let
builderCheck =
agentModule:
let
src = env.SWARM_BUILDER_HYPERHIVE_FLAKE;
src = withBuilder.services.hyperhive.deploy.hyperhiveFlake;
hyperhive = (import "${src}/flake.nix").outputs (
self.inputs
// {
@ -262,10 +262,15 @@ let
}
{
# The check builds on the sources this host was deployed with, so a green check means
# the same hyperhive and nixpkgs base.
# the same hyperhive and nixpkgs base. The hyperhive source is a file the
# daemon re-reads, not part of its unit.
name = "the builder builds on the hyperhive and nixpkgs this host was deployed with";
ok =
env.SWARM_BUILDER_HYPERHIVE_FLAKE == withBuilder.services.hyperhive.deploy.hyperhiveFlake
(builtins.fromJSON (
builtins.unsafeDiscardStringContext inner.environment.etc."hyperhive/swarm-builder.json".text
)).hyperhive_flake
== builtins.unsafeDiscardStringContext withBuilder.services.hyperhive.deploy.hyperhiveFlake
&& !(env ? SWARM_BUILDER_HYPERHIVE_FLAKE)
&& env.SWARM_BUILDER_NIXPKGS_FLAKE == withBuilder.services.hyperhive.deploy.builder.nixpkgsFlake
&& lib.hasSuffix "-check-flake" env.SWARM_BUILDER_CHECK_FLAKE
&& env.SWARM_BUILDER_SYSTEM == pkgs.stdenv.hostPlatform.system