fix(runner): Handling the early end of a stream - #1921
Open
Mazi02 wants to merge 4 commits into
Open
Conversation
Writes the .del- marker livestreamCleanup looks for. So far that marker was only written by CheckVoD, which the discard path skips. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The skip detected StreamEnd by comparing function pointers and depended on the loop position, so reordering the action list broke it silently. RunAction now takes the VoD and discard actions as their own lists. It also depended on AbortingError not skipping the following actions, contrary to the doc comment on Action - describe the actual behaviour instead, ending a stream early needs StreamEnd to run after the cancelled Stream action. RequestStreamEnd returns an actual response now, (nil, nil) is an internal error. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The runner only tracks jobs of its current process while the job rows live in the db, so NotFound is the normal case after a regular run, a double click on "end stream" or a runner restart - and turned every such click into a HTTP 500. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Motivation and Context
If a lecturer ends the stream early and not discard it, it will not create a VoD.
Steps for Testing