From b7396b97c0641cde8804af4fb0a98c6dbebcf4e7 Mon Sep 17 00:00:00 2001 From: Julian Sommer <115516918+juliansommer@users.noreply.github.com> Date: Tue, 17 Feb 2026 13:30:44 +1000 Subject: [PATCH] fix: use available instance types in allocation test to prevent flaky CI The FilterUnavailableTypesAfterAllocation test picked a random 2-vCPU type from the raw instance type map, which could include memory-hungry types (e.g. r5a.large at 16 GB) that exceed host RAM on CI runners (~15.6 GB). Now picks from the already-filtered available types list. --- hive/daemon/daemon_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hive/daemon/daemon_test.go b/hive/daemon/daemon_test.go index d6917f917..c44e5fd14 100644 --- a/hive/daemon/daemon_test.go +++ b/hive/daemon/daemon_test.go @@ -683,10 +683,11 @@ func TestHandleEC2DescribeInstanceTypes(t *testing.T) { initialCount := len(initialOutput.InstanceTypes) t.Logf("Initial available instance types: %d", initialCount) - // Find an instance type that uses 2 vCPUs + // Find an instance type that uses 2 vCPUs from the available types + // (not the raw map, which may contain types that exceed host memory) var instanceType2CPU *ec2.InstanceTypeInfo var instanceTypeName string - for _, it := range daemon.resourceMgr.instanceTypes { + for _, it := range initialOutput.InstanceTypes { if it.VCpuInfo != nil && it.VCpuInfo.DefaultVCpus != nil && *it.VCpuInfo.DefaultVCpus == 2 { instanceType2CPU = it if it.InstanceType != nil {