Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The command to fetch the logs for a failed step can be broken in two #2221

Closed
afrittoli opened this issue Mar 13, 2020 · 4 comments · Fixed by #2303
Closed

The command to fetch the logs for a failed step can be broken in two #2221

afrittoli opened this issue Mar 13, 2020 · 4 comments · Fixed by #2303
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@afrittoli
Copy link
Member

afrittoli commented Mar 13, 2020

Expected Behavior

It should be possible to copy/paste in one go the command to fetch a failed test logs from the status of a taskrun

Actual Behavior

When the pod name is long enough (typically when the task runs within a pipeline) the command is broken into two lines, which makes it impossible to copy/paste in one go:

        - lastTransitionTime: "2020-02-10T13:16:59Z"
          message: '"step-image-digest-exporter-bhdb6" exited with code 1 (image:
            "docker-pullable://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/imagedigestexporter@sha256:1cf3f27f3ff7c73782d8a65853e8fc7f0d4aafc6443893e0150bdbe614a9169d");
            for logs run: kubectl -n default logs triggers-release-nightly-sk54v-publish-images-9fpzt-pod-8wcvh
            -c step-image-digest-exporter-bhdb6'

Steps to Reproduce the Problem

  1. Run the TaskRun in this gist

Additional Info

The issue does not happen with the JSON output, so it seems to be specific to the YAML formatter:

        "conditions": [
            {
                "lastTransitionTime": "2020-03-13T11:20:41Z",
                "message": "\"step-fail\" exited with code 1 (image: \"docker.io/library/busybox@sha256:b26cd013274a657b86e706210ddd5cc1f82f50155791199d29b9e86e935ce135\"); for logs run: kubectl -n default logs a-task-to-reproduce-tekton-pipelines-issue-2029-lpdpk-pod-scpn9 -c step-fail",
                "reason": "Failed",
                "status": "False",
                "type": "Succeeded"
            }
        ],
  • Kubernetes version:

    Output of kubectl version:

Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T23:41:55Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.10+IKS", GitCommit:"de009843b60976afddffbb5bc01eec7a67de556f", GitTreeState:"clean", BuildDate:"2020-02-13T06:08:47Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}
  • Tekton Pipeline version:

    Output of tkn version

Client version: 0.8.0
Pipeline version: v0.10.1
@afrittoli afrittoli changed the title The helper message to fetch a failed step logs is broken in two for long pod names The command to fetch the logs for a failed step can be broken in two Mar 13, 2020
@afrittoli
Copy link
Member Author

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 13, 2020
@afrittoli
Copy link
Member Author

/priority backlog

@tekton-robot tekton-robot added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Mar 13, 2020
@afrittoli afrittoli added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Mar 13, 2020
@waveywaves
Copy link
Member

/assign

@bigkevmcd
Copy link
Member

I'm pretty sure that this is caused by go-yaml/yaml#387

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants