aboutsummaryrefslogtreecommitdiff
path: root/docs/dev/WindowsOnLinux.md
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-04-20 23:52:38 +0200
committerGitHub Enterprise <[email protected]>2026-04-20 23:52:38 +0200
commit27d72af24a8de9a81500e68a0874f1430297b3bc (patch)
tree33aed09055a4d38b4b3bc6513be7567d0e53d1f8 /docs/dev/WindowsOnLinux.md
parentRename logging::ToStringView to ToString for consistency (#993) (diff)
downloadzen-27d72af24a8de9a81500e68a0874f1430297b3bc.tar.xz
zen-27d72af24a8de9a81500e68a0874f1430297b3bc.zip
Zen CLI common server interface (#920)
Introduces a common `ZenServiceClient` RAII wrapper for zen CLI commands that interact with a zenserver instance. CLI operations (admin, builds, cache, exec, hub, info, projectstore, trace, ui, version, vfs, workspaces) automatically register sessions so they become visible in the server's session list, and forward log output to the server's session log endpoint. All session HTTP I/O (announce, remove, log batches) runs on a single background worker thread, so CLI startup and shutdown never block on server availability. ### Key changes - **`ZenServiceClient`** — new RAII class that wraps host resolution, HTTP client creation, and session lifecycle (register on connect, remove on exit). Replaces ad-hoc boilerplate across all command files that talk to a server, including the new `trace` subcommands (`start`, `stop`, `status`). - **Async session I/O** — `SessionsServiceClient` now owns a single worker thread and command queue. `Announce()`, `Remove()`, and `UpdateMetadata()` enqueue commands and return immediately. The worker creates one `HttpClient` with a 5-second total timeout, bounding any individual request. Eliminates main-thread stalls when the server is unreachable. - **Session log forwarding** — `SessionLogSink` is a thin enqueuer that posts log messages to the same worker queue (no separate thread or HTTP client). Log levels are serialized as integers; the server-side ingest handles both string and integer formats for backwards compatibility, with bounds checking on integer values. - **Build & projectstore session registration** — Long-running `builds` and projectstore cache (oplog-download) connections register sessions too, making them visible alongside regular CLI command sessions. ### Cleanup - Extract `SetupCacheSession` helper on `StorageInstance` to reduce duplication. - Remove unused `HttpClient` reference in ui command.
Diffstat (limited to 'docs/dev/WindowsOnLinux.md')
0 files changed, 0 insertions, 0 deletions