autoscaler: make instance_type required, no silent skip in preflight
This commit is contained in:
parent
1a355429cb
commit
5092005e05
2 changed files with 4 additions and 4 deletions
|
|
@ -77,9 +77,6 @@ class EC2Runtime(RuntimeAdapter):
|
|||
silently on every failed launch attempt. Never raises; API failures are logged as
|
||||
warnings so a transient permissions issue does not prevent startup.
|
||||
"""
|
||||
if not self._instance_type:
|
||||
return
|
||||
|
||||
try:
|
||||
target_azs: set[str] = set()
|
||||
if self._subnet_ids:
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ in
|
|||
|
||||
instanceType = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
description = "EC2 instance type for nix builders. Used for preflight availability validation at startup.";
|
||||
};
|
||||
|
||||
|
|
@ -266,6 +265,10 @@ in
|
|||
was not found. Configure package explicitly.
|
||||
'';
|
||||
}
|
||||
{
|
||||
assertion = cfg.aws.instanceType != "";
|
||||
message = "services.nix-builder-autoscaler.aws.instanceType must be set.";
|
||||
}
|
||||
{
|
||||
assertion = cfg.aws.launchTemplateIdFile != null;
|
||||
message = "services.nix-builder-autoscaler.aws.launchTemplateIdFile must be set.";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue