prometheus icon indicating copy to clipboard operation
prometheus copied to clipboard

promtool: Buffer piped unit test rule input to a tempfile

Open dgl opened this issue 3 months ago • 6 comments

Fixes #13785.

dgl avatar Mar 18 '24 13:03 dgl

I haven't checked the PR yet, but hopefully it'll close https://github.com/prometheus/prometheus/issues/6222 as well.

machine424 avatar Mar 18 '24 13:03 machine424

@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.

dgl avatar Mar 18 '24 13:03 dgl

I read test rules instead of check rules, my bad.

machine424 avatar Mar 18 '24 13:03 machine424

Thanks, updated.

Should we mention this in the docs

Yes, I've added a bit to the docs.

dgl avatar Mar 21 '24 16:03 dgl

I think this is not a good fix. The fix should be to read the file once and not making exceptions for pipes etc .

roidelapluie avatar Mar 22 '24 11:03 roidelapluie

Hello from the bug-scrub: @dgl do you have any further thoughts?

bboreham avatar May 14 '24 11:05 bboreham