Add sibling-container runtime manager and shell APIs#8
Merged
Conversation
Introduce a Bollard-backed runtime layer for workspace containers, expose runtime lifecycle/log/shell websocket endpoints, and route workspace command execution through runtime exec with persistent shell sessions.
- use ContainerStateStatusEnum enum match instead of as_str() - pass working_dir as Option<&str> directly to CreateExecOptions - add output_capacity field to StartExecOptions - convert body stream to hyper::Body via .into() for build_image
- add hyper workspace dependency - replace stream::once + into() with direct hyper::Body::from() - simplifies tar context body construction for Bollard build_image API
Import Body from hyper::body::Body instead of hyper::Body for hyper 1.x compatibility.
Replace hyper Body trait with concrete Full<Bytes> type for Bollard build_image compatibility with hyper 1.x ecosystem.
- Bump bollard 0.18 → 0.20.1 in workspace Cargo.toml - Drop now-unnecessary http-body-util and hyper workspace deps - Migrate docker_manager.rs to 0.20.1 API surface: - ContainerConfig<T> → ContainerCreateBody (bollard::models) - All option structs use query_parameters::*OptionsBuilder - StartContainerOptions<String> → StartContainerOptions (no generic) - StartExecOptions struct literal → None::<StartExecOptions> (default non-detach) - build_image body uses bollard::body_full(Bytes) instead of http_body_util::Full - BuildImageOptions struct literal → BuildImageOptionsBuilder - Remove platform field from CreateContainerOptions (dropped in 0.20)
- InspectContainerOptions and StartContainerOptions moved to bollard::query_parameters — update import paths - LogsOptionsBuilder::tail() now takes &str — borrow the String - BuildInfo::error field renamed to error_detail (ErrorDetail struct) — unwrap message from error_detail for human-readable error output
axum 0.8 changed Message::Text to wrap Utf8Bytes instead of String. Add .into() conversions at both send sites and remove the now-unused SinkExt import.
Add per-job preview URL registration endpoint and include preview_url/is_paused in job models. Introduce queue pause/resume semantics so paused queued jobs stay in queue but are not claimable until resumed, with resume re-enqueue behavior. Also improve runtime reliability by auto-recovering shell exec on missing/stopped containers and using a Docker client API version floor compatible with newer daemons. Update Otter runtime image to install modern Docker CLI/buildx/compose tooling from Docker's official apt repository.
Document preview URL registration, pause/resume queue controls, and updated execution flow including job callback contract and runtime shell behavior.
Update Cargo.lock to capture the current runtime dependency graph after Bollard upgrade work, and apply clippy/format-driven cleanups in runtime service and docker manager code paths.
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
otter-coreotter-serverTest plan
cargo fmtcargo clippy --workspace --all-targets --all-features(blocked locally by existing lockfile v4 toolchain mismatch)runtime_container_readyevent with preview URL