feat: add Kafka error events to Livepeer cloud mode#935
Draft
emranemran wants to merge 1 commit intomainfrom
Draft
feat: add Kafka error events to Livepeer cloud mode#935emranemran wants to merge 1 commit intomainfrom
emranemran wants to merge 1 commit intomainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
🚀 fal.ai Preview Deployment
Livepeer Runner
Testing Livepeer Mode |
59e61c1 to
34ab3fa
Compare
Publish connection error events to Kafka in LivepeerConnection, matching the existing CloudConnectionManager behavior. Uses the same error_type values (cloud_connection_failed, cloud_disconnect_error) and metadata shape (app_id) so Kafka consumers require no changes. Signed-off-by: emranemran <emran@livepeer.org> Signed-off-by: emranemran <emran.mah@gmail.com>
34ab3fa to
11046ff
Compare
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
_publish_cloud_error()helper toLivepeerConnectionmatchingCloudConnectionManager._publish_cloud_error()signature and event shapecloud_connection_failedevents onconnect()andconnect_background()failurescloud_disconnect_errorevents ondisconnect()timeout or exceptionerror_typevalues andmetadata: {"app_id": ...}shape as cloud relay mode — no Kafka consumer changes neededstream_started,stream_stopped,playback_ready,session_created, heartbeats) already fire via shared code inframe_processor.pyandwebrtc.pyTest plan
Verify events fire without Kafka (no-op path)
SCOPE_CLOUD_MODE=livepeer(no Kafka env vars)curl -X POST http://localhost:8000/api/v1/cloud/connect -H 'Content-Type: application/json' -d '{"user_id": "test"}'publish_event()no-ops gracefullyVerify events publish to Kafka
KAFKA_BOOTSTRAP_SERVERS=<broker> KAFKA_TOPIC=scope-events SCOPE_CLOUD_MODE=livepeerscope-eventstopic and verifycloud_connection_failedevent appears with same schema as relay modecloud_disconnect_erroreventRegression: shared events still fire
session_created,stream_started,playback_ready,stream_heartbeat,stream_stopped,session_closedevents still fire