Repository navigation
feat: change an AWS machine type within one architecture at runtime - #833
Conversation
…at runtime A machine change on AWS between catalog machines of the same CPU architecture is now an ordinary update instead of a setup rerun: the compute mutation already validates the new machine against the workloads and derives its profile, so the Frozen check accepts the new machine and profile together, and ComputeCluster::validate_update allows the pair. Any other machine change still needs setup, and the error now names the pool and both machines. This replaces the reverted #823 without re-deriving disk sizing in the compatibility check. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Comments Outside DiffThese findings could not be posted inline.
|
|
Addressed the second review: unchanged idle clusters keep their existing mutation behavior. Changed machine profiles now reuse materialize_selected_group, the same selection validation and disk/profile derivation used by the compute mutation. This also checks nested virtualization, without reimplementing catalog or disk rules. All 378 preflight tests pass, including invalid-profile and nested-virtualization regressions. @greptileai |
…ify-compute-updates
|
Addressed the outside-diff machine-change coverage finding in 392055c. The regression passes actual ComputeClusterMutation output for a container requesting 40Gi through PreflightRunner compatibility and StackExecutor planning. It verifies that an AWS t4g.micro → t4g.small change preserves the derived workload disk profile, passes compatibility without a frozen-change override, and plans exactly one update with no create/delete. An m7i.large change fails compatibility with the architecture explanation and fails planning with RESOURCE_CONFIG_INVALID. Validation: |
Summary
On AWS, a capacity group can move to another catalog machine of the same CPU architecture (for example
t4g.small→t4g.medium) as an ordinary deployment update. Any other machine change still needs setup.This reverts #823 and keeps only its small core:
instance_catalog::is_same_architecture_aws_machine(old, new).profilewith it. The compute mutation has already validated the selected machine against the workloads (validate_compute_pool_selection) and derived the profile from it, so the check does not re-derive or compare disk sizing. feat(preflights): allow same-architecture AWS machine changes at runtime #823'sInstalledDisk/requested_disk/profile_matches_catalog(~130 lines that duplicated the mutation's rules) are gone.ComputeCluster::validate_updateallows the same pair, so the executor plans the update and the runtime controller rolls the fleet.Frozen resource 'compute' was modified (capacity group 'general' changes machine from 't4g.medium' to 'm7i.large', but without setup a machine can change only to an AWS machine of the same CPU architecture)….What remains: counts, bounds and same-architecture AWS machine changes are runtime-managed; pools, placement, networking, cross-architecture, unknown machines, and GCP/Azure machine changes need setup. Limitation accepted: a disk size that changes together with the machine follows the mutation's output instead of being checked separately.
Validation
Real AWS (us-east-2), a running container deployment on
t4g.small, using these preflights in the manager:t4g.medium: the update passed preflights, the controller wrote a new launch template version, scaled out, drained and terminated the old machine. The fleet was ont4g.mediumafter ~3 minutes, and the app's/healthanswered 200 on all 41 probes (every 5 s) during the roll.m7i.large(x86_64): the update was refused before any infra change with the message above.t4g.nope: the update failed in preflights withUnknown aws machine 't4g.nope' for pool 'general'.t4g.medium: the deployment recovered.Tests:
cargo test -p alien-preflights -p alien-core(new: same-arch change passes, cross-arch / unknown / GCP need setup with the named message, a nested-virtualization change stays frozen;validate_updateallows only the same-arch pair). Generated schema descriptions updated withpnpm -C packages/core generate.🤖 Generated with Claude Code