Skip to content

Comments

@remotion/serverless: More resilient and efficient progress uploading#6612

Merged
JonnyBurger merged 1 commit intomainfrom
fix/serverless-progress-upload
Feb 20, 2026
Merged

@remotion/serverless: More resilient and efficient progress uploading#6612
JonnyBurger merged 1 commit intomainfrom
fix/serverless-progress-upload

Conversation

@JonnyBurger
Copy link
Member

@JonnyBurger JonnyBurger commented Feb 20, 2026

  • Fixes a case where a render was never marked as finishing
  • Should require less uploads of the progress while keeping same granularity

…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>
Copilot AI review requested due to automatic review settings February 20, 2026 10:33
@vercel
Copy link
Contributor

vercel bot commented Feb 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview, Comment Feb 20, 2026 10:35am
remotion Ready Ready Preview, Comment Feb 20, 2026 10:35am

Request Review

@JonnyBurger JonnyBurger changed the title @remotion/serverless: Await final progress upload and improve upload deduplication @remotion/serverless: More resilient and efficient progress uploading Feb 20, 2026
Copy link
Contributor

@pullfrog pullfrog bot left a comment

Choose a reason for hiding this comment

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

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.

Pullfrog  | View workflow runpullfrog.com𝕏

Copy link
Contributor

@pullfrog pullfrog bot left a comment

Choose a reason for hiding this comment

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

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.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow runpullfrog.com𝕏

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@JonnyBurger JonnyBurger merged commit 91a66df into main Feb 20, 2026
22 checks passed
@JonnyBurger JonnyBurger deleted the fix/serverless-progress-upload branch February 20, 2026 10:49
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.

1 participant