Skip to content

Commit 23cb72e

Browse files
authored
[Internal]: Drop hardcoded regions from the backend template (#2734)
Do not suggest hardcoding regions since it is not necessary for most backends and can mislead contributors.
1 parent e641f11 commit 23cb72e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/dstack/_internal/core/backends/template/configurator.py.jinja

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ from dstack._internal.core.models.backends.base import (
1919
BackendType,
2020
)
2121

22-
# TODO: Add all supported regions and default regions
23-
REGIONS = []
24-
2522

2623
class {{ backend_name }}Configurator(Configurator):
2724
TYPE = BackendType.{{ backend_name|upper }}
@@ -31,13 +28,11 @@ class {{ backend_name }}Configurator(Configurator):
3128
self, config: {{ backend_name }}BackendConfigWithCreds, default_creds_enabled: bool
3229
):
3330
self._validate_creds(config.creds)
34-
# TODO: Validate additional config parameters if any
31+
# TODO: If possible, validate config.regions and any other config parameters
3532

3633
def create_backend(
3734
self, project_name: str, config: {{ backend_name }}BackendConfigWithCreds
3835
) -> BackendRecord:
39-
if config.regions is None:
40-
config.regions = REGIONS
4136
return BackendRecord(
4237
config={{ backend_name }}StoredConfig(
4338
**{{ backend_name }}BackendConfig.__response__.parse_obj(config).dict()

0 commit comments

Comments
 (0)