Skip to content

Don't delete the stream from state if requestID doesn't match#3667

Merged
mjh1 merged 1 commit intomasterfrom
mh/cleanup
Jul 8, 2025
Merged

Don't delete the stream from state if requestID doesn't match#3667
mjh1 merged 1 commit intomasterfrom
mh/cleanup

Conversation

@mjh1
Copy link
Member

@mjh1 mjh1 commented Jul 8, 2025

There is a bug where a previous pipeline of the same streamID can cause a more recent pipeline to fail.

Example logs showing the bug:

I0707 15:07:46.616171       1 ai_mediaserver.go:1097] request_id=be334f7e stream=stk_zrpiNFnPaXHVmcwy source_type=livepeer-whip stream_id=str_1MGM13e5t1QguMwv model_id=comfyui manifest_id=8e5a0beb url=https://cal-2.lvpr.io:20006/ai/trickle/8e5a0beb-out Live video pipeline finished
....
I0707 15:07:53.241637       ai_live_video.go:258] request_id=337983a7 stream=stk_zrpiNFnPaXHVmcwy source_type=livepeer-whip stream_id=str_1MGM13e5t1QguMwv model_id=comfyui manifest_id=b7cebeb6 url=https://cal-2.lvpr.io:20006/ai/trickle/b7cebeb6-out trickle subscribe stopping, input stream does not exist.

RequestID 337983a7 had recently started up but the trickle subscribe stopped due to this input stream check, this was because a previous stream with requestID be334f7e was shutting down and removed the stream in this cleanupControl function.

@github-actions github-actions bot added go Pull requests that update Go code AI Issues and PR related to the AI-video branch. labels Jul 8, 2025
@mjh1 mjh1 requested review from j0sh and leszko July 8, 2025 14:33
@codecov
Copy link

codecov bot commented Jul 8, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 31.70613%. Comparing base (9717ba2) to head (569ec37).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
server/ai_mediaserver.go 0.00000% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              master       #3667   +/-   ##
=============================================
  Coverage   31.70613%   31.70613%           
=============================================
  Files            156         156           
  Lines          47259       47259           
=============================================
  Hits           14984       14984           
  Misses         31393       31393           
  Partials         882         882           
Files with missing lines Coverage Δ
server/ai_mediaserver.go 4.65808% <0.00000%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9717ba2...569ec37. Read the comment docs.

Files with missing lines Coverage Δ
server/ai_mediaserver.go 4.65808% <0.00000%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@j0sh j0sh left a comment

Choose a reason for hiding this comment

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

Good catch, thanks!

@mjh1 mjh1 merged commit a941442 into master Jul 8, 2025
20 checks passed
@mjh1 mjh1 deleted the mh/cleanup branch July 8, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Issues and PR related to the AI-video branch. go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants