fix(daytona): bulk upload, config bridge, silent disk cap (#7362)#7538
Merged
Conversation
FileSyncManager now accepts an optional bulk_upload_fn callback. When provided, all changed files are uploaded in one call instead of iterating one-by-one with individual HTTP POSTs. DaytonaEnvironment wires this to sandbox.fs.upload_files() which batches everything into a single multipart POST — ~580 files goes from ~5 min to <2s on init. Parent directories are pre-created in one mkdir -p call. Fixes #7362 (item 1).
Add terminal.container_cpu, container_memory, container_disk, and container_persistent to the _config_to_env_sync dict so that `hermes config set terminal.container_memory 8192` correctly writes TERMINAL_CONTAINER_MEMORY=8192 to ~/.hermes/.env. Previously these YAML keys had no effect because terminal_tool.py reads only env vars and the bridge was missing these mappings. Fixes #7362 (item 2).
warnings.warn() is suppressed/invisible when running as a gateway or agent. Switch to logger.warning() so the disk cap message actually appears in logs. Fixes #7362 (item 3).
Cover the three key behaviors: - bulk_upload_fn is called instead of per-file upload_fn - Fallback to upload_fn when bulk_upload_fn is None - Rollback on bulk upload failure retries all files
Contributor
|
This was referenced Apr 11, 2026
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Salvage of #7447 by @alt-glitch onto current main. Fixes #7362.
Changes
Bulk file upload (perf) —
FileSyncManagernow accepts an optionalbulk_upload_fncallback. When provided, all changed files upload in one call instead of per-file HTTP POSTs. Daytona wires this tosandbox.fs.upload_files()(single multipart POST). ~580 files: ~5 min → <2s on init. Backwards compatible — SSH/Modal/Docker continue using per-file uploads.Config-to-env bridge — Add
container_cpu,container_memory,container_disk,container_persistentto_config_to_env_syncdict sohermes config set terminal.container_memory 8192correctly writes to.env.Disk cap visibility — Replace
warnings.warn()withlogger.warning()for disk cap message.warnings.warn()is suppressed in agent/gateway mode.Tests
Contributor commits cherry-picked with authorship preserved.