Live Service Tracking
Layer 6. Services. Services
shc install follows the operation created by shcd and displays per-service
progress. shc update and shc uninstall also use shcd; an unreachable
daemon refuses these verbs with X503738DMNREQ before deployment work.
Architecture
Section titled “Architecture”flowchart TB CLI["shc install"] --> API["shcd install handler"] API --> OP["Operation id"] API --> RUN["RunInstallWithObserver"] RUN --> UP["Runtime up with progress polling"] UP --> OBS["StepObserver"] OBS --> SSE["Operation SSE stream"] OP --> CLIENT["CLI follows operation"] SSE --> CLIENTThe handler in ce modules/app/router.go creates the operation, then
RunInstallWithObserver in install_async.go passes its observer into
ExecuteCompose. The client follows
/api/method/shc.operation.stream/{operation_id} through
commands/operation_sse.go.
Runtime observations
Section titled “Runtime observations”ComposeUpWithProgress in modules/app/compose_progress.go polls runtime
project state while the blocking up operation runs. Its default interval
is 500 ms. core/runtimecmd selects the runtime command and parses its
output; runtimes without that driver use the project executor.
RollupServices converts the observations into RawContainer values and
calls DeriveDeploymentServices. Each emitted operations.ServiceInfo
keeps status and health separate, with current and desired replica counts.
See status states.
A created container observed during this active converge reads starting.
A service absent from a poll keeps its prior progress state. The completed
count includes services whose status is running or complete and whose
health has settled; starting and unhealthy health keep them unfinished.
Completion and failures
Section titled “Completion and failures”Polling is best effort. A command or parse error skips that observation; the blocking up result decides whether the operation succeeded. The poller stops before the final observation is emitted, so it cannot overwrite the terminal frame.
If the final observation is unavailable, FallbackFinal emits
running with health none on success, or failed on error. That frame
reports the operation result without claiming an observed health check.
Display and reconnection
Section titled “Display and reconnection”commands/operation_live.go renders progress from the operation frames.
commands/operation_sse.go remembers the last sequence and reconnects with
Last-Event-Id after an interrupted stream, within its resume budget.
A terminal complete or error frame ends the follow.
This progress stream is separate from the tenant event stream described in event lifecycle.