Skip to content

fix(access-controller): stream SSE responses instead of buffering with toStrict - #4943

Open
LizBaldo wants to merge 1 commit into
developfrom
ctm-724-sse-proxy-streaming
Open

LizBaldo wants to merge 1 commit into
developfrom
ctm-724-sse-proxy-streaming

Conversation

@LizBaldo

Copy link
Copy Markdown
Collaborator

Leo's proxy called toStrict(requestTimeout) on all responses, buffering the full body before returning it. SSE (text/event-stream) responses never complete, so they always hit the 60s request timeout and returned 503. Skip toStrict for SSE and pass the response through as a stream; all other response types are unchanged.

Reported by the Galaxy team — the monitor app was disconnecting after ~1 minute.

Ticket: https://broadworkbench.atlassian.net/browse/CTM-724

🤖 Generated with Claude Code

…h toStrict

Leo's proxy was calling toStrict(requestTimeout) on all responses, which
buffers the full body before returning. SSE (text/event-stream) responses
never complete, causing a 503 after the 60s request timeout. Skip toStrict
for SSE and pass the response through as a stream.

Ticket: https://broadworkbench.atlassian.net/browse/CTM-724

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 73.35%. Comparing base (74c3548) to head (a38cd5a).

Files with missing lines Patch % Lines
...workbench/leonardo/http/service/ProxyService.scala 75.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4943      +/-   ##
===========================================
- Coverage    73.35%   73.35%   -0.01%     
===========================================
  Files          131      131              
  Lines        11319    11322       +3     
  Branches       924      958      +34     
===========================================
+ Hits          8303     8305       +2     
- Misses        3016     3017       +1     
Files with missing lines Coverage Δ
...workbench/leonardo/http/service/ProxyService.scala 75.00% <75.00%> (-0.12%) ⬇️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 74c3548...a38cd5a. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@davidangb davidangb 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.

👍 as-is. I would be tempted to move ALL responses to streams, but that's a bigger refactor!

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.

4 participants