Skip to content

Log deletions at INFO level instead of DEBUG #283

@vdemeester

Description

@vdemeester

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions