Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
olethanh committed Jan 6, 2025
1 parent 175f49b commit bcdf0c0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/aleph/vm/controllers/firecracker/executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from aiohttp import ClientResponseError
from aleph_message.models import ExecutableContent, ItemHash
from aleph_message.models.execution.environment import MachineResources
from aleph_message.models.execution.volume import PersistentVolume

from aleph.vm.conf import settings
from aleph.vm.controllers.configuration import (
Expand Down Expand Up @@ -115,10 +116,12 @@ async def download_volumes(self):
volumes = []
# TODO: Download in parallel
for i, volume in enumerate(self.message_content.volumes):
if not volume.name:
volume.name = f"unamed_volume_{i}"
if not volume.mount:
volume.mount = f"/mnt/{volume.name}"
# only persistant volume has name and mount
if isinstance(volume, PersistentVolume):
if not volume.name:
volume.name = f"unamed_volume_{i}"
if not volume.mount:
volume.mount = f"/mnt/{volume.name}"
volumes.append(
HostVolume(
mount=volume.mount,
Expand Down

0 comments on commit bcdf0c0

Please sign in to comment.