Host phase 1a follow-up: pass ContainerTarget instead of container ids
Functions that took a bare container id and built `ContainerTarget::docker(id)` internally now take a target, and their callers resolve one from the project (`ContainerTarget::for_project`) or carry the one they already hold. Long-lived holders (auth bridge poller, browser-view proxy/session, file viewer commands) store the target. Collapses the string/target wrapper pairs: `detect::detect` now takes a target (`detect_in` removed) and `tunnel_connection_with_prelude` takes a target (`tunnel_into_with_prelude` removed). No behaviour change. Two temporary Docker constructions remain on the container-start path, marked "phase 1b": the auth bridge start in `start_project_container_locked` and `marketplace::spawn_project_sync`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3ec100e06c
commit
83d63e756d
19 files changed
+143
-169
No files matched your search
@@ -172,7 +172,7 @@ fn saved_file(outcome: WriteOutcome, bytes: &[u8]) -> Result<SavedFile, String>
|
||||
}
|
||||
|
||||
pub async fn write_file(
|
||||
container_id: &str,
|
||||
container: &ContainerTarget,
|
||||
exec_manager: &ExecSessionManager,
|
||||
target: &str,
|
||||
bytes: &[u8],
|
||||
@@ -180,9 +180,8 @@ pub async fn write_file(
|
||||
) -> Result<SavedFile, String> {
|
||||
check_write_input(bytes.len(), base_hash)?;
|
||||
let tmp_name = format!("triple-c-viewer-{}", uuid::Uuid::new_v4().simple());
|
||||
let container = ContainerTarget::docker(container_id);
|
||||
let tmp_path = exec_manager
|
||||
.write_file_to_container(&container, &tmp_name, bytes)
|
||||
.write_file_to_container(container, &tmp_name, bytes)
|
||||
.await?;
|
||||
let cmd = write_command(target, &tmp_path, base_hash);
|
||||
let (stdout, stderr, code) = container
|
||||
|
||||
Reference in new issue
Block a user