[query] when using unless op do not remove metric name#2418
[query] when using unless op do not remove metric name#2418gediminasgu wants to merge 2 commits into
Conversation
|
|
||
| # FAILING issue #35. eval instant at 50m http_requests{group="canary"} unless on(job) http_requests{instance="0"} | ||
|
|
||
| # FAILING issue #34. eval instant at 50m http_requests{group="canary"} unless on(job, instance) http_requests{instance="0"} |
There was a problem hiding this comment.
What about other #34 cases that we have? If they don't get fixed by this change, might mean that they are a different issue.
There was a problem hiding this comment.
+1, looks like we should be able to have the same fix in or.go, also looks like #23 might be solved by the same fix in and.go
arnikola
left a comment
There was a problem hiding this comment.
Looks good, worth adding similar and and or fixes?
834e25e to
99f874f
Compare
e130b7e to
3cf877e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2418 +/- ##
======================================
Coverage 71.5% 71.5%
======================================
Files 1063 1063
Lines 93410 93408 -2
======================================
+ Hits 66825 66827 +2
Misses 22093 22093
+ Partials 4492 4488 -4
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
What this PR does / why we need it:
PromQL compatibility fix.
When using
unlessoperator in the query it should not remove metric names from the result.Sample query:
http_requests{group="canary"} unless http_requests{instance="0"}The result before the fix:
{group="canary", instance="1", job="api-server"}The result after the fix:
http_requests{group="canary", instance="1", job="api-server"}Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing and/or backwards incompatible change?:
Does this PR require updating code package or user-facing documentation?: