Skip to content

Preserve queued SSE progress notifications - #6358

Open
lorenzozanee wants to merge 1 commit into
stacklok:mainfrom
lorenzozanee:fix/preserve-post-sse-progress
Open

Preserve queued SSE progress notifications#6358
lorenzozanee wants to merge 1 commit into
stacklok:mainfrom
lorenzozanee:fix/preserve-post-sse-progress

Conversation

@lorenzozanee

Copy link
Copy Markdown

Fixes #6349

Issue: #6349

Problem: A POST-SSE request can lose progress notifications when a final response arrives at nearly the same time.

Root cause: The progress and final-response channels are both buffered, so select can choose the final response while a progress notification remains queued.

Change: Drain queued progress notifications before writing the final SSE response.

Tests:

  • Added a regression test for a queued progress notification and final response.
  • Added unit coverage for draining pending progress notifications.

Signed-off-by: lorenzozanee <wyz0707@proton.me>
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

1 participant