From 280a81c8553c9dfa3e04e1cc0dd56daefe025b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E7=AB=A0=E6=B5=A9?= Date: Thu, 8 Oct 2026 17:15:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(api):=20=E6=89=A7=E8=A1=8C=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=BF=94=E5=9B=9E=E6=89=B9=E6=AC=A1=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=8C=E4=BF=AE=E5=A4=8D=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E5=88=97=E8=A1=A8=E8=A7=A3=E6=9E=90=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /safeReleaseExecution 没带 batch_size/current_batch/total_batches,而前端 parseReleaseExecution 要求这三个计数,任何一条执行记录都会让整个列表抛 'invalid release execution',页面因此看不到执行历史与回滚/重排按钮,门禁 状态也一并回落到'已锁定'。补上这三个非敏感进度字段。 --- internal/httpapi/server.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/httpapi/server.go b/internal/httpapi/server.go index dfe6907..9dc12d8 100644 --- a/internal/httpapi/server.go +++ b/internal/httpapi/server.go @@ -1873,8 +1873,10 @@ func safeReleaseExecution(execution governance.ReleaseExecution) map[string]any "operation": execution.Operation, "prior_execution_id": execution.PriorExecutionID, "state": execution.State, "target_environment": execution.TargetEnvironment, "authorized_by": execution.AuthorizedBy, "job_id": execution.JobID, - "item_count": execution.ItemCount, "completed_item_count": execution.CompletedItemCount, - "failed_item_count": execution.FailedItemCount, "error_code": execution.ErrorCode, + "item_count": execution.ItemCount, "batch_size": execution.BatchSize, + "current_batch": execution.CurrentBatch, "total_batches": execution.TotalBatches, + "completed_item_count": execution.CompletedItemCount, + "failed_item_count": execution.FailedItemCount, "error_code": execution.ErrorCode, "failure_level": execution.FailureLevel, "restore_trigger": execution.RestoreTrigger, "release_change_set_id": execution.ReleaseChangeSetID, "created_at": execution.CreatedAt, "started_at": execution.StartedAt, "completed_at": execution.CompletedAt,