Skip to content

fix(top): track rst_stream_dropped in the H2 trend and run the tui tests in CI - #1577

Merged
FlorentinDUBOIS merged 1 commit into
mainfrom
fix/top-stale-insta-snapshot
Sep 26, 2026
Merged

FlorentinDUBOIS merged 1 commit into
mainfrom
fix/top-stale-insta-snapshot

Conversation

@FlorentinDUBOIS

Copy link
Copy Markdown
Collaborator

snapshot_h2_120x40 fails on main under cargo test -p sozu --features tui since #1434 added the h2.rst_stream_dropped row to the H2 pane without updating the stored insta snapshot.

Why not just accept the snapshot

The row is intended: #1434 gives the RST_STREAM control queue the same drop + metric + log shape as h2.window_update_dropped, and the pane lists both. Its trend cell was not: it rendered — where every sibling row draws ▁▁, because h2.rst_stream_dropped was never added to H2_TRACKED_KEYS (bin/src/ctl/top/app.rs), the list App::fold_h2_trends samples. That constant's own doc-comment says it exists so a key cannot silently lose its sparkline. Accepting the frame as rendered would have frozen the gap.

Changes

  • bin/src/ctl/top/app.rs: track names::h2::RST_STREAM_DROPPED beside WINDOW_UPDATE_DROPPED.
  • snapshot_h2_120x40.snap: regenerated with INSTA_UPDATE=always. The new row now has a ▁▁ trend, and the frame has one fewer blank line below it. No other snapshot was stale.
  • .github/workflows/ci.yml: new msrv-full step cargo test -p sozu --locked ${{ matrix.flags }} --features tui --lib. No cell enabled tui, so Test sozu compiled every top unit test out. That cell already resolves the tui dependencies for cargo doc --all-features, and --lib keeps the cost to one extra build of the library test binary (41 s locally with warm deps). The sozu_top_e2e step stays with fix(top): render --snapshot frames to stdout without terminal control #1575, and this PR does not touch that hunk.
  • CHANGELOG.md: Fixed entry.

Red, then green

Before (origin/main 57c9269): cargo test -p sozu --features tui: 134 passed; 1 failed (exit 101), and the diff shows +rst_stream_dropped … —.
With only the H2_TRACKED_KEYS line removed, cargo test -p sozu --features tui --lib snapshot_h2 also fails (-… ▁▁ / +… —, exit 101).
After: cargo test -p sozu --features tui gives 135 passed; 0 failed (exit 0).

Also exit 0: cargo build --locked --no-default-features --features crypto-ring,opentelemetry,splice,simd, cargo +nightly fmt --all -- --check, cargo clippy -p sozu --features tui --all-targets -- -D warnings, cargo test -p sozu, the four check_doc_citations.py invocations (the broken fixture exits 1 as expected), and RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features --locked.

Closes #1576

Signed-off-by: Florentin Dubois [email protected]

…sts in CI

snapshot_h2_120x40 has failed under `cargo test -p sozu --features tui`
since #1434, which added the h2.rst_stream_dropped row to the H2 pane's
flood table (bin/src/ctl/top/panes/h2.rs) without updating the stored
insta snapshot:

  $ cargo test -p sozu --features tui
  test ctl::top::snapshot_tests::snapshot_h2_120x40 ... FAILED
  +││rst_stream_dropped      0      —      ││
  test result: FAILED. 134 passed; 1 failed                   [exit 101]

The row itself is intended: #1434 gives the RST_STREAM control queue the
same drop + metric + log shape h2.window_update_dropped already has, and
the pane lists both. Its trend cell is not: it printed `—` where every
sibling row draws a sparkline, because #1434 did not add the key to
H2_TRACKED_KEYS (bin/src/ctl/top/app.rs), the list App::fold_h2_trends
samples, whose own doc-comment says it exists so a key cannot silently
lose its sparkline. Accepting the snapshot as rendered would have frozen
that gap. The key is now tracked beside WINDOW_UPDATE_DROPPED, and the
snapshot is regenerated with INSTA_UPDATE=always to the corrected frame:
the new row with a `▁▁` trend, one fewer blank line below it.

Seen red with only the H2_TRACKED_KEYS line removed:

  $ cargo test -p sozu --features tui --lib snapshot_h2
  -││rst_stream_dropped      0      ▁▁     ││
  +││rst_stream_dropped      0      —      ││
  test result: FAILED. 0 passed; 1 failed                     [exit 101]

No other snapshot was stale: the full tui suite passes, 135 tests.

The drift went unnoticed because no CI cell enables `tui`, so `Test sozu`
compiles every `top` unit test out. A new step on the msrv-full cell runs
`cargo test -p sozu --features tui --lib`: that cell already resolves the
tui dependencies for `cargo doc --all-features`, nothing in `top` varies
by crypto provider, and `--lib` bounds the cost to one extra build of the
sozu library test binary (41 s locally with warm dependencies). The
sozu_top_e2e step proposed separately in #1575 is left to that PR.

Closes #1576

Signed-off-by: Florentin Dubois <[email protected]>
@FlorentinDUBOIS
FlorentinDUBOIS force-pushed the fix/top-stale-insta-snapshot branch from e6c9f0c to d713e7f Compare September 26, 2026 17:22
@FlorentinDUBOIS
FlorentinDUBOIS merged commit b5169d4 into main Sep 26, 2026
28 checks passed
@FlorentinDUBOIS
FlorentinDUBOIS deleted the fix/top-stale-insta-snapshot branch September 26, 2026 18:17
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.

top: snapshot_h2_120x40 insta snapshot is stale since rst_stream_dropped was added

1 participant