Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix volume attachment with dstack backend #2175

Merged
merged 2 commits into from
Jan 6, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ async def _attach_volumes(
volume = volume_model_to_volume(volume_model)
try:
if (
job_provisioning_data.backend != volume.configuration.backend
job_provisioning_data.get_base_backend() != volume.configuration.backend
or job_provisioning_data.region != volume.configuration.region
):
continue
Expand Down
2 changes: 2 additions & 0 deletions src/dstack/_internal/server/services/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ def job_model_to_job_submission(job_model: JobModel) -> JobSubmission:
job_provisioning_data.instance_type.resources.description = (
job_provisioning_data.instance_type.resources.pretty_format()
)
# TODO do we really still need this magic? See https://github.com/dstackai/dstack/pull/1682
# i.e., replacing `jpd.backend` with `jpd.get_base_backend()` should give the same result
if (
job_provisioning_data.backend == BackendType.DSTACK
and job_provisioning_data.backend_data is not None
Expand Down
2 changes: 1 addition & 1 deletion src/dstack/_internal/server/services/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ def get_job_mount_point_volume(
"""
for volume in volumes:
if (
volume.configuration.backend != job_provisioning_data.backend
volume.configuration.backend != job_provisioning_data.get_base_backend()
or volume.configuration.region != job_provisioning_data.region
):
continue
Expand Down
Loading