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

Fix version command outputting empty #1390

Merged
merged 1 commit into from
Jun 10, 2021
Merged

Conversation

06kellyjac
Copy link
Contributor

Changes

Allow tkn version to output when there's no remote tekton available

Resolves #1389

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Run the code checkers with make check
  • Regenerate the manpages, docs and go formatting with make generated
  • Commit messages follow commit message best practices

See the contribution guide
for more details.

Release Notes

Fix empty version when there's no remote tekton available

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jun 8, 2021
@tekton-robot
Copy link
Contributor

Hi @06kellyjac. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot tekton-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 8, 2021
@pradeepitm12
Copy link
Contributor

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 9, 2021
@tekton-robot
Copy link
Contributor

The following is the coverage report on the affected files.
Say /test pull-tekton-cli-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/cmd/version/version.go 65.6% 64.8% -0.7

@06kellyjac
Copy link
Contributor Author

I don't think this is related to my change but LMK if I'm wrong:

WARNING: DATA RACE
Read at 0x00c000115450 by goroutine 72:
  runtime.chansend()
      /usr/local/go/src/runtime/chan.go:158 +0x0
  github.com/tektoncd/cli/pkg/log.(*Reader).readStepsLogs()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/log/task_reader.go:132 +0x884
  github.com/tektoncd/cli/pkg/log.(*Reader).readPodLogs.func2()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/log/task_reader.go:204 +0x176

Previous write at 0x00c000115450 by goroutine 70:
  runtime.closechan()
      /usr/local/go/src/runtime/chan.go:355 +0x0
  github.com/tektoncd/cli/pkg/log.(*Reader).readPodLogs.func1()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/log/task_reader.go:180 +0xc9

Goroutine 72 (running) created at:
  github.com/tektoncd/cli/pkg/log.(*Reader).readPodLogs()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/log/task_reader.go:184 +0x171
  github.com/tektoncd/cli/pkg/log.(*Reader).readAvailableTaskLogs()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/log/task_reader.go:119 +0x2bd
  github.com/tektoncd/cli/pkg/log.(*Reader).readTaskLog()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/log/task_reader.go:58 +0x31c
  github.com/tektoncd/cli/pkg/log.(*Reader).Read()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/log/reader.go:88 +0xeb
  github.com/tektoncd/cli/pkg/cmd/taskrun.Run()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/cmd/taskrun/logs.go:109 +0xb0
  github.com/tektoncd/cli/pkg/cmd/taskrun.fetchLogs()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/cmd/taskrun/logs_test.go:3074 +0x13e
  github.com/tektoncd/cli/pkg/cmd/taskrun.TestLog_no_taskrun_arg.func1()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/cmd/taskrun/logs_test.go:208 +0x3e4
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1193 +0x202

Goroutine 70 (finished) created at:
  github.com/tektoncd/cli/pkg/log.(*Reader).readPodLogs()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/log/task_reader.go:169 +0x104
  github.com/tektoncd/cli/pkg/log.(*Reader).readAvailableTaskLogs()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/log/task_reader.go:119 +0x2bd
  github.com/tektoncd/cli/pkg/log.(*Reader).readTaskLog()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/log/task_reader.go:58 +0x31c
  github.com/tektoncd/cli/pkg/log.(*Reader).Read()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/log/reader.go:88 +0xeb
  github.com/tektoncd/cli/pkg/cmd/taskrun.Run()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/cmd/taskrun/logs.go:109 +0xb0
  github.com/tektoncd/cli/pkg/cmd/taskrun.fetchLogs()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/cmd/taskrun/logs_test.go:3074 +0x13e
  github.com/tektoncd/cli/pkg/cmd/taskrun.TestLog_no_taskrun_arg.func1()
      /home/prow/go/src/github.com/tektoncd/cli/pkg/cmd/taskrun/logs_test.go:208 +0x3e4
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1193 +0x202
==================
panic: send on closed channel

goroutine 262 [running]:
github.com/tektoncd/cli/pkg/log.(*Reader).readStepsLogs(0xc0009633f0, 0xc0001153e0, 0xc000115440, 0xc0000206b0, 0x1, 0x1, 0xc0009faec0, 0x0)
	/home/prow/go/src/github.com/tektoncd/cli/pkg/log/task_reader.go:132 +0x885
github.com/tektoncd/cli/pkg/log.(*Reader).readPodLogs.func2(0xc0001153e0, 0xc000c17200, 0xc000115380, 0xc0009633f0, 0xc000e31900, 0xc000115440)
	/home/prow/go/src/github.com/tektoncd/cli/pkg/log/task_reader.go:204 +0x177
created by github.com/tektoncd/cli/pkg/log.(*Reader).readPodLogs
	/home/prow/go/src/github.com/tektoncd/cli/pkg/log/task_reader.go:184 +0x172
FAIL	github.com/tektoncd/cli/pkg/cmd/taskrun	1.743s

@chmouel
Copy link
Member

chmouel commented Jun 9, 2021

/retest

flakyness :\

@chmouel
Copy link
Member

chmouel commented Jun 9, 2021

/lgtm

Looking Good! 🤙🏽

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 9, 2021
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 10, 2021
@tekton-robot tekton-robot merged commit 5bb16ab into tektoncd:main Jun 10, 2021
@06kellyjac 06kellyjac deleted the version branch June 10, 2021 14:05
pradeepitm12 added a commit that referenced this pull request Jun 29, 2021
#1391 | [Piyush Garg] Update readme for latest version | 2021/06/09-07:23
#1390 | [06kellyjac] Fix version command outputting empty | 2021/06/10-08:49
#1392 | [Chmouel Boudjnah] Add --since flag to pipelinerun delete | 2021/06/14-07:30
#1396 | [hasanrashid] Fix broken links in DEVELOPMENT.MD | 2021/06/18-23:20
#1400 | [Chmouel Boudjnah] Fix typo with my name | 2021/06/23-08:53
#1401 | [Christie Wilson] Add link to tkn bundle to main readme 🔗 | 2021/06/23-09:18
#1403 | [Chmouel Boudjnah] Update README about coloring being disabled | 2021/06/24-13:41
#1405 | [Pradeep Kumar] fix default --prefix=false with p/t/ct start | 2021/06/28-11:00

Signed-off-by: Pradeep Kumar <pradkuma@redhat.com>
pradeepitm12 added a commit that referenced this pull request Jun 29, 2021
#1391 | [Piyush Garg] Update readme for latest version | 2021/06/09-07:23
#1390 | [06kellyjac] Fix version command outputting empty | 2021/06/10-08:49
#1392 | [Chmouel Boudjnah] Add --since flag to pipelinerun delete | 2021/06/14-07:30
#1396 | [hasanrashid] Fix broken links in DEVELOPMENT.MD | 2021/06/18-23:20
#1400 | [Chmouel Boudjnah] Fix typo with my name | 2021/06/23-08:53
#1401 | [Christie Wilson] Add link to tkn bundle to main readme 🔗 | 2021/06/23-09:18
#1403 | [Chmouel Boudjnah] Update README about coloring being disabled | 2021/06/24-13:41
#1405 | [Pradeep Kumar] fix default --prefix=false with p/t/ct start | 2021/06/28-11:00
#1402 | [Chmouel Boudjnah] Add pipelinerun delete by label | 2021/06/29-12:09

Signed-off-by: Pradeep Kumar <pradkuma@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't view client version without remote tekton setup
5 participants