@remotion/serverless: More resilient and efficient progress uploading#6612
@remotion/serverless: More resilient and efficient progress uploading#6612JonnyBurger merged 1 commit intomainfrom
@remotion/serverless: More resilient and efficient progress uploading#6612Conversation
…d deduplication - Replace request-ID based dedup with dirty-flag loop to avoid redundant uploads - Await setPostRenderData upload to prevent function being killed before final progress is persisted - Add verbose logging with reasons for each progress upload Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@remotion/serverless: Await final progress upload and improve upload deduplication@remotion/serverless: More resilient and efficient progress uploading
There was a problem hiding this comment.
Low urgency. The dirty-flag loop pattern is a correct improvement over the request-ID based deduplication. The implementation handles JavaScript's event loop semantics properly—state changes during async operations will be captured by the next loop iteration, and awaiting setPostRenderData ensures the final progress is persisted before the function exits. The verbose logging is appropriately gated behind log level checks. No issues found.
There was a problem hiding this comment.
Clean, well-designed improvement. The dirty-flag loop is a sound replacement for the request-ID dedup — it naturally coalesces rapid updates and guarantees the most recent state is always uploaded. The setPostRenderData await fixes the core problem of the serverless function exiting before final progress is persisted. No concurrency issues in the single-threaded JS model. One minor observation inline.
There was a problem hiding this comment.
Pull request overview
This PR updates progress persistence in @remotion/serverless by changing how overall render progress is uploaded, aiming to reduce redundant uploads and ensure the final progress state is persisted before the function exits.
Changes:
- Replace request-ID-based upload deduplication with a dirty-flag upload loop and “reason” strings for verbose diagnostics.
- Make
setPostRenderData()async and await the final progress upload. - Update call sites to pass upload reasons and await
setPostRenderData()where needed.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/serverless/src/overall-render-progress.ts | Reworks progress upload mechanism to a dirty-loop, adds verbose logging reasons, and makes final progress upload awaitable. |
| packages/serverless/src/merge-chunks.ts | Awaits setPostRenderData() so final progress is persisted before continuing cleanup. |
| packages/serverless/src/handlers/launch.ts | Updates upload call sites to include reason strings; fatal error upload is awaited with a reason. |

Uh oh!
There was an error while loading. Please reload this page.