From e6ce61368ebc3cdfd612161fc1e7f08dab8f32c2 Mon Sep 17 00:00:00 2001 From: "lilong.129" Date: Mon, 23 Jun 2025 21:42:09 +0800 Subject: [PATCH] fix: enhance step log retrieval with prefix matching for parameterized steps --- internal/version/VERSION | 2 +- report.go | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/internal/version/VERSION b/internal/version/VERSION index d2798a2a..356259f9 100644 --- a/internal/version/VERSION +++ b/internal/version/VERSION @@ -1 +1 @@ -v5.0.0-beta-2506232134 +v5.0.0-beta-2506232142 diff --git a/report.go b/report.go index eb27c714..4d411386 100644 --- a/report.go +++ b/report.go @@ -221,8 +221,9 @@ func (g *HTMLReportGenerator) getStepLogs(stepName string, startTime int64, elap for _, logEntry := range g.LogData { // Check for step boundaries to control inclusion if logEntry.Message == RUN_STEP_START { - if stepFieldValue, exists := logEntry.Fields["step"]; exists { - if stepFieldValue == stepName { + if stepFieldValue, exists := logEntry.Fields["step"].(string); exists { + // use prefix matching for parameterized steps + if strings.HasPrefix(stepName, stepFieldValue) { inCurrentStep = true stepLogs = append(stepLogs, logEntry) continue @@ -234,8 +235,9 @@ func (g *HTMLReportGenerator) getStepLogs(stepName string, startTime int64, elap } if logEntry.Message == RUN_STEP_END { - if stepFieldValue, exists := logEntry.Fields["step"]; exists { - if stepFieldValue == stepName { + if stepFieldValue, exists := logEntry.Fields["step"].(string); exists { + // use prefix matching for parameterized steps + if strings.HasPrefix(stepName, stepFieldValue) { stepLogs = append(stepLogs, logEntry) inCurrentStep = false continue