Skip to content

Conversation

@kvz
Copy link
Member

@kvz kvz commented Oct 27, 2025

Summary

  • keep the EventSource loop alive until all events are drained and the connection shuts down cleanly
  • stop reconnection attempts once assembly_finished arrives so that result events are not replayed
  • guard post-finish errors by exiting the loop and closing the stream on faults

Testing

  • ./scripts/test-in-docker.sh check

@codecov-commenter
Copy link

codecov-commenter commented Oct 27, 2025

Codecov Report

❌ Patch coverage is 41.37931% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.45%. Comparing base (e682892) to head (9e050a7).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../java/com/transloadit/sdk/EventsourceRunnable.java 41.37% 14 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #97      +/-   ##
============================================
+ Coverage     76.77%   77.45%   +0.68%     
- Complexity      211      215       +4     
============================================
  Files            13       13              
  Lines           775      794      +19     
  Branches         68       72       +4     
============================================
+ Hits            595      615      +20     
+ Misses          146      143       -3     
- Partials         34       36       +2     

☔ View full report in Codecov by Sentry.
📢 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.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 179 to 206
protected void handleFaultEvent(FaultEvent faultEvent) {
if (assemblyFinished) {
shutdownEventSource();
}
stopRequested = true;
shutdownEventSource();

Choose a reason for hiding this comment

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

P1 Badge Abort SSE on any fault

The new handleFaultEvent now unconditionally sets stopRequested and shuts down the EventSource whenever a FaultEvent arrives. Before this change, faults were ignored unless the assembly was already finished, allowing the LaunchDarkly client to reconnect transparently. With the new logic, any transient network hiccup before assembly_finished will stop the SSE loop permanently without notifying the listener, so the assembly listener may never receive either onAssemblyFinished or onError. This prematurely terminates monitoring of long‑running assemblies in unreliable network conditions.

Useful? React with 👍 / 👎.

@kvz
Copy link
Member Author

kvz commented Oct 27, 2025

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@kvz kvz merged commit d7bb207 into main Oct 27, 2025
2 checks passed
@kvz kvz deleted the fix/drain-sse-finish branch October 27, 2025 20:53
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.

3 participants