Skip to content

tkn-results CLI: failed to get log: client error: Failed to stream logs err: pipelinerun not supported #1180

@enarha

Description

@enarha

Expected Behavior

return pipelinerun logs

Actual Behavior

Error: failed to copy logs: failed to get log: client error: Failed to stream logs err: pipelinerun not supported, please use taskrun
(code: 500)
Usage:
tkn-results pipelinerun logs [pipelinerun-name] [flags]

Examples:
Get logs for a PipelineRun named 'foo' in the current namespace:
tkn-results pipelinerun logs foo

Get logs for a PipelineRun in a specific namespace:
tkn-results pipelinerun logs foo -n my-namespace

Get logs for a PipelineRun by UID if there are multiple PipelineRuns with the same name:
tkn-results pipelinerun logs --uid 12345678-1234-1234-1234-1234567890ab

Steps to Reproduce the Problem

Additional Info

I can understand if showing logs for pipelinerun is not supported and users have to first get the list of taskruns and then pull the logs for each taskrun. But the CLI help message is confusing because it gives examples for pulling logs for pipelinerun as seen above.
Generally it should be possible to pull the logs for all taskruns for a pipelinerun, so ideally support for that is added. If not, then the CLI help message should not show examples of pulling logs for pipelinerun.

  • Kubernetes version:

    Output of kubectl version:

    (paste your output here)
    
  • 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}'

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