From a83d521dc2885c4813b0cca6f7aef6546d12c333 Mon Sep 17 00:00:00 2001 From: sanderegg <35365065+sanderegg@users.noreply.github.com> Date: Tue, 26 Aug 2025 11:56:25 +0200 Subject: [PATCH 1/3] the fix --- .../modules/cluster_scaling/_warm_buffer_machines_pool_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/autoscaling/src/simcore_service_autoscaling/modules/cluster_scaling/_warm_buffer_machines_pool_core.py b/services/autoscaling/src/simcore_service_autoscaling/modules/cluster_scaling/_warm_buffer_machines_pool_core.py index 79de4ccdc16..f8203fe8d23 100644 --- a/services/autoscaling/src/simcore_service_autoscaling/modules/cluster_scaling/_warm_buffer_machines_pool_core.py +++ b/services/autoscaling/src/simcore_service_autoscaling/modules/cluster_scaling/_warm_buffer_machines_pool_core.py @@ -314,7 +314,7 @@ async def _add_remove_buffer_instances( subnet_id=app_settings.AUTOSCALING_EC2_INSTANCES.EC2_INSTANCES_SUBNET_ID, iam_instance_profile=app_settings.AUTOSCALING_EC2_INSTANCES.EC2_INSTANCES_ATTACHED_IAM_PROFILE, ), - min_number_of_instances=num_to_start, + min_number_of_instances=1, # NOTE: we want at least 1 number_of_instances=num_to_start, max_total_number_of_instances=app_settings.AUTOSCALING_EC2_INSTANCES.EC2_INSTANCES_MAX_INSTANCES, ) From c39da4fb8a57530c70ef5c35d0ca9a3dbe466ad8 Mon Sep 17 00:00:00 2001 From: sanderegg <35365065+sanderegg@users.noreply.github.com> Date: Tue, 26 Aug 2025 11:56:25 +0200 Subject: [PATCH 2/3] the fix --- .../modules/cluster_scaling/_warm_buffer_machines_pool_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/autoscaling/src/simcore_service_autoscaling/modules/cluster_scaling/_warm_buffer_machines_pool_core.py b/services/autoscaling/src/simcore_service_autoscaling/modules/cluster_scaling/_warm_buffer_machines_pool_core.py index 79de4ccdc16..f8203fe8d23 100644 --- a/services/autoscaling/src/simcore_service_autoscaling/modules/cluster_scaling/_warm_buffer_machines_pool_core.py +++ b/services/autoscaling/src/simcore_service_autoscaling/modules/cluster_scaling/_warm_buffer_machines_pool_core.py @@ -314,7 +314,7 @@ async def _add_remove_buffer_instances( subnet_id=app_settings.AUTOSCALING_EC2_INSTANCES.EC2_INSTANCES_SUBNET_ID, iam_instance_profile=app_settings.AUTOSCALING_EC2_INSTANCES.EC2_INSTANCES_ATTACHED_IAM_PROFILE, ), - min_number_of_instances=num_to_start, + min_number_of_instances=1, # NOTE: we want at least 1 number_of_instances=num_to_start, max_total_number_of_instances=app_settings.AUTOSCALING_EC2_INSTANCES.EC2_INSTANCES_MAX_INSTANCES, ) From 919647af76275519be175082573d828be151780c Mon Sep 17 00:00:00 2001 From: sanderegg <35365065+sanderegg@users.noreply.github.com> Date: Tue, 26 Aug 2025 13:45:00 +0200 Subject: [PATCH 3/3] patch calls --- .../test_modules_cluster_scaling_warm_buffer_machine_core.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/autoscaling/tests/unit/test_modules_cluster_scaling_warm_buffer_machine_core.py b/services/autoscaling/tests/unit/test_modules_cluster_scaling_warm_buffer_machine_core.py index 14e56d509db..c1b2cface44 100644 --- a/services/autoscaling/tests/unit/test_modules_cluster_scaling_warm_buffer_machine_core.py +++ b/services/autoscaling/tests/unit/test_modules_cluster_scaling_warm_buffer_machine_core.py @@ -268,6 +268,7 @@ async def _assert_wait_for_ssm_command_to_finish() -> None: async def test_monitor_buffer_machines( + patch_ec2_client_launch_instances_min_number_of_instances: None, minimal_configuration: None, ec2_client: EC2Client, buffer_count: int, @@ -374,6 +375,7 @@ async def test_monitor_buffer_machines_terminates_supernumerary_instances( async def test_monitor_buffer_machines_terminates_instances_with_incorrect_pre_pulled_images( + patch_ec2_client_launch_instances_min_number_of_instances: None, minimal_configuration: None, ec2_client: EC2Client, buffer_count: int, @@ -457,6 +459,7 @@ def unneeded_instance_type( ], ) async def test_monitor_buffer_machines_terminates_unneeded_pool( + patch_ec2_client_launch_instances_min_number_of_instances: None, minimal_configuration: None, ec2_client: EC2Client, buffer_count: int,