fix(acceptance): 完善跨版本验收状态收口
生产流量处于旧失败验收 Run 的 validation 状态时,允许新验收接管任意已验证的 Git 祖先 release,而非仅允许 release manifest 的直接 base;仍保留 Run 状态、镜像 digest、revision 与当前集群 release CAS 校验。\n\n允许 pending Run 在激活前异常时直接标记为 failed,避免验收工具在 CAS 或网络错误后遗留无法结束的 Run。新增祖先关系脚本测试及临时 PostgreSQL 集成验证。\n\n验证:Go 全量测试、go vet、临时 PostgreSQL 集成测试、bash -n、ShellCheck、manual-release-test。
This commit is contained in:
@@ -266,6 +266,11 @@ WHERE (
|
||||
id = $1::uuid
|
||||
AND status = 'running'
|
||||
)
|
||||
OR (
|
||||
id = $1::uuid
|
||||
AND $2::text = 'failed'
|
||||
AND status = 'pending'
|
||||
)
|
||||
OR (
|
||||
id = $1::uuid
|
||||
AND $2::text = 'failed'
|
||||
|
||||
@@ -56,6 +56,11 @@ WHERE setting_key = $1`, SystemSettingGatewayTrafficMode)
|
||||
if strings.Contains(string(encoded), token) {
|
||||
t.Fatal("acceptance run response exposed the raw token")
|
||||
}
|
||||
if failed, err := db.FinishAcceptanceRun(ctx, FinishAcceptanceRunInput{
|
||||
RunID: run.ID, Passed: false, FailureReason: "pre-activation gate failed",
|
||||
}); err != nil || failed.Status != "failed" {
|
||||
t.Fatalf("finish pending acceptance run after pre-activation failure=%+v err=%v", failed, err)
|
||||
}
|
||||
mode, err := db.ActivateAcceptanceRun(ctx, run.ID)
|
||||
if err != nil {
|
||||
t.Fatalf("activate acceptance run: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user