Skip to content

Commit 0dcad8e

Browse files
committed
added missing calls
1 parent 96af1b7 commit 0dcad8e

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

services/autoscaling/src/simcore_service_autoscaling/modules/cluster_scaling/_provider_dynamic.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from aws_library.ec2 import EC2InstanceData, EC2Tags, Resources
2+
from aws_library.ec2._models import EC2InstanceType
23
from fastapi import FastAPI
34
from models_library.docker import DockerLabelKey
45
from models_library.generated_models.docker_rest_api import Node, Task
@@ -104,3 +105,19 @@ async def try_retire_nodes(self, app: FastAPI) -> None:
104105
assert self # nosec
105106
assert app # nosec
106107
# nothing to do here
108+
109+
def add_instance_generic_resources(
110+
self, app: FastAPI, instance: EC2InstanceData
111+
) -> None:
112+
assert self # nosec
113+
assert app # nosec
114+
assert instance # nosec
115+
# nothing to do at the moment
116+
117+
def add_instance_type_generic_resource(
118+
self, app: FastAPI, instance_type: EC2InstanceType
119+
) -> None:
120+
assert self # nosec
121+
assert app # nosec
122+
assert instance_type # nosec
123+
# nothing to do at the moment

services/autoscaling/src/simcore_service_autoscaling/utils/cluster_scaling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def find_selected_instance_type_for_task(
109109
selected_instance = filtered_instances[0]
110110

111111
# check that the assigned resources and the machine resource fit
112-
if task_required_resources > selected_instance.resources:
112+
if not (task_required_resources <= selected_instance.resources):
113113
raise TaskRequirementsAboveRequiredEC2InstanceTypeError(
114114
task=task,
115115
instance_type=selected_instance,

0 commit comments

Comments
 (0)