Skip to content

fix(frame_processor): surface empty pipeline_ids error to client + fallback to loaded pipelines#683

Open
livepeer-tessa wants to merge 1 commit intomainfrom
tessa/fix/frame-processor-empty-pipeline-ids
Open

fix(frame_processor): surface empty pipeline_ids error to client + fallback to loaded pipelines#683
livepeer-tessa wants to merge 1 commit intomainfrom
tessa/fix/frame-processor-empty-pipeline-ids

Conversation

@livepeer-tessa
Copy link
Contributor

Problem

Issue #680: frame_processor silently fails when started with no pipeline_ids, logging an ERROR server-side but never notifying the client. This left the frontend with no video output and no explanation — causing a retry/reconnect loop (3 hits on the same fal job in issue #680).

Root cause

In FrameProcessor.start(), the early-exit path for missing pipeline_ids published a Kafka error event and set running = False, but never called notification_callback. The client's data channel received no signal, so it retried.

Changes

1. Graceful fallback — use loaded pipelines when none specified (new behaviour)

If pipeline_ids is absent/empty in initial_parameters, the processor now queries pipeline_manager.get_loaded_pipeline_ids() and uses whatever is already loaded. This matches the documented schema behaviour:

"If not provided, uses the currently loaded pipeline."

This prevents the error entirely for sessions that legitimately omit pipeline_ids.

2. Surface error to client via data channel (bug fix)

If the fallback also yields nothing, the existing error path now calls notification_callback with {"type": "stream_stopped", "error_message": "No pipeline IDs provided, cannot start"} before returning. The frontend receives this on the data channel and can show a user-visible error instead of retrying blindly.

Testing

  • Existing behaviour unchanged when pipeline_ids is provided
  • No regressions to the Kafka error event (still published)
  • Fallback path requires the pipeline manager to have loaded pipelines; if not, error path fires as before (now with client notification)

Closes #680

…llback to loaded pipelines

When start() is called with no pipeline_ids:
1. Attempt a graceful fallback: if the pipeline_manager has loaded pipelines,
   use those instead of erroring out. This matches the documented schema
   behaviour ('If not provided, uses the currently loaded pipeline') and
   prevents the error entirely for sessions that omit pipeline_ids but have
   pipelines already loaded.
2. If still empty after the fallback, fire notification_callback with
   type='stream_stopped' + error_message before returning, so the frontend
   receives the failure via the WebRTC data channel instead of silently
   hanging and retrying in a loop.

Previously the error was logged and published to Kafka only, making it
invisible to the client and triggering the retry/reconnect loop observed in
issue #680 (3 hits on the same fal job in one session).

Closes #680

Signed-off-by: livepeer-robot <robot@livepeer.org>
@livepeer-tessa livepeer-tessa added the bug Something isn't working label Mar 13, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 143762f8-6c58-4cb7-bd70-22d4ab9ac8fe

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch tessa/fix/frame-processor-empty-pipeline-ids
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can enforce grammar and style rules using `languagetool`.

Configure the reviews.tools.languagetool setting to enable/disable rules and categories. Refer to the LanguageTool Community to learn more.

@github-actions
Copy link
Contributor

🚀 fal.ai Preview Deployment

App ID daydream/scope-pr-683--preview
WebSocket wss://fal.run/daydream/scope-pr-683--preview/ws
Commit b89ff6c

Testing

Connect to this preview deployment by running this on your branch:

uv run build && SCOPE_CLOUD_APP_ID="daydream/scope-pr-683--preview/ws" uv run daydream-scope

🧪 E2E tests will run automatically against this deployment.

@github-actions
Copy link
Contributor

✅ E2E Tests passed

Status passed
fal App daydream/scope-pr-683--preview
Run View logs

Test Artifacts

Check the workflow run for screenshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

frame_processor: 'No pipeline IDs provided, cannot start' — empty pipeline config sent to server

1 participant