Skip to content

Conversation

@vedranjukic
Copy link
Member

Description

Volume subpath adds support for multiple subpaths from the same volume.

Documentation

  • This change requires a documentation update
  • I have made corresponding changes to the documentation

@lbrecic lbrecic self-requested a review November 13, 2025 14:49
@Tpuljak Tpuljak requested a review from Copilot November 19, 2025 12:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for mounting specific subpaths within S3-backed volumes, enabling isolation of data and multi-tenancy use cases. When a subpath is specified, only that S3 prefix is accessible in the sandbox; otherwise, the entire volume is mounted.

  • Adds optional subpath field to volume mount configurations across all SDKs
  • Implements subpath mounting logic in the Docker client using mount-s3's --prefix flag
  • Provides example code demonstrating subpath usage for data isolation

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
libs/sdk-typescript/src/Volume.ts Updated VolumeService documentation to describe subpath functionality
libs/sdk-python/src/daytona/common/volume.py Added docstring documenting the subpath attribute for VolumeMount
libs/runner-api-client/src/models/dto-volume-dto.ts Added subpath field to VolumeDTO TypeScript interface
libs/api-client/src/models/sandbox-volume.ts Added subpath field with documentation to SandboxVolume interface
libs/api-client-python/daytona_api_client/models/sandbox_volume.py Added subpath field to Python API client model
libs/api-client-python-async/daytona_api_client_async/models/sandbox_volume.py Added subpath field to async Python API client model
libs/api-client-go/model_sandbox_volume.go Implemented subpath field with getter/setter methods in Go client
libs/api-client-go/api/openapi.yaml Added subpath field and examples to OpenAPI specification
examples/typescript/volumes/index.ts Added example demonstrating subpath mounting for multi-tenancy
examples/python/volumes/volume.py Added Python example showing subpath usage
examples/python/volumes/_async/volume.py Added async Python example for subpath mounting
apps/runner/pkg/docker/volumes_mountpaths.go Core implementation: generates unique mount points per volume+subpath and passes --prefix to mount-s3
apps/runner/pkg/api/dto/volume.go Added subpath field to runner API DTO
apps/runner/pkg/api/docs/swagger.yaml Updated Swagger documentation with subpath field
apps/runner/pkg/api/docs/swagger.json Updated JSON Swagger spec with subpath field
apps/runner/pkg/api/docs/docs.go Updated generated Go docs with subpath field
apps/api/src/sandbox/runner-adapter/runnerAdapter.legacy.ts Passes subpath from sandbox volumes to runner
apps/api/src/sandbox/dto/sandbox.dto.ts Added subpath field with API documentation to SandboxVolume DTO
.devcontainer/Dockerfile Installs mount-s3 1.20.0 to support the --prefix flag

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@Tpuljak Tpuljak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding the subpath example to https://www.daytona.io/docs/en/volumes/ as well

Signed-off-by: Vedran Jukic <[email protected]>
Signed-off-by: Vedran <[email protected]>
@vedranjukic
Copy link
Member Author

Subpath example is already included for both python and ts

Comment on lines +17 to +20
RUN wget https://s3.amazonaws.com/mountpoint-s3-release/1.20.0/x86_64/mount-s3-1.20.0-x86_64.deb \
&& apt install -y ./mount-s3-1.20.0-x86_64.deb \
&& rm -f mount-s3-1.20.0-x86_64.deb

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails on arm arch so something like this should do it:

Suggested change
RUN wget https://s3.amazonaws.com/mountpoint-s3-release/1.20.0/x86_64/mount-s3-1.20.0-x86_64.deb \
&& apt install -y ./mount-s3-1.20.0-x86_64.deb \
&& rm -f mount-s3-1.20.0-x86_64.deb
RUN apt update && export DEBIAN_FRONTEND=noninteractive \
&& apt -y install --no-install-recommends fuse libfuse2 \
&& MOUNT_S3_ARCH=$([ "$TARGETARCH" = "amd64" ] && echo "x86_64" || echo "arm64") \
&& wget [https://s3.amazonaws.com/mountpoint-s3-release/1.20.0/${MOUNT_S3_ARCH}/mount-s3-1.20.0-${MOUNT_S3_ARCH}.deb](https://s3.amazonaws.com/mountpoint-s3-release/1.20.0/$%7BMOUNT_S3_ARCH%7D/mount-s3-1.20.0-$%7BMOUNT_S3_ARCH%7D.deb) \
&& apt install -y ./mount-s3-1.20.0-${MOUNT_S3_ARCH}.deb \
&& rm -f mount-s3-1.20.0-${MOUNT_S3_ARCH}.deb```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants