Convert PromQL test files to new syntax using strict migration mode
Continuation of https://github.com/prometheus/prometheus/pull/16562/
FTR: We'll have a detailed look here once #16562 is merged.
Now this needs a rebase.
As hinted at before, I think the strict mode is in most cases too strict. Many tests don't care if there is an annotation or not. They are testing something else.
Now that eval is more tolerant, we should actually make use of it.
I think a better strategy is to do the conversion with the basic mode (in one commit) and then (in a separate commit) make those tests stricter where we are actively interested in testing the presence or absence of certain annotations.
First commit contains changes via the script using basic mode. The second commit introduces minor adjustments to the test files:
- Decided to retain
expect info&expect warnstatements for tests involving mixed histograms and floats. - Explicitly added
expect no_info&expect no_warnin tests producing no results. - Removed
expect infofrom a test case where the metric name does not end with_total, as the test seems to focus on comparing value and not presence of annotation. - No changes to tests having
expect failorexpect warn
The changes in the second commit were minimal, based on my understanding @beorn7 please review it when you have time, thanks !
cc @NeerajGartia21
Apologies for the delay here—got caught up with work and personal life. I've addressed the comments now, please take a look. Thanks for your patience!