From 97ffba221369c2ee4f4e18ef7d99b715e8d230a8 Mon Sep 17 00:00:00 2001 From: JeromeJu Date: Tue, 16 Jan 2024 23:16:15 +0000 Subject: [PATCH] Error sweep: fix error messages for timing out Runs This commit fixes the user facing error messages for timing out Runs as well as the controller logs. /kind misc --- pkg/reconciler/pipelinerun/timeout.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/reconciler/pipelinerun/timeout.go b/pkg/reconciler/pipelinerun/timeout.go index eb76d8bda5d..32a1da8ae7d 100644 --- a/pkg/reconciler/pipelinerun/timeout.go +++ b/pkg/reconciler/pipelinerun/timeout.go @@ -110,19 +110,19 @@ func timeoutPipelineTasksForTaskNames(ctx context.Context, logger *zap.SugaredLo } for _, taskRunName := range trNames { - logger.Infof("cancelling TaskRun %s for timeout", taskRunName) + logger.Infof("patching TaskRun %s for timeout", taskRunName) if _, err := clientSet.TektonV1().TaskRuns(pr.Namespace).Patch(ctx, taskRunName, types.JSONPatchType, timeoutTaskRunPatchBytes, metav1.PatchOptions{}, ""); err != nil { - errs = append(errs, fmt.Errorf("failed to patch TaskRun `%s` with cancellation: %w", taskRunName, err).Error()) + errs = append(errs, fmt.Errorf("failed to patch TaskRun `%s` with timeout: %w", taskRunName, err).Error()) continue } } for _, custonRunName := range customRunNames { - logger.Infof("cancelling CustomRun %s for timeout", custonRunName) + logger.Infof("patching CustomRun %s for timeout", custonRunName) if err := timeoutCustomRun(ctx, custonRunName, pr.Namespace, clientSet); err != nil { - errs = append(errs, fmt.Errorf("failed to patch CustomRun `%s` with cancellation: %w", custonRunName, err).Error()) + errs = append(errs, fmt.Errorf("failed to patch CustomRun `%s` with timeout: %w", custonRunName, err).Error()) continue } }