Skip to content

sozu top --snapshot still enables raw mode, so it fails without a terminal #1574

Closed

Description

@FlorentinDUBOIS

sozu top --snapshot N is documented in bin/src/cli.rs as a "test affordance, no terminal control", but it still installs raw mode. bin/src/ctl/top/render.rs calls RawModeGuard::install(cfg.mouse)? unconditionally before building the CrosstermBackend, which reaches enable_raw_mode().

Effect

Without a controlling terminal (CI, a pipe, ssh -T), the snapshot run fails with ResolvePath("sozu top render loop", … os error 6 ENXIO). As a result, bin/tests/sozu_top_e2e.rs passes only under a pty and cannot join CI (see #1572 / #1573).

Suggested fix

In snapshot mode, skip the raw-mode guard (and mouse capture, and alternate screen) and render the frames to stdout, as the flag's doc says. Then run sozu_top_e2e in CI without a pty.

Activity

  1. added a commit that references this issue on Sep 26, 2026
    1d9c4c5
  2. added a commit that references this issue on Sep 26, 2026
    ba2aeac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions