prometheus
prometheus copied to clipboard
promtool: Buffer piped unit test rule input to a tempfile
Fixes #13785.
I haven't checked the PR yet, but hopefully it'll close https://github.com/prometheus/prometheus/issues/6222 as well.
@machine424 this one is specific to test rules
. It's not quite the same as that issue, as it's allowing referencing "/dev/stdin" in the test data itself, rather than whether no file argument implies an implicit stdin.
I read test rules
instead of check rules
, my bad.
Thanks, updated.
Should we mention this in the docs
Yes, I've added a bit to the docs.
I think this is not a good fix. The fix should be to read the file once and not making exceptions for pipes etc .
Hello from the bug-scrub: @dgl do you have any further thoughts?