tektoncd / tektoncd/cli

Show TaskRun logs from child PipelineRuns (Pipelines-in-Pipelines)

Open
#2,886 5 comments 0 reactions 1 assignee View on GitHub

@kamal2730 is already working on this.

Since May 26, 2026.

good first issue help wanted kind/feature
Dominant language
Go
Stars
461
Forks
277
Avg merge
16h 48m
Merged PRs (30d)
95

Description

Feature request

tkn pipelinerun logs does not follow child PipelineRuns created by the Pipelines-in-Pipelines (PinP) feature. When a PipelineTask uses pipelineSpec or pipelineRef, the parent PipelineRun owns a child PipelineRun, not a TaskRun. tkn pipelinerun logs only discovers TaskRuns, so TaskRuns inside child PipelineRuns are invisible.

Inline pipelineSpec is already functional today, and tektoncd/pipeline#9432 adds pipelineRef support, making PinP a fully functional alpha feature (TEP-0056). In both cases, tkn cannot surface the child PipelineRun TaskRun logs.

Use case

Apply the following resources (enable-api-fields must be set to alpha):

apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
  name: parent-pipeline
spec:
  tasks:
    - name: call-child
      pipelineSpec:
        tasks:
          - name: greet
            taskSpec:
              steps:
                - name: echo
                  image: busybox
                  script: echo "Hello from child"
---
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  name: parent-run
spec:
  pipelineRef:
    name: parent-pipeline
kubectl apply -f example.yaml

Wait for it to complete, then try to view logs:

# Shows nothing. The parent has no TaskRuns, only a child PipelineRun.
$ tkn pipelinerun logs parent-run -f

# User must manually discover the child PipelineRun name.
$ kubectl get pipelineruns
NAME                    SUCCEEDED
parent-run              True
parent-run-call-child   True

# Then query the child separately to see its TaskRun logs.
$ tkn pipelinerun logs parent-run-call-child -f
[greet : echo] Hello from child

This applies recursively. Nested pipelines (parent, child, grandchild) require one manual command per level. The same issue affects pipelineRef-based PinP.

UI Example

tkn pipelinerun logs should recursively follow child PipelineRuns and show their TaskRun logs inline:

$ tkn pipelinerun logs parent-run -f
[call-child > greet : echo] Hello from child

The > notation indicates nesting: call-child > greet means task greet inside child PipelineRun call-child.

tkn pipelinerun describe should similarly surface child PipelineRuns in its output.

/kind feature

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.