Skip to content

Add SSE fixes - #741

Merged
jakub-id merged 4 commits into
mainfrom
sse-fixes
Aug 28, 2026
Merged

Add SSE fixes#741
jakub-id merged 4 commits into
mainfrom
sse-fixes

Conversation

@jakub-id

@jakub-id jakub-id commented Aug 28, 2026

Copy link
Copy Markdown
Contributor
  1. Replaces the server’s fixed 60-second write deadline with a rolling 30-second deadline before every SSE write, preventing stalled clients from blocking indefinitely.
  2. Immediately sends and flushes retry: 3000.
  3. Sends heartbeat comments every 15 seconds.
  4. Uses tenant.IsOkapiRequest to omit the wildcard CORS header on /broker/...; direct access retains it.
  5. Safely handles closed channels and repeated removal. Logs slow-client eviction and stream write failures.

Clears the server’s 60-second write deadline.
Immediately sends and flushes retry: 3000.
Sends heartbeat comments every 15 seconds.
Uses tenant.IsOkapiRequest to omit the wildcard CORS header on /broker/...; direct access retains it.
Safely handles closed channels and repeated removal.
Logs slow-client eviction and stream write failures.
Copilot AI balanced review requested due to automatic review settings August 28, 2026 13:21

Copilot AI 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.

Pull request overview

Adds SSE connection reliability improvements and grants relevant read roles access to the stream.

Changes:

  • Adds heartbeats, retry hints, flushing, CORS handling, and failure logging.
  • Makes client removal idempotent.
  • Adds SSE lifecycle and CORS tests.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
broker/descriptors/ModuleDescriptor-template.json Grants SSE access to read permission sets.
broker/api/sse_broker.go Improves SSE connection handling and observability.
broker/api/sse_broker_test.go Tests stream setup, heartbeats, CORS, and removal.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread broker/api/sse_broker.go Outdated

Copilot AI 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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@jakub-id
jakub-id requested a review from skomorokh August 28, 2026 13:50
@jakub-id
jakub-id merged commit 41c6021 into main Aug 28, 2026
6 checks passed
@jakub-id
jakub-id deleted the sse-fixes branch August 28, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants