Skip to content

bug(ci): bound video toolchain provisioning and stop timed-out children #4073

Closed

Description

@yannickmonney

The required Unit job can spend ten minutes inside video-toolchain provisioning, then fail the entire unit suite while the provisioning child remains alive. This blocks unrelated PRs even when their tests pass.

Observed on PR #4072 at head d3c7d48f197e268d28a58c1d77a0392203d99cac: Unit job 110740061610. The log reaches [video-toolchain] installing ffmpeg via apt-get…, reports 99 new packages /94.1MB and begins Ubuntu mirror downloads. It then reports Hook timed out in 600000ms at ytdlp_live.test.ts:141, followed by a hanging-process warning. 80,983 tests passed; one suite failed and six tests skipped. This is a toolchain setup failure, not an observed YouTube bot-wall failure.

Source inspection: backend/core/video_links/ytdlp_toolchain.ts has no timeout or cancellation on downloadTo fetch/body reads or the spawned run/which children. The enclosing Vitest hook timeout does not provide cancellation to those operations. The exact reason the package installation stalled is not yet established.

Please give provisioning a bounded, diagnosable lifetime and ensure cancellation/rejection cleans up only the child processes it owns. Prefer the existing process/deadline abstractions. Preserve required live-ingestion coverage; do not turn infrastructure failures into passing tests or merely enlarge the timeout. Consider resolving the heavy system dependency before the test hook through the existing toolchain contract, with a clear cache/input boundary.

Validation: synthetic local stalled-download and stalled-child regression tests, plus normal success/nonzero-exit controls; verify no child survives cancellation and an error names the failing stage. Check the normal required CI job on the exact resulting head. No production testing or local state deletion is needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions