Skip to content

Make stopping egress due to a room disconnect transparent#1270

Merged
milos-lk merged 2 commits into
mainfrom
room-disconnect
Jun 22, 2026
Merged

Make stopping egress due to a room disconnect transparent#1270
milos-lk merged 2 commits into
mainfrom
room-disconnect

Conversation

@milos-lk

@milos-lk milos-lk commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

If iit happens that egress gets disconnected from a room and the sdk retry logic doesn't manage to re-establish the connection - egress transparently succeeds and an API consumer has no clue that the recording got cut in the middle of the session. The goal of these chnages is to make egress fail under these circumstances but still upload what has been recorded by that time as there was nothing wrong with the media pipeline itself. To be able to integration test this I needed to add a hook for artifically triggering the disconnect flow.

If iit happens that egress gets disconnected from a room and the sdk retry logic doesn't manage to re-establish the connection - egress transparently succeeds and an API consumer has no clue that the recording got cut in the middle of the session.
The goal of these chnages is to make egress fail under these circumstances but still upload what has been recorded by that time as there was nothing wrong with the media pipeline itself.
To be able to integration test this I needed to ad a hook for artifically triggering the disconnect flow.
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

AV-sync stats summary: view in run #27945085792

Comment thread test/edge.go Outdated
// Room composite where the egress participant loses its room
// connection with a retryable reason. The partial recording must
// still be finalized and uploaded, and the egress reported FAILED
// so cloud can retry it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe remove reference to cloud?

@biglittlebigben biglittlebigben left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is likely that most customer's logic will assume that the asset is inexistent if the Status is not Complete. Is any of the our own logic going to break if there is an output with an Error status? How will this get billed?

@milos-lk

Copy link
Copy Markdown
Contributor Author

Is any of the our own logic going to break if there is an output with an Error status?

based on what I checked - I don't see anything that could break. In fact, it will give more sense to future auto retry cases - where recordings resulted from these failed sessions would be preserved automatically without API customers getting FAILED status.

It is likely that most customer's logic will assume that the asset is inexistent if the Status is not Complete

not sure about that - egress info is part of the response regardless of the end status - I wasn't able to find a doc that would imply nothing is uploaded on FAILED. In the absence of auto-retry - it gives a customer a fair chance to re-start the recording and still preserve majority of the recorded material

@milos-lk milos-lk merged commit 58896e7 into main Jun 22, 2026
18 checks passed
@milos-lk milos-lk deleted the room-disconnect branch June 22, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants