Skip to content

K2GO-376 fix(conex-core): log failures to stdout, run unbuffered - #725

Merged
luisguzman-adfa merged 2 commits into
mainfrom
fix/K2GO-376-conex-core-observability
Nov 3, 2026
Merged

luisguzman-adfa merged 2 commits into
mainfrom
fix/K2GO-376-conex-core-observability

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

What changes

  • conex-core logs every error response (path without its query) and every uncaught handler exception to stdout. An uncaught exception now returns a 500 JSON instead of dropping the connection.
  • Both supervisors run python3 -u (PDSM wrapper and systemd unit).
  • conex-core 0.3.3 (+CHANGELOG).

Why

  • /var/log/conex-core.log stayed empty: stdout was block-buffered and never flushed, so a failed import left no trace on the box.

Verifications

  • 195 unit tests pass (2 new).
  • On the OnePlus 7T: conex-core.log now records startup and error responses.

Notes

  • Ships in the rootfs (conex_core role), so boxes get it on the next bake or role run.

conex-core.log stayed empty because the server ran python3 without -u: block-buffered
stdout never flushed while serve_forever runs, and the only output was a startup print,
so a failed import left no trace. Add a logger that records every error response (path
logged without its query, so a ?token=... never lands in the log) and every uncaught
handler exception; an uncaught error now returns a 500 JSON instead of dropping the
connection. Run the server unbuffered (-u) in both supervisors (PDSM wrapper + systemd).
conex-core 0.3.3 (+CHANGELOG).
…per-supervisor -u

Line-buffer stdout/stderr in __main__ instead of passing -u in each supervisor, so the
flush guarantee is one fact in one place and holds however the core is launched (a third
supervisor would otherwise repeat -u). No behavior change: the error log still populates.
@luisguzman-adfa

Copy link
Copy Markdown
Collaborator Author

Update (fc53c15): the flush guarantee moved into the core. __main__ line-buffers stdout and stderr, so the supervisors are unchanged (no -u in the PDSM wrapper or the systemd unit). The log still populates on the OnePlus 7T; 195 tests pass.

@luisguzman-adfa
luisguzman-adfa merged commit f49e6b1 into main Nov 3, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/K2GO-376-conex-core-observability branch November 3, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant