Watch
0
0
Fork
You've already forked hyperhive
0

keep the mirror hint off forge errors, forward the hyperhive mirror from any controller host

This commit is contained in:
atlas 2026-11-09 13:07:41 +01:00
commit 52cdfe84a0

View file

@ -1410,19 +1410,20 @@ let
# forge has none, so the controller seeds a mirror of it: by default,
# with another upstream when the option says so, and not at all when it
# is null (controllerWithMirrors) or without the controller (forgeOnly).
name = "a forge beside the controller mirrors hyperhive/hyperhive unless told not to";
# controllerAlone has the forge on another host and still gets the default.
name = "the controller mirrors hyperhive/hyperhive on its forge unless told not to";
ok =
let
mirrorsOf =
m: builtins.fromJSON m.systemd.services.swarm-controller.environment.SWARM_CONTROLLER_FORGE_MIRRORS;
hyperhiveOf = m: lib.filter (e: e.dest == "hyperhive/hyperhive") (mirrorsOf m);
in
hyperhiveOf forgeWithController == [
{
defaultHyperhive = {
upstream = "https://forge.darkest.space/hyperhive/hyperhive";
dest = "hyperhive/hyperhive";
}
]
};
in
hyperhiveOf forgeWithController == [ defaultHyperhive ]
&& hyperhiveOf controllerAlone == [ defaultHyperhive ]
&& map (e: e.upstream) (hyperhiveOf controllerWithSelfActions) == [ hyperhiveElsewhere ]
&& hyperhiveOf controllerWithMirrors == [ ]
&& forgeOnly.services.hyperhive.deploy.forgejo.hyperhiveUpstream == null;