Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ build/
.DS_Store
.fleet
.env
.aider*
1 change: 1 addition & 0 deletions src/dstack/_internal/core/backends/aws/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ def terminate_gateway(
"Failed to terminate all gateway %s resources. backend_data parsing error.",
configuration.instance_name,
)
return

elb_client = self.session.client("elbv2", region_name=configuration.region)

Expand Down
2 changes: 1 addition & 1 deletion src/dstack/_internal/core/backends/azure/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def get_resource_group_network_subnet_or_error(
except Exception:
raise ComputeError(
"Network specified in incorrect format."
" Supported format for `vps_ids` values: 'networkResourceGroupName/networkName'"
" Supported format for `vpc_ids` values: 'networkResourceGroupName/networkName'"
)
elif resource_group is not None:
network_name = azure_utils.get_default_network_name(resource_group, location)
Expand Down
2 changes: 1 addition & 1 deletion src/dstack/_internal/core/backends/gcp/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ def delete_volume(self, volume: Volume):
operation = self.disk_client.delete(
project=self.config.project_id,
zone=get_or_error(volume.provisioning_data).availability_zone,
disk=volume.name,
disk=volume.volume_id,
)
gcp_resources.wait_for_extended_operation(operation, "persistent disk deletion")
except google.api_core.exceptions.NotFound:
Expand Down
2 changes: 1 addition & 1 deletion src/dstack/_internal/server/security/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async def __call__(
project = await get_project_model_by_name(session=session, project_name=project_name)
if project is None:
raise error_forbidden()
if user.global_role in GlobalRole.ADMIN:
if user.global_role == GlobalRole.ADMIN:
return user, project
project_role = get_user_project_role(user=user, project=project)
if project_role in [ProjectRole.ADMIN, ProjectRole.MANAGER]:
Expand Down
6 changes: 3 additions & 3 deletions src/dstack/_internal/server/services/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
# By default, PyYAML chooses the style of a collection depending on whether it has nested collections.
# If a collection has nested collections, it will be assigned the block style. Otherwise it will have the flow style.
#
# We want mapping to always be display in block-style but lists without nested objects in flow-style.
# We want mapping to always be displayed in block-style but lists without nested objects in flow-style.
# So we define a custom representeter


Expand Down Expand Up @@ -340,15 +340,15 @@ class KubernetesConfig(CoreModel):
kubeconfig: Annotated[KubeconfigConfig, Field(description="The kubeconfig configuration")]
networking: Annotated[
Optional[KubernetesNetworkingConfig], Field(description="The networking configuration")
]
] = None


class KubernetesAPIConfig(CoreModel):
type: Annotated[Literal["kubernetes"], Field(description="The type of backend")] = "kubernetes"
kubeconfig: Annotated[KubeconfigAPIConfig, Field(description="The kubeconfig configuration")]
networking: Annotated[
Optional[KubernetesNetworkingConfig], Field(description="The networking configuration")
]
] = None


class LambdaConfig(CoreModel):
Expand Down