From 2a2e53a3423d85f87a4ef6fed86a6d8111cca31e Mon Sep 17 00:00:00 2001 From: Vichy Meas Date: Tue, 2 Jun 2026 14:00:27 -0700 Subject: [PATCH] fix(integ): replace AllowedTypes m5.* with ExcludedTypes for region compatibility m5 instances are not available in newer regions (TPE, BKK, KUL, QRO). Instead of specifying allowed types (which limits to specific families), use ExcludedTypes with a deny list (t2.*, t3.*) so LEGS can select from any available instance type in the region. This makes the integration test region-agnostic while still exercising the InstanceRequirements configuration path. --- .../combination/test_function_with_capacity_provider.py | 7 +++---- .../templates/combination/function_lmi_default.yaml | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/integration/combination/test_function_with_capacity_provider.py b/integration/combination/test_function_with_capacity_provider.py index 203bbac2a..e244087f2 100644 --- a/integration/combination/test_function_with_capacity_provider.py +++ b/integration/combination/test_function_with_capacity_provider.py @@ -150,10 +150,9 @@ def test_function_with_capacity_provider_default_role(self): instance_requirements.get("Architectures", []), "AdvancedCapacityProvider should have x86_64 architecture", ) - allowed_types = instance_requirements.get("AllowedInstanceTypes", []) - self.assertIn("m5.large", allowed_types, "AdvancedCapacityProvider should allow m5.large") - self.assertIn("m5.xlarge", allowed_types, "AdvancedCapacityProvider should allow m5.xlarge") - self.assertIn("m5.2xlarge", allowed_types, "AdvancedCapacityProvider should allow m5.2xlarge") + excluded_types = instance_requirements.get("ExcludedInstanceTypes", []) + self.assertIn("m6g.xlarge", excluded_types, "AdvancedCapacityProvider should exclude m6g.xlarge") + self.assertIn("m7a.2xlarge", excluded_types, "AdvancedCapacityProvider should exclude m7a.2xlarge") scaling_config = advanced_cp_config.get("CapacityProviderScalingConfig") self.assertIsNotNone(scaling_config, "AdvancedCapacityProvider should have scaling configuration") diff --git a/integration/resources/templates/combination/function_lmi_default.yaml b/integration/resources/templates/combination/function_lmi_default.yaml index c9eb8ebe6..db8bc8412 100644 --- a/integration/resources/templates/combination/function_lmi_default.yaml +++ b/integration/resources/templates/combination/function_lmi_default.yaml @@ -36,10 +36,9 @@ Resources: InstanceRequirements: Architectures: - x86_64 - AllowedTypes: - - m5.large - - m5.xlarge - - m5.2xlarge + ExcludedTypes: + - m6g.xlarge + - m7a.2xlarge ScalingConfig: MaxVCpuCount: 64 AverageCPUUtilization: 70