remove c0re.preBuildAgentTemplates and agentBaseToplevel
This commit is contained in:
parent
4d85ec4c21
commit
8a7f254c74
1 changed files with 84 additions and 98 deletions
|
|
@ -1469,9 +1469,7 @@ let
|
|||
c0re.frontend = pkgs.coreutils;
|
||||
c0re.assets = pkgs.gnused;
|
||||
c0re.xdgIcons = pkgs.gnugrep;
|
||||
c0re.agentBaseToplevel = pkgs.findutils;
|
||||
c0re.hyperhiveRev = "abc123";
|
||||
c0re.preBuildAgentTemplates = true;
|
||||
c0re.modelPrices.sonnet = {
|
||||
input = 1.0;
|
||||
output = 2.0;
|
||||
|
|
@ -1501,10 +1499,8 @@ let
|
|||
&& path c.frontend == path pkgs.coreutils
|
||||
&& path c.assets == path pkgs.gnused
|
||||
&& path c.xdgIcons == path pkgs.gnugrep
|
||||
&& path c.agentBaseToplevel == path pkgs.findutils
|
||||
&& path c.servedFrontend == path pkgs.coreutils
|
||||
&& c.hyperhiveRev == "abc123"
|
||||
&& c.preBuildAgentTemplates
|
||||
&& c.modelPrices.sonnet.cache_write == 4.0
|
||||
&& c.agentCpuQuota == "300%"
|
||||
&& c.agentMemoryMax == "8G"
|
||||
|
|
@ -1519,9 +1515,7 @@ let
|
|||
"frontend"
|
||||
"assets"
|
||||
"xdgIcons"
|
||||
"agentBaseToplevel"
|
||||
"hyperhiveRev"
|
||||
"preBuildAgentTemplates"
|
||||
"modelPrices"
|
||||
"agentCpuQuota"
|
||||
"agentMemoryMax"
|
||||
|
|
@ -1539,6 +1533,48 @@ let
|
|||
&& serve.build_slots == 3
|
||||
&& old.users.groups.hive-admin.members == [ "alice" ];
|
||||
}
|
||||
{
|
||||
# Under either namespace, each removed pre-fetch option fails evaluation naming
|
||||
# itself and the swarm cache. The controls are a host that sets none, and
|
||||
# a host that sets a moved sibling option (`buildSlots`), which warns
|
||||
# but does not fail.
|
||||
name = "a definition of a removed agent-base pre-fetch option fails evaluation, naming the option and the swarm cache";
|
||||
ok =
|
||||
let
|
||||
refused =
|
||||
m: path:
|
||||
lib.any (
|
||||
a:
|
||||
!a.assertion
|
||||
&& lib.hasInfix "services.hyperhive.${path}" a.message
|
||||
&& lib.hasInfix "swarm cache" a.message
|
||||
) m.assertions;
|
||||
setting = lib.listToAttrs (
|
||||
lib.concatMap
|
||||
(
|
||||
ns:
|
||||
lib.mapAttrsToList
|
||||
(name: value: {
|
||||
name = "${ns}.${name}";
|
||||
value = hiveWithController (lib.setAttrByPath (lib.splitString "." "${ns}.${name}") value);
|
||||
})
|
||||
{
|
||||
preBuildAgentTemplates = true;
|
||||
agentBaseToplevel = pkgs.findutils;
|
||||
}
|
||||
)
|
||||
[
|
||||
"c0re"
|
||||
"deploy.hive-controller"
|
||||
]
|
||||
);
|
||||
sibling = hiveWithController { c0re.buildSlots = 3; };
|
||||
in
|
||||
lib.length (lib.attrNames setting) == 4
|
||||
&& lib.all (path: refused setting.${path} path) (lib.attrNames setting)
|
||||
&& !(lib.any (path: refused bare path) (lib.attrNames setting))
|
||||
&& !(lib.any (path: refused sibling path) (lib.attrNames setting));
|
||||
}
|
||||
{
|
||||
# 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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue