mirror of
https://github.com/coder/coder.git
synced 2026-06-03 13:08:25 +00:00
ac51610332
Downgrades the "reporting script completed" log in `agentscripts` from ERROR to WARN. During agent reconnects, the `scriptCompleted` RPC can race with the connection teardown, producing a "connection closed" error. Since `slogtest` treats ERROR logs as test failures, this causes `TestAgent_ReconnectNoLifecycleReemit` to flake on macOS. A failed timing report is non-fatal — the script itself has already finished, and the agent will continue operating normally. WARN is the appropriate severity, consistent with the call site in `agent.go:createDevcontainer`. Also switches from `fmt.Sprintf` to structured `slog.Error` fields for consistency with the rest of the codebase. Fixes coder/internal#1410