feat: 渲染失败检测+任务超时机制 (#1219)
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 51s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 59s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 2m49s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m26s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 4m55s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 5m47s
CI/CD Pipeline / Integration Tests (push) Successful in 1m56s
CI/CD Pipeline / Unit Tests (push) Successful in 9m42s
CI/CD Pipeline / Build Staging API Image (push) Successful in 12m15s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 34s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 37s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 2m27s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 4m39s
CI/CD Pipeline / Canary Release to Production (push) Failing after 1079h35m0s
CI/CD Pipeline / CI Gate (push) Failing after 1079h42m47s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1079h42m45s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 1079h42m47s
CI/CD Pipeline / Build Production API Image (push) Failing after 1079h42m47s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 1079h52m30s
CI/CD Pipeline / PR Build API Image (push) Failing after 1079h52m30s
CI/CD Pipeline / Frontend Lint (push) Failing after 1079h52m30s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 1079h52m33s
CI/CD Pipeline / Deploy Production (push) Failing after 1080h16m1s
CI/CD Pipeline / Build Production Web Image (push) Failing after 1080h16m2s
CI/CD Pipeline / PR Build Web Image (push) Failing after 1080h25m45s

- 新增 video_validation 模块(moov atom 检测 + ffprobe 验证 + 退出码映射)
- render_adapter 渲染后自动校验输出再上传 OSS
- 三个渲染任务加 10 分钟 soft_time_limit
- Worker 启动时清理 GenerationTask + Job 两张表的孤儿任务
- 21 个新单元测试,全量 13713 测试通过
This commit is contained in:
xiaoxia
2026-08-02 15:34:22 +08:00
parent 380274e635
commit 0ef4e1d633
8 changed files with 787 additions and 19 deletions
+17
View File
@@ -25,6 +25,7 @@ from typing import Any, Callable
from sqlalchemy.orm import Session
from video_processing.oss_helpers import download_asset, upload_to_oss
from video_processing.unified_render_service import UnifiedRenderService
from video_processing.video_validation import validate_video_output
from packages.adapters.sqlalchemy_impl.edit_plan_clip_repository import SQLAlchemyEditPlanClipRepository
from packages.adapters.sqlalchemy_impl.edit_plan_repository import SQLAlchemyEditPlanRepository
@@ -531,6 +532,22 @@ class RenderAdapter:
)
result = render_svc.render()
# 4.5 渲染后校验输出完整性
validation = validate_video_output(result.output_path)
if not validation.valid:
logger.error(
"[render-adapter] 渲染输出校验失败: plan_id=%s job_id=%s error=%s",
plan_id,
job_id,
validation.error_message,
)
return RenderAdapterResult(
success=False,
error_message=f"渲染输出校验失败: {validation.error_message}",
error_detail=validation.error_message,
)
self._report_progress(progress_cb, 80.0, "上传渲染结果")
# 5. 上传结果