tektoncd / tektoncd/pruner

Log deletions at INFO level instead of DEBUG

Open
#283 0 comments 1 reaction 1 assignee View on GitHub

@infernus01 is already working on this.

Since May 19, 2026.

kind/bug
Dominant language
Go
Stars
6
Forks
19
Avg merge
12h 36m
Merged PRs (30d)
27

Description

Problem

When the pruner deletes resources (PipelineRuns/TaskRuns), it logs at DEBUG level (Debugw):

  • pkg/config/history_limiter.go:389logger.Debugw("deleting resource", ...)
  • pkg/config/history_limiter.go:87logger.Debugw("resource is in deletion state", ...)

With the default INFO log level, operators cannot tell whether the pruner is actually deleting anything without manually counting resources. The only logs visible are Reconcile succeeded from the knative controller framework — which appear whether resources were deleted or not.

Impact

On the Tekton dogfooding cluster, we had 220 PVCs accumulating (215 orphaned) and could not tell from pruner logs whether it was working. We had to manually count PipelineRuns per namespace to verify.

Proposed fix

Change deletion-related log lines from Debugw to Infow. Resource deletions are important operational events and should be visible at the default log level.

At minimum, line 389 in history_limiter.go should be Infow:

logger.Infow("deleting resource",
    "resource", hl.resourceFn.Type(),
    "namespace", resource.GetNamespace(),
    "name", resource.GetName(),
)

/kind bug

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.