refactor(registry): simplify stable uid validation message
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
concatStringsSep
|
||||
foldl'
|
||||
groupBy
|
||||
unique
|
||||
@@ -25,8 +24,6 @@ let
|
||||
acc
|
||||
) [ ] (builtins.attrNames byUid);
|
||||
|
||||
renderUidConflict = conflict:
|
||||
"${toString conflict.uid} is assigned to ${concatStringsSep ", " conflict.serviceNames}";
|
||||
in
|
||||
{
|
||||
# Next stable UID: 20003
|
||||
@@ -41,9 +38,7 @@ in
|
||||
[
|
||||
{
|
||||
assertion = uidConflicts == [ ];
|
||||
message = ''
|
||||
Duplicate stable UID allocation(s): ${concatStringsSep "\n" (map renderUidConflict uidConflicts)}
|
||||
'';
|
||||
message = "Stable UID allocations must be unique.";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user