-
Notifications
You must be signed in to change notification settings - Fork 253
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
Make pipelinerun logs interactive. #432
Make pipelinerun logs interactive. #432
Conversation
Hi @16yuki0702. 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 Once the patch is verified, the new status will be reflected by the 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. |
/ok-to-test |
The following is the coverage report on pkg/.
|
/retest |
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
deddb8d
to
d4e24d8
Compare
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
One comment: can you please squash the two commits into one. Thanks
690792d
to
3537d30
Compare
@piyush-garg Thank you for your review!
I squashed the pr, and added test cases 👍 |
@16yuki0702 Thanks for the update. Can you please add an interactive test case also in pkg/cmd/pipelinerun/log_test.go that will be great |
The following is the coverage report on pkg/.
|
return fmt.Errorf("No pipelineruns found") | ||
} | ||
|
||
if len(prs) == 1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test case for len(prs) == 1
?
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add explicit test cases here?
@piyush-garg @danielhelfand Thank for reviews!! |
@16yuki0702 Thanks and no rush! We appreciate how much you do for |
The following is the coverage report on pkg/.
|
@piyush-garg @danielhelfand sorry for late 😓, I added the test cases please review it in your free time! |
pkg/helper/options/logs.go
Outdated
} | ||
|
||
if err := survey.Ask(qs, &ans, opts.AskOpts); err != nil { | ||
fmt.Println(err.Error()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? Wouldn't the error be displayed via the err that is returned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for review!!
yes, you are right, I think this err will be displayed via returned.
I just tried to match other format like these.
https://github.com/tektoncd/cli/blob/master/pkg/cmd/pipeline/start.go#L231
https://github.com/tektoncd/cli/blob/master/pkg/cmd/pipeline/start.go#L273
if it no need, I want to delete other codes also!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please remove all of them. Thanks for finding the additional ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please remove all of them. Thanks for finding the additional ones.
Thanks!! I did it 👍
No worries! Just a minor note from me. Otherwise, looks good to me. |
The following is the coverage report on pkg/.
|
@16yuki0702 Thanks so much! Promise this is the last thing, and apologies for not mentioning sooner. Can you please just squash your commits? |
Extract common struct and methods to other packages to reuse. and make pipelinerun logs interactive.
ac147b5
to
ce0c2a1
Compare
oops... I'm so sorry, just squashed PR 🙏 |
The following is the coverage report on pkg/.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danielhelfand, piyush-garg, 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 |
#478 | [Daniel Helfand] adding timeout to tkn task start | 2019/11/26-10:59 #469 | [Daniel Helfand] include taskrun failure message in logs | 2019/11/26-11:54 #432 | [16yuki0702] Related issues are #263 #414 | 2019/11/27-03:16 #481 | [Vibhav Bobade] Feature: Set current kubernetes context | 2019/11/27-22:06 #481 | [Vibhav Bobade] Updated docs/man with new feature for setting kubecontext | 2019/11/27-22:06 #484 | [Chmouel Boudjnah] Add a step into the RELEASE_PROCESS documentation | 2019/11/29-08:42 #483 | [Piyush Garg] Fix failure in case of array param having single value | 2019/11/29-08:57 #485 | [Daniel Helfand] minor edits to RELEASE_PROCESS.md | 2019/11/29-09:26 #487 | [Daniel Helfand] 0.5.1 version in README | 2019/12/01-11:02 #486 | [Piyush Garg] Improve message for creating new resource in start | 2019/12/02-01:05 null | [Chmouel Boudjnah] Use serviceAccountName instead of serviceAccount | 2019/12/03-10:11 null | [Daniel Helfand] remove extra space from tr not found error | 2019/12/03-10:42 null | [16yuki0702] Making taskrun logs interactive. | 2019/12/04-09:25 null | [16yuki0702] Correcting interactive menu string and testing error messages | 2019/12/04-09:25 null | [Vincent Demeester] Add golint to the linter 🚐 | 2019/12/04-10:16 null | [Vincent Demeester] Fix golint errors 👨🍳 | 2019/12/04-10:16 null | [Piyush Garg] Bump tektoncd/pipeline to version 0.9.0 | 2019/12/04-15:12 null | [Piyush Garg] Fixes to support tekton pipeline 0.9.0 | 2019/12/04-15:12 null | [Daniel Helfand] add pipeline create command | 2019/12/05-09:10 null | [Daniel Helfand] add task create command | 2019/12/05-10:05 null | [Piyush Garg] Bump to tektoncd/pipeline 0.9.1 | 2019/12/09-05:09 null | [Daniel Helfand] add namespace check to pipeline and task create commands | 2019/12/09-08:03 null | [Daniel Helfand] add resource create -f option | 2019/12/09-11:56 null | [Chmouel Boudjnah] Add NFPM (deb/rpm) release to goreleaser | 2019/12/10-13:15 null | [Piyush Garg] Fix input params are not respected | 2019/12/11-06:02 null | [Chmouel Boudjnah] Add debian package | 2019/12/11-09:25 Signed-off-by: Daniel Helfand <[email protected]>
Changes
Related issues are #263 #414
This is a kind of suggesion PR.
To introduce interactive menu to task and taskrun logs, I did belows.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make docs
andmake man
if needed.make check
See the contribution guide
for more details.
Release Notes