From 0b6ad4efbc1f65feadeb94501d647b73a230c83b Mon Sep 17 00:00:00 2001 From: Codex Date: Tue, 14 Jul 2026 19:44:39 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86=20PikaOA=20=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E5=A5=91=E7=BA=A6=E6=A0=A1=E9=AA=8C=E9=99=8D=E7=BA=A7=E4=B8=BA?= =?UTF-8?q?=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/src/pikaoa-test-target.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/src/pikaoa-test-target.ts b/scripts/src/pikaoa-test-target.ts index be23640c..f7180220 100644 --- a/scripts/src/pikaoa-test-target.ts +++ b/scripts/src/pikaoa-test-target.ts @@ -351,9 +351,6 @@ function parseTarget(id: string, root: Record, configLabel: str workerReadinessPath: httpPath(workerProbes.readinessPath, `${path}.probes.worker.readinessPath`), }, }; - if (!target.migration.command.includes("migrate") || !target.migration.command.includes("up")) { - throw new Error(`${path}.migration.command 必须显式调用产品 migrate up`); - } const secretKeys = secretSources(target).map((item) => item.targetKey); if (new Set(secretKeys).size !== secretKeys.length || secretKeys.includes("pikaoa.yaml")) { throw new Error(`${path} 的 Secret targetKey 必须唯一且不能使用 pikaoa.yaml`); @@ -561,6 +558,7 @@ function safetyBlockers(options: TestTargetOptions, selection: Selection, contex function consistencyWarnings(target: TestTargetSpec, context: RenderContext | null): Warning[] { const warnings: Warning[] = []; + if (!target.migration.command.includes("migrate") || !target.migration.command.includes("up")) warnings.push(warning("migration-command-unrecognized", "迁移命令未显示产品 migrate up;配置一致性只报告 warning。")); if (!target.source.apiImage.includes("${commit}") || !target.source.workerImage.includes("${commit}") || !target.source.migrationImage.includes("${commit}")) warnings.push(warning("image-template-not-commit-scoped", "API、Worker 或迁移镜像模板未包含 ${commit};版本一致性只报告 warning。")); if (context !== null && (!context.apiImage.includes(context.commit) || !context.workerImage.includes(context.commit) || !context.migrationImage.includes(context.commit))) warnings.push(warning("image-commit-not-visible", "渲染镜像引用未显示选中 commit;该漂移不阻塞当前 MVP。")); if (target.observability.exporterWarning) warnings.push(warning("otel-exporter-warning-only", "OTel exporter 失败按 owning YAML 仅报告 warning,不阻塞业务运行。"));