move c0re.hyperhiveFlake to deploy.hyperhiveFlake
This commit is contained in:
parent
76de27fc97
commit
70538fb209
2 changed files with 39 additions and 24 deletions
|
|
@ -252,7 +252,7 @@ let
|
|||
# the same hyperhive and nixpkgs base.
|
||||
name = "the builder builds on the hyperhive and nixpkgs this host was deployed with";
|
||||
ok =
|
||||
env.SWARM_BUILDER_HYPERHIVE_FLAKE == withBuilder.services.hyperhive.c0re.hyperhiveFlake
|
||||
env.SWARM_BUILDER_HYPERHIVE_FLAKE == withBuilder.services.hyperhive.deploy.hyperhiveFlake
|
||||
&& 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
|
||||
|
|
|
|||
|
|
@ -1441,6 +1441,7 @@ let
|
|||
c0re.agentIoWeight = null;
|
||||
c0re.buildSlots = 3;
|
||||
c0re.adminUsers = [ "alice" ];
|
||||
c0re.hyperhiveFlake = "/nix/store/legacy-flake";
|
||||
};
|
||||
c = old.services.hyperhive.deploy.hive-controller;
|
||||
warned =
|
||||
|
|
@ -1468,6 +1469,8 @@ let
|
|||
&& c.agentIoWeight == null
|
||||
&& c.buildSlots == 3
|
||||
&& c.adminUsers == [ "alice" ]
|
||||
&& old.services.hyperhive.deploy.hyperhiveFlake == "/nix/store/legacy-flake"
|
||||
&& serve.hyperhive_flake == "/nix/store/legacy-flake"
|
||||
&& lib.all (warned old) [
|
||||
"package"
|
||||
"frontend"
|
||||
|
|
@ -1483,27 +1486,34 @@ let
|
|||
"agentIoWeight"
|
||||
"buildSlots"
|
||||
"adminUsers"
|
||||
"hyperhiveFlake"
|
||||
]
|
||||
&& !(warned bare "package")
|
||||
&& !(warned bare "adminUsers")
|
||||
&& !(warned bare "hyperhiveFlake")
|
||||
&& serve.agent_memory_max == "8G"
|
||||
&& serve.agent_cpu_quota == "300%"
|
||||
&& serve.build_slots == 3
|
||||
&& old.users.groups.hive-admin.members == [ "alice" ];
|
||||
}
|
||||
{
|
||||
# What the moved options render with their defaults: the agent limits
|
||||
# What the moved options render with their defaults: the flake source, the agent limits
|
||||
# and build slots in serve.json, the sudoless-hivectl group's members,
|
||||
# and the model price table. The same values the options held at their
|
||||
# old paths.
|
||||
name = "the agent limits, build slots, admin group and price table render their defaults unchanged";
|
||||
name = "the flake source, agent limits, build slots, admin group and price table render their defaults unchanged";
|
||||
ok =
|
||||
let
|
||||
serve = builtins.fromJSON (
|
||||
builtins.unsafeDiscardStringContext allLocal.environment.etc."hyperhive/serve.json".text
|
||||
);
|
||||
in
|
||||
serve.agent_memory_max == "4G"
|
||||
serve.hyperhive_flake
|
||||
== builtins.unsafeDiscardStringContext "${(import ../sources.nix { inherit lib; })
|
||||
.hyperhiveFlakeSource
|
||||
}"
|
||||
&& allLocal.services.hyperhive.deploy.hyperhiveFlake == serve.hyperhive_flake
|
||||
&& serve.agent_memory_max == "4G"
|
||||
&& serve.agent_cpu_quota == "200%"
|
||||
&& serve.agent_cpu_weight == 80
|
||||
&& serve.agent_io_weight == 80
|
||||
|
|
|
|||
Loading…
Reference in a new issue