From dec6fa8ee51c2d8600ceb6cd47a6bdca7c327401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=BE=BE?= Date: Sat, 10 Aug 2024 19:59:10 +0800 Subject: [PATCH] fix: optimise workflow node status offload with compression and fallback and db stability, small fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘达 --- workflow/packer/packer.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/workflow/packer/packer.go b/workflow/packer/packer.go index 74c6b18f56fd..47da6fb44729 100644 --- a/workflow/packer/packer.go +++ b/workflow/packer/packer.go @@ -108,15 +108,15 @@ func compressWorkflow(wf *wfv1.Workflow) error { return err } if large { - compressedSize, err1 := getSize(wf) - nodesSize, err2 := getNodeStatusSize(wf) wf.Status.CompressedNodes = "" wf.Status.Nodes = nodes - if err1 != nil { + compressedSize, err := getSize(wf) + if err != nil { return err } - if err2 != nil { - return err2 + nodesSize, err := getNodeStatusSize(wf) + if err != nil { + return err } return fmt.Errorf("%s compressed size %d > maxSize %d or node status size %d > maxNodeStatusSize %d", tooLarge, compressedSize, getMaxWorkflowSize(), nodesSize, getMaxNodeStatusSize())