Skip to content

Fix dropped progress frames in POST-SSE responses - #6491

Merged
jhrozek merged 2 commits into
stacklok:mainfrom
isaacgao4396:fix/post-sse-progress-ordering
Sep 11, 2026
Merged

jhrozek merged 2 commits into
stacklok:mainfrom
isaacgao4396:fix/post-sse-progress-ordering

Conversation

@isaacgao4396

Copy link
Copy Markdown
Contributor

Summary

  • Drain request-scoped progress notifications already queued when the final POST-SSE response arrives.
  • Preserve backend ordering by emitting queued progress frames before the final response.
  • Add deterministic regression coverage for ordering, empty/nil routes, and SSE write failures.

Testing

  • go test -count=1 ./pkg/transport/proxy/streamable
  • go vet ./pkg/transport/proxy/streamable

Fixes #6349

Signed-off-by: isaacgao4396 <gaoyuan4396@gmail.com>

@jhrozek jhrozek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the fix — closes a genuine select-ordering race where a buffered progress notification could be skipped in favor of the final response. Drain-before-final logic is correct given dispatchResponses' strict per-channel ordering, and the new tests cover the ordering, no-op, and write-failure cases. LGTM.

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.22222% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.24%. Comparing base (7f0d08f) to head (4fd4364).
⚠️ Report is 108 commits behind head on main.

Files with missing lines Patch % Lines
pkg/transport/proxy/streamable/streamable_proxy.go 72.22% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6491      +/-   ##
==========================================
- Coverage   78.25%   78.24%   -0.02%     
==========================================
  Files         770      770              
  Lines       75436    75448      +12     
==========================================
- Hits        59035    59033       -2     
- Misses      16396    16410      +14     
  Partials        5        5              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jhrozek
jhrozek merged commit 9d20261 into stacklok:main Sep 11, 2026
43 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 11, 2026
2 tasks
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.

Progress notifications can be silently dropped in POST-SSE select race

3 participants