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

feat: make fmt.FPrintln instead of klog while printing error message #719

Merged
merged 1 commit into from
Oct 14, 2021

Conversation

developer-guy
Copy link
Contributor

Signed-off-by: Batuhan Apaydın batuhan.apaydin@trendyol.com

Fixes #717
Related issue: #717

Screen Shot 2021-09-26 at 11 14 37

cc: @Dentrax @erkanzileli

@k8s-ci-robot
Copy link
Contributor

Welcome @developer-guy!

It looks like this is your first PR to kubernetes-sigs/krew 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/krew has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 26, 2021
cmd/krew/cmd/root.go Outdated Show resolved Hide resolved
@corneliusweig
Copy link
Contributor

As far as I understand, @developer-guy you agree that keeping klog here is the better choice, right? If not, please reopen.
/close

@k8s-ci-robot
Copy link
Contributor

@corneliusweig: Closed this PR.

In response to this:

As far as I understand, @developer-guy you agree that keeping klog here is the better choice, right? If not, please reopen.
/close

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.

@developer-guy
Copy link
Contributor Author

hi @corneliusweig, yes but just for printing the stack trace of the error like ahmetb said, fmt package would be ok for the other one.

@developer-guy
Copy link
Contributor Author

@corneliusweig how can I re-open it?

@developer-guy
Copy link
Contributor Author

/reopen

@k8s-ci-robot k8s-ci-robot reopened this Sep 27, 2021
@k8s-ci-robot
Copy link
Contributor

@developer-guy: Reopened this PR.

In response to this:

/reopen

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.

@ahmetb
Copy link
Member

ahmetb commented Sep 27, 2021

@corneliusweig I think for the user-visible message at -v=0 we can print without klog.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 27, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahmetb, developer-guy

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 27, 2021
@developer-guy
Copy link
Contributor Author

sorry for the ping @corneliusweig but can you please tell me what can I do for completing this issue? Because I think it is ready to merge, isn't it?

@ahmetb
Copy link
Member

ahmetb commented Oct 13, 2021

/retest
for some reason the tests are failing

@developer-guy
Copy link
Contributor Author

I'm not sure that it can help but tests are passing on my machine.
Screen Shot 2021-10-13 at 21 15 43

@ahmetb
Copy link
Member

ahmetb commented Oct 13, 2021

hack/run-integration-tests.sh is what's failing. Can be relevant since those tests check output.

@ahmetb
Copy link
Member

ahmetb commented Oct 13, 2021

I think the tests are failing because fmt.Print does not cause the process to exit with a non-zero status code :)

Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 14, 2021
@developer-guy
Copy link
Contributor Author

I think the tests are failing because fmt.Print does not cause the process to exit with a non-zero status code :)

thank you so much, I added a new line to make it exit with a non-zero status code.

@ahmetb
Copy link
Member

ahmetb commented Oct 14, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 14, 2021
@k8s-ci-robot k8s-ci-robot merged commit 21e4fc7 into kubernetes-sigs:master Oct 14, 2021
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

[Bug]: additional information within the error message which might not be helpful to the users
4 participants