tektoncd / tektoncd/cli

Different log output for `tkn t logs` and `tkn tr logs`

Open
#2,234 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug
Dominant language
Go
Stars
461
Forks
277
Avg merge
16h 48m
Merged PRs (30d)
95

Description

Versions and Operating System

  • Kubernetes version:

Output of tkn version

Client Version: v1.25.0
Kustomize Version: v4.5.7
Server Version: v1.26.1

  • Tekton Pipeline version:

    Output of tkn version or kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'

     Client version: 0.33.0
     Pipeline version: v0.56.0
     Triggers version: v0.25.3
    
    
  • Operating System:

     Fedora release 37
    

Expected Behavior

Running tkn t log and tkn tr log gives a different representation but they are expected to be the same.

Actual Behavior

$ tkn t ls
NAME         DESCRIPTION   AGE
echo-task                  33 minutes ago
print-task                 33 minutes ago

$ tkn tr ls
NAME                           STARTED          DURATION   STATUS
echo-pipeline-run-echo-task    33 minutes ago   5s         Succeeded
echo-pipeline-run-print-task   33 minutes ago   7s         Succeeded

$ tkn t logs
? Select task: echo-task
Hello, Tekton!

$ tkn tr logs
? Select taskrun: echo-pipeline-run-echo-task started 34 minutes ago
[echo] Hello, Tekton!

Steps to Reproduce the Problem

  1. Create sample Task and Taskrun YAML files.
  2. Run tkn t logs.
  3. Run tkn tr logs
  4. Compare both.

Additional Info

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.

Research direction

Reproduce the behavior with tkn t logs and tkn tr logs using the sample Task and TaskRun YAML files described in the issue. Trace the two CLI log entry points and compare their selection prompts and output formatting; done means both commands present the same log representation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.