-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Comments default values instead of omitting them #5007
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
Comments default values instead of omitting them #5007
Conversation
|
Hi @wgahnagl. Thanks for your PR. I'm waiting for a cri-o 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. DetailsInstructions 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. |
f5e058a to
e5127b7
Compare
Codecov Report
@@ Coverage Diff @@
## main #5007 +/- ##
==========================================
+ Coverage 43.12% 43.17% +0.05%
==========================================
Files 121 123 +2
Lines 12145 12177 +32
==========================================
+ Hits 5237 5258 +21
- Misses 6405 6415 +10
- Partials 503 504 +1 |
saschagrunert
left a comment
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.
/okt-ot-test
|
I like that one! The integration tests still do not seem to be happy, yet. |
e5127b7 to
b5f3dc9
Compare
pkg/config/template.go
Outdated
| if group == configItem.group { | ||
| if displayAll || !configItem.isDefaultValue { | ||
| if !configItem.isDefaultValue { | ||
| templateString += strings.Replace(configItem.templateString, "{{ .Comment }} ", "", 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.
I'm not seeing many cases where {{ .Comment }} is followed by a space, we may need to replace this with
strings.Replace(configItem.templateString, "{{ .Comment }}", "", 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.
also we need this to be -1 so it replaces all instances of Comment
3881326 to
c3f3408
Compare
|
@wgahnagl can you sign off your commit? |
c3f3408 to
bcf35e4
Compare
000a406 to
d8d6c73
Compare
346e8c2 to
1340787
Compare
hack/validate-config.sh
Outdated
| #!/bin/bash | ||
| output=$(grep 'Comment' pkg/config/template.go | grep -v '{{ $.Comment }}') | ||
|
|
||
| if [ -z "$output" ]; then |
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.
nit: we can compresss this without saving to $output
2c86a5f to
41ddba1
Compare
373cab0 to
aa753f4
Compare
|
😎 thanks for keeping up with this! LGTM @cri-o/cri-o-maintainers PTAL |
Makefile
Outdated
| ./hack/tree_status.sh | ||
|
|
||
| check-config-template: | ||
| ./hack/validate-config.sh` |
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.
| ./hack/validate-config.sh` | |
| ./hack/validate-config.sh |
hack/validate-config.sh
Outdated
| @@ -0,0 +1,4 @@ | |||
| #!/bin/bash | |||
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.
| #!/bin/bash | |
| #!/usr/bin/env bash |
7042e63 to
a2f07e8
Compare
Signed-off-by: Skyler Clark <[email protected]>
a2f07e8 to
d7da8b2
Compare
|
@wgahnagl: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
fidencio
left a comment
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, thanks @wgahnagl!
|
cc @saschagrunert for the final LGTM? |
saschagrunert
left a comment
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: fidencio, haircommander, saschagrunert, wgahnagl The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
What this PR does / why we need it:
changes the default crio config to print default config values as comments instead of ommitting them
Which issue(s) this PR fixes:
Fixes #4770
Special notes for your reviewer:
Does this PR introduce a user-facing change?