fix(worker): 修复 worker 镜像漏 COPY apps/api/app 目录导致转码队列不消费(Staging E2E 阻塞) #1850
1 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
0a369a607b |
fix(worker): 修复 worker 镜像漏 COPY apps/api/app 目录导致 lipsync_tts task 无法导入、转码队列不消费
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 2s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 30s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 30s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m31s
CI/CD Pipeline / Validate - Style (pull_request) Successful in 1m52s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m31s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 2m50s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 3m44s
AI Code Review / AI Code Review (pull_request) Successful in 6m39s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 9m8s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 10m33s
CI/CD Pipeline / Validate - Security (pull_request) Successful in 21m22s
CI/CD Pipeline / CI Gate (pull_request) Successful in 3s
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 7s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 1m25s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 136h33m41s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 136h33m44s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 136h54m58s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 136h55m7s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 136h54m51s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 136h54m54s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 136h33m31s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 136h54m44s
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Failing after 136h54m49s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 136h33m28s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 136h33m31s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 136h54m44s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 136h54m48s
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Failing after 136h54m49s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 136h54m50s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 136h54m54s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 136h54m51s
CI/CD Pipeline / Check push changed paths (pull_request) Failing after 136h54m56s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Failing after 137h29m54s
PR #1844 在 worker celery_app.conf.imports 新增了 "apps.api.app.tasks.lipsync_tts", 但 worker.Dockerfile 只 COPY 了 config.py 和 core/,没 COPY tasks/ 和 services/, 且 PYTHONPATH 缺少 /app/apps/api(API 容器用 from app.xxx 解析的必需前缀)。 导致 worker 启动时 celery import lipsync_tts 失败,transcode 队列没有正常注册, 素材上传后卡在 processing 状态超时,Staging E2E 的 core-upload 和 core-generation 两个用例持续失败(素材永远到不了 ready)。 修复: 1. 将单独 COPY config.py/core/ 改为 COPY 整个 apps/api/app/ 目录(1.2M), 避免后续新增 task 再次漏 COPY; 2. PYTHONPATH 追加 /app/apps/api,对齐 API 容器配置,让 from app.core.celery_app、 from app.services.* 等导入路径在 worker 中也能解析。 |