fix: P0 upload 404 (project/library mismatch) + worker 3 bugs + 秒传 URL #2109
Reference in New Issue
Block a user
Delete Branch "fix/2109-p0-upload-404-and-worker-bugs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
修复列表
P0 前端上传 404
根因:getAssetLibraries() 不传 project_id 返回所有项目的库,但 uploadAssetDirect 内部 getOrCreateDefaultProject() 只取第一个项目,两者不匹配导致后端返回 404。
Bug1 (P0): upload_to_oss TypeError
_step_upload 传了不存在的 prefix= kwarg。按 generation.py 同模式构造 storage_key = generated/viral-video/{user_id}/{job_id}/{filename}。
Bug2 (P0): Seedance API 404
代码里端点、模型名(Doubao-Seedance-2-5-251128)、base_url 都与火山官方一致。404 几乎必然是模型未开通/Key 无权限/应用推理接入点。增强 ai_client 日志:create 请求打印 URL/model/参数,4xx/5xx 完整打响应体,失败时输出排查指引。
Bug3 (P1): TTS import services 模块路径
services.tts_service_factory 改为绝对路径 apps.worker.services.tts_service_factory;加 synthesize(text, voice_id) TypeError 兜底。
额外:秒传命中时前端拿到空 URL
DirectUploadPrepareResponse 加 url 字段;prepare 端 duplicated 时填 existing.file_url 或 storage URL;前端 duplicated 短路时返回 prepared.url。
CI/CD:worker 容器 tag 被旧 override 钉死
ci_staging_deploy.sh 部署前主动清理 docker-compose.override.yml / compose.override.yml。
🚀 预览环境已部署
🗑️ 预览环境已清理
PR #2109 已关闭或合并,对应的预览环境已被清理。