Fix COCO export timeouts with temp file approach#1529
Open
JasonWildMe wants to merge 10 commits intomainfrom
Open
Fix COCO export timeouts with temp file approach#1529JasonWildMe wants to merge 10 commits intomainfrom
JasonWildMe wants to merge 10 commits intomainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1529 +/- ##
==========================================
- Coverage 53.25% 52.87% -0.39%
==========================================
Files 274 274
Lines 9818 9910 +92
Branches 2906 2931 +25
==========================================
+ Hits 5229 5240 +11
- Misses 4345 4426 +81
Partials 244 244
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
@naknomum bumping for your review! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
uploadTmpDirfirst, then streams the completed file with an accurateContent-Lengthheaderresponse.isCommitted()guard so error handling doesn't mix HTML into a partially-written ZIP streamEncounterCOCOExportFile:HttpURLConnectiondisconnect indetectContentType(),Graphics2Ddisposal inconvertAndWriteImage()Root cause
The frontend
fetch()call receives aTypeError: Failed to fetchwhen NGINX'sproxy_read_timeout(default 60s) kills the connection while Tomcat is still streaming images into the ZIP. Tomcat doesn't detect the disconnect and logs success. The temp file decouples the slow image-fetching phase from the fast file-streaming phase.Test plan
uploadTmpDirin container)🤖 Generated with Claude Code