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

Prettify printing of webhook warnings #1353

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

markusthoemmes
Copy link
Contributor

Description

Adds a proper warning printer to have warnings being printed in a similar format as "other messages". Color could be easily supported but it seemed like kn doesn't color in general. Let me know if that aint the case.

Changes

Output before:

W0624 13:35:20.413073  372781 warnings.go:70] This is a test!
Replacing service 'foo' in namespace 'default':
...

Output after:

Warning: This is a test!
Replacing service 'foo' in namespace 'default':
...

Reference

Fixes #1350

@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Jun 24, 2021
@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 24, 2021
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markusthoemmes: 0 warnings.

In response to this:

Description

Adds a proper warning printer to have warnings being printed in a similar format as "other messages". Color could be easily supported but it seemed like kn doesn't color in general. Let me know if that aint the case.

Changes

Output before:

W0624 13:35:20.413073  372781 warnings.go:70] This is a test!
Replacing service 'foo' in namespace 'default':
...

Output after:

Warning: This is a test!
Replacing service 'foo' in namespace 'default':
...

Reference

Fixes #1350

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.

@knative-prow-robot knative-prow-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 24, 2021
@knative-prow-robot knative-prow-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 24, 2021
@markusthoemmes
Copy link
Contributor Author

/assign @rhuss @dsimansk

@codecov
Copy link

codecov bot commented Jun 24, 2021

Codecov Report

Merging #1353 (b54c584) into main (46297a7) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1353      +/-   ##
==========================================
- Coverage   72.96%   72.94%   -0.03%     
==========================================
  Files         160      160              
  Lines        8083     8086       +3     
==========================================
  Hits         5898     5898              
- Misses       1463     1466       +3     
  Partials      722      722              
Impacted Files Coverage Δ
cmd/kn/main.go 40.00% <0.00%> (-60.00%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 46297a7...b54c584. Read the comment docs.

@knative-metrics-robot
Copy link

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

File Old Coverage New Coverage Delta
cmd/kn/main.go 75.7% 74.6% -1.1

Copy link
Contributor

@rhuss rhuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks !

Looks good to me, but not sure how make codecov happy. I don't think codecov is a mandatory check, so lets try to merge it.

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: markusthoemmes, rhuss

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:
  • OWNERS [markusthoemmes,rhuss]

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

@knative-prow-robot knative-prow-robot merged commit 95dc71c into knative:main Jun 24, 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. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate Kubernetes warnings support
5 participants