From 2c55953124d2fe3b3aab511adff8e1c30e2a7c3f Mon Sep 17 00:00:00 2001 From: Winter Date: Sat, 9 Aug 2025 19:07:58 -0400 Subject: [PATCH] knotserver: always show pipeline errors Change-Id: oxnqrpomulvwrqmoqrrxpwvpozkmoyry IMO, we shouldn't make errors opt-in to actually show upon push, at least not if/until we have a UI to show them to the user. Signed-off-by: Winter --- knotserver/internal.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/knotserver/internal.go b/knotserver/internal.go index 8fb0bc4..5bd36fa 100644 --- a/knotserver/internal.go +++ b/knotserver/internal.go @@ -245,22 +245,22 @@ func (h *InternalHandle) triggerPipeline(clientMsgs *[]string, line git.PostRece return err } - if pushOptions.verboseCi { - hasDiagnostics := false - if len(pipelineParseErrors) > 0 { - hasDiagnostics = true - *clientMsgs = append(*clientMsgs, "error: failed to parse workflow(s):") - for _, error := range pipelineParseErrors { - *clientMsgs = append(*clientMsgs, error) - } + hasDiagnostics := false + if len(pipelineParseErrors) > 0 { + hasDiagnostics = true + *clientMsgs = append(*clientMsgs, "error: failed to parse workflow(s):") + for _, error := range pipelineParseErrors { + *clientMsgs = append(*clientMsgs, error) } - if len(compiler.Diagnostics.Errors) > 0 { - hasDiagnostics = true - *clientMsgs = append(*clientMsgs, "error(s) on pipeline:") - for _, error := range compiler.Diagnostics.Errors { - *clientMsgs = append(*clientMsgs, fmt.Sprintf("- %s:", error)) - } + } + if len(compiler.Diagnostics.Errors) > 0 { + hasDiagnostics = true + *clientMsgs = append(*clientMsgs, "error(s) on pipeline:") + for _, error := range compiler.Diagnostics.Errors { + *clientMsgs = append(*clientMsgs, fmt.Sprintf("- %s:", error)) } + } + if pushOptions.verboseCi { if len(compiler.Diagnostics.Warnings) > 0 { hasDiagnostics = true *clientMsgs = append(*clientMsgs, "warning(s) on pipeline:") -- 2.43.0