Files
xiaoxia-saas/apps/api/app
xiaoxia a989670d83
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 1s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 1s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / Build Production API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Style (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Security (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been cancelled
CI/CD Pipeline / PR Build API Image (pull_request) Has been cancelled
CI/CD Pipeline / PR Build Web Image (pull_request) Has been cancelled
CI/CD Pipeline / PR Build Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been cancelled
AI Code Review / AI Code Review (pull_request) Has been cancelled
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been cancelled
PR Automation / Auto Approve on CI Green (pull_request) Has been cancelled
Preview Deploy / Deploy Preview Environment (pull_request) Has been cancelled
fix(cover): 修复 #2053 单测失败 — plan_id 直接返回以兼容测试直接调用
CI 报错 17 个用例失败:
  ValidationError: GenerateCoverResponse.plan_id Input should be a valid string
  input_value=<MagicMock id='...'>

原因:上一版把 plan_id 参数默认值改为 "" 后,在函数体内用 resolve_draft_plan_id
的返回值覆盖了 plan_id。单测直接调用函数时虽然显式传入了 plan_id="plan-x",
但 resolve_draft_plan_id 未被 mock,会把 services=(mock_tpl, mock_plan) 中的
MagicMock 当作 tpl_svc 调用并返回 MagicMock,最终覆盖传入的字符串。

修复:在函数体内加判断 if not plan_id: 才走 resolve_draft_plan_id;单测显式
传入 plan_id 字符串时直接用,HTTP 调用默认空串才触发模板解析。
同时把两处函数内 from-import 提升到模块顶层 import resolve_draft_plan_id,
并在 templates_editor/dependencies.py 新增 get_draft_plan_id_optional 依赖
(供其他端点复用,本次未实际引用但保留供将来使用)。

PR Build API Image 的失败是 CI 基础设施 DNS 解析超时
(xiaoxia-registry.cn-hangzhou.cr.aliyuncs.com i/o timeout),
与代码无关,push 后重试即可。
2026-09-26 18:16:37 +08:00
..
2026-07-03 18:49:54 +08:00
2026-07-03 18:56:16 +08:00