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
nixos/prometheus: add checkConfig #73534
nixos/prometheus: add checkConfig #73534
Conversation
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 can see the rationale for this change. My concern is that adding an option is a maintenance burden. Is there precedent for having options to disable validation?
I didn't see much with a quick grep. I only really found |
I agree it's nicer. If we do choose to add a new option (which I'm still unsure of), perhaps it'd be better phrased as:
I think this is easier to read, since it's shorter and phrased positively. If we did that, I don't think we should call promtool if checkConfig = false, since:
Users who want promtool checking, but have to disable it because it doesn't quite work for them should continue to work with upstream on resolving prometheus/prometheus#5222 . |
Workaround for prometheus/prometheus#5222
233246f
to
d32c0a5
Compare
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.
Pro: Disabling validation is a necessary evil at times. The "password file is not visible at CI time" is such an example. I get the impression there's a missing abstraction with NixOS for user-configurable validation, but for the moment an all-or-nothing approach is fine.
Con: It's another option, and thus a maintenance burden.
LGTM, but we should evaluate whether to remove the option is prometheus/prometheus#6488 is accepted. |
Workaround for prometheus/prometheus#5222
Motivation for this change
As is, it's not possible to use options like
password_file
that refer to locations outside of the sandbox.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @