Skip to content

Commit

Permalink
Fix instance_types not respected for pool instances (#2205)
Browse files Browse the repository at this point in the history
  • Loading branch information
r4victor authored Jan 21, 2025
1 parent 78ebd20 commit 05e9cb1
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/dstack/_internal/server/services/pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
from dstack._internal.core.models.users import GlobalRole
from dstack._internal.core.models.volumes import Volume
from dstack._internal.core.services.profiles import get_termination
from dstack._internal.server import settings
from dstack._internal.server.models import (
FleetModel,
InstanceModel,
Expand Down Expand Up @@ -463,17 +462,12 @@ def filter_pool_instances(
continue
if status is not None and instance.status != status:
continue

# TODO: remove on prod
if settings.LOCAL_BACKEND_ENABLED and instance.backend == BackendType.LOCAL:
instances.append(instance)
continue

if backend_types is not None and instance.backend not in backend_types:
continue

if regions is not None and instance.region not in regions:
continue
if profile.instance_types is not None and instance.name not in profile.instance_types:
continue

jpd = get_instance_provisioning_data(instance)
if (
Expand Down

0 comments on commit 05e9cb1

Please sign in to comment.