force each container's unit configs in the checks about it
This commit is contained in:
parent
4cdf807afc
commit
549c198449
6 changed files with 46 additions and 16 deletions
|
|
@ -21,6 +21,7 @@ let
|
|||
hive
|
||||
hiveWithController
|
||||
runGroup
|
||||
forceServiceConfigs
|
||||
baoNames
|
||||
baoStream
|
||||
bridgePorts
|
||||
|
|
@ -84,21 +85,6 @@ let
|
|||
deploy.review-classifier.enable = true;
|
||||
};
|
||||
|
||||
# A priority collision is a property of the *option*, not
|
||||
# of the merged value's interior — nix throws the moment the value is
|
||||
# demanded at all, so `seq`-ing each `serviceConfig` value to WHNF is
|
||||
# both necessary and sufficient. `deepSeq` over-specifies this: it keeps
|
||||
# walking *into* the resulting value after the merge already succeeded,
|
||||
# and a package/derivation-shaped value's `override`/`overrideAttrs`
|
||||
# self-reference sends it into nixpkgs' fixpoint machinery and blows the
|
||||
# stack (measured — this is not a hypothetical).
|
||||
forceCiServiceConfigs =
|
||||
let
|
||||
svcs = withCi.containers.swarm-ci-runner.config.systemd.services;
|
||||
vals = lib.concatMap (s: builtins.attrValues (s.serviceConfig or { })) (builtins.attrValues svcs);
|
||||
in
|
||||
builtins.foldl' (acc: v: builtins.seq v acc) true vals;
|
||||
|
||||
# The host fetches that restart their consumer when the store's value
|
||||
# changes (../host-modules/lib/refresh-consumer.nix), each on a fixture
|
||||
# that renders it.
|
||||
|
|
@ -692,7 +678,7 @@ let
|
|||
# instantiates a host with `containers.swarm-ci-runner` actually enabled, so
|
||||
# the collision only surfaces on operator deploy, not in CI.
|
||||
name = "the CI container's unit definitions merge without a priority collision";
|
||||
ok = forceCiServiceConfigs;
|
||||
ok = forceServiceConfigs withCi.containers.swarm-ci-runner.config;
|
||||
}
|
||||
{
|
||||
# It spends money on an operator's key, so no host runs it by default.
|
||||
|
|
|
|||
Loading…
Reference in a new issue