-
Notifications
You must be signed in to change notification settings - Fork 28
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
Config option to disable warnings #313
Conversation
Thanks for submitting this, this is actually something I also had in mind already. My only note is that for a permanent config option, I think I’d like to make it so that the warnings can be controlled more fine-granularly, i.e. by warning type. I’m worried that it may be too broad a setting otherwise. I’m thinking along the lines of: # Only disable warnings about overlapping time ranges
no_warn = OVERLAPPING_RANGES # Disable multiple warnings
no_warn = OVERLAPPING_RANGES, FUTURE_RECORDS (There are 4 types of warnings right now.) In case you are motivated to continue working on this, please feel free to do so. I’m otherwise also happy to take over this branch, either at this point or at a later stage. |
Alright I've got it shimmed now. Few questions. Right now I'm using the all caps snake case OVERLAPPED_RANGE for the config entries, then standardizing them with
I also have the application panic on invalid configs here if the typed in warning doesn't exist (or I can coerce it into an existing checker:
|
Want it as is or should I reverse translate the config for |
Awesome, this looks great! I’ll check it out this week.
I’m not sure I follow, can you clarify? |
I’ve pushed a few changes:
Could you look over the changes again, and – maybe more importantly –, briefly test them out on your end? I think we’d be good to go then. Regarding the errors: currently, klog errors out for any config value that is invalid, so by doing the same here we’d be in line with the existing behaviour. |
Looks good here. I debated the 🚢 🚢 |
While I had the |
Ah I see! Yeah, I agree it’s better to be strict with the casing, it’s also that way for the other config properties. |
My use case ends up with a lot of overlapping entries as I tag a certain timeperiod multiple times and instead of passing --no-warn each time I would like to just throw this into a configurable and be done with it.
klog config
calls