upgrade: per-rollout JSONL event log for tail -f #35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_add_event_log"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Operators can now watch a live rollout via
ssh herodev tail -f /var/lib/hero_codescalers/event-logs/<upgrade_id>.jsonlinstead of polling the RPC. One append-only JSONL file per upgrade, no web/UI dependency.Changes
EVENT_LOG_ROOT = /var/lib/hero_codescalers/event-logs/.emit_event(upgrade_id, json)helper. Singlewrite_allof{...}\nkeeps each line atomic under POSIXO_APPEND(< PIPE_BUF), so concurrent cell writers can't interleave bytes. Best-effort: I/O failures onlytracing::warn!.upgrade.start,snapshot.ready,snapshot.failed,cell.start,cell.finish(covers enqueue_fail, grace, poll-budget, terminal phase),upgrade.cancel,upgrade.terminal(with status + succeeded/failed/total counts).fail_cellnow takesusername+serviceso it can self-emit thecell.finishrecord.Test Results
91-cell rollout
upg_1779708686825_c04b296cproduced 185 lines: 1x upgrade.start, 1x snapshot.ready, 91x cell.start, 91x cell.finish (all succeeded), 1x upgrade.terminal. Every line parses as JSON. Earlier 13-cell run caught an atomic-write bug (concurrentwriteln!issued two syscalls per line, causing rare two-records-per-line interleaving), fixed by formatting{json}\nthen a singlewrite_all, retested clean.