Skip to content

Commit 2d4589a

Browse files
committed
Add feature flag DSTACK_FF_RUNPOD_CLUSTER_OFFERS_ENABLED
1 parent 7ee2643 commit 2d4589a

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/dstack/_internal/core/backends/base/offers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
)
1616
from dstack._internal.core.models.resources import DEFAULT_DISK, CPUSpec, Memory, Range
1717
from dstack._internal.core.models.runs import Requirements
18+
from dstack._internal.settings import FeatureFlags
1819
from dstack._internal.utils.common import get_or_error
1920

2021
# Offers not supported by all dstack versions are hidden behind one or more flags.
@@ -25,9 +26,11 @@
2526
"gcp-a4",
2627
"gcp-g4-preview",
2728
"gcp-dws-calendar-mode",
28-
"runpod-cluster",
2929
]
3030

31+
if FeatureFlags.RUNPOD_CLUSTER_OFFERS_ENABLED:
32+
SUPPORTED_GPUHUNT_FLAGS.append("runpod-cluster")
33+
3134

3235
def get_catalog_offers(
3336
backend: BackendType,

src/dstack/_internal/core/backends/runpod/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class RunpodApiClientError(BackendError):
1616

1717
def __init__(self, errors: List[Dict]):
1818
self.errors = errors
19-
return super().__init__(errors)
19+
super().__init__(errors)
2020

2121

2222
class RunpodApiClient:

src/dstack/_internal/settings.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@ class FeatureFlags:
3333
large features. This class may be empty if there are no such features in
3434
development. Feature flags are environment variables of the form DSTACK_FF_*
3535
"""
36+
37+
RUNPOD_CLUSTER_OFFERS_ENABLED = (
38+
os.getenv("DSTACK_FF_RUNPOD_CLUSTER_OFFERS_ENABLED") is not None
39+
)

0 commit comments

Comments
 (0)