Skip to content

Conversation

@tnm
Copy link
Contributor

@tnm tnm commented Nov 21, 2025

Summary

  • Implement upload_file() and download_file() methods for Daytona provider
  • Fix timeout issue in sandbox creation by passing timeout_seconds from config to SDK
  • Add comprehensive integration test for file operations

Changes

sandboxes/providers/daytona.py

  • ✅ Added upload_file() method using Daytona SDK's fs.upload_file()
  • ✅ Added download_file() method using Daytona SDK's fs.download_file()
  • ✅ Added security path validation to prevent path traversal attacks
  • ✅ Fixed timeout: now passes config.timeout_seconds to SDK (defaults to 120s instead of 60s)

tests/test_integration_daytona.py

  • ✅ Added test_file_upload_download() integration test
  • ✅ Tests upload, verification, and download with content integrity check
  • ✅ Uses 180s timeout to avoid transient API issues

Testing

  • ✅ Integration test passes (verified with real Daytona sandboxes)
  • ✅ Manual testing confirms all operations work correctly
  • ✅ Linting passes

Context

This brings Daytona provider to feature parity with E2B, Hopx, and Cloudflare providers, all of which support file operations. The Daytona SDK already has the necessary methods - this PR just exposes them through our unified interface.

tnm added 2 commits November 21, 2025 15:50
- Implement upload_file() and download_file() methods
- Use Daytona SDK's fs.upload_file() and fs.download_file()
- Add path validation for security (prevent path traversal)
- Fix timeout issue: pass config.timeout_seconds to SDK (default 120s)
- Add comprehensive integration test
- Verified with manual testing

Fixes timeout issues where Daytona SDK's 60s default was too short
@tnm tnm merged commit 51ce518 into main Nov 21, 2025
4 checks passed
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.

2 participants