Fix `fialed to watch` context canceled error when streaming logs by pratap0007 · Pull Request #2681 · tektoncd/cli

@tekton-robot added the release-note

Denotes a PR that will be considered when it comes time to generate release notes.

label

Dec 9, 2025

@tekton-robot tekton-robot added the size/M

Denotes a PR that changes 30-99 lines, ignoring generated files.

label

Dec 9, 2025

divyansh42

@pratap0007

When streaming pipelineRun or taskRun logs, closing the stop channel
to terminate the informer was causing "Failed to watch" error messages
to be logged with "context canceled".

This patch add custom watchErrorHandler function that filter out context.Canceled
errors while passing other errors to the default handler. This prevents the error
log messages when the CLI intentionally stops watching after a run completes.

Signed-off-by: Shiv Verma <shverma@redhat.com>

vdemeester

@tekton-robot tekton-robot added the approved

Indicates a PR has been approved by an approver from all required OWNERS files.

label

Jan 15, 2026