Skip to content

fix: check is_available() before creating Syphon output sink (#692)#694

Open
livepeer-tessa wants to merge 1 commit intomainfrom
tessa/692-syphon-is-available-guard
Open

fix: check is_available() before creating Syphon output sink (#692)#694
livepeer-tessa wants to merge 1 commit intomainfrom
tessa/692-syphon-is-available-guard

Conversation

@livepeer-tessa
Copy link
Contributor

Summary

Adds the missing is_available() guard for the Syphon output sink in _update_output_sink(), matching the existing guard already in place for input sources (added in #644/NDI).

On fal.ai Linux workers, syphon-python is not installed. Without the guard, every connection attempt from a user with a Syphon workflow saved from their Mac produced four ERROR log lines, flooding Grafana.

Changes

  • frame_processor._update_output_sink() — add sink_class.is_available() check before instantiating the sink, identical pattern to the input source guard at line 827
  • SyphonOutputSink.create() — downgrade ImportError log from ERRORWARNING (macOS-only unavailability is expected, not an error)
  • SyphonSender.create() — same downgrade
  • SyphonInputSource.connect() — same downgrade (already gated by is_available() but ImportError path still reachable in edge cases)

Related

On Linux/fal.ai workers, syphon-python is not installed (macOS only).
Without an is_available() guard in _update_output_sink(), the frame
processor tried to instantiate SyphonOutputSink and logged four ERROR
lines per connection attempt, flooding the log with noise.

- Add is_available() guard in frame_processor._update_output_sink(),
  mirroring the existing guard in _set_input_source() (added in #644/NDI)
- Downgrade ImportError log level from ERROR to WARNING in:
    - scope.core.inputs.syphon.SyphonInputSource.connect()
    - scope.core.outputs.syphon.SyphonOutputSink.create()
    - scope.server.syphon.sender.SyphonSender.create()
  These paths are already gated by is_available() but the ImportError
  branch is still reachable in edge cases; ERROR is inappropriate for
  an expected platform-unavailability condition.

Fixes #692
Related: #688 (SpoutGL), #644 (NDI)

Signed-off-by: livepeer-robot <robot@livepeer.org>
@coderabbitai
Copy link

coderabbitai bot commented Mar 15, 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: 2dce2160-c475-41c9-a7cb-703d9a18c6a7

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/692-syphon-is-available-guard
📝 Coding Plan
  • Generate coding plan for human review comments

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

@github-actions
Copy link
Contributor

🚀 fal.ai Preview Deployment

App ID daydream/scope-pr-694--preview
WebSocket wss://fal.run/daydream/scope-pr-694--preview/ws
Commit 6691bfa

Testing

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

uv run build && SCOPE_CLOUD_APP_ID="daydream/scope-pr-694--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-694--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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Syphon input/output logs ERROR on fal.ai (Linux) where syphon-python is unavailable — should check is_available() first

1 participant