Skip to content

fix(alerts): keep diagnostic emptiness a vector - #383

Merged
rldyourmnd merged 1 commit into
mainfrom
fix/diagnostic-alert-empty-window
Sep 2, 2026
Merged

fix(alerts): keep diagnostic emptiness a vector#383
rldyourmnd merged 1 commit into
mainfrom
fix/diagnostic-alert-empty-window

Conversation

@rldyourmnd

Copy link
Copy Markdown
Contributor

OpenObserve v1 exposed a latent rule-shape defect: in an empty window, max by (...) produced a scalar before the sustained range subquery, and the engine correctly rejected it with error 20008 (expected matrix, got scalar). The diagnostic exporter already emits one host-labelled series, so the aggregation was redundant.

Keep the source vector intact and assert the exact rendered sustained expression.

Verification:

  • go test ./internal/observabilityrules
  • make verify
  • live reconcile against OpenObserve v1.0.0-rc1: diagnostic_export_failure now has last_outcome=normal, level=ok, groups_firing=0

OpenObserve v1 correctly rejects the sustained diagnostic expression when an empty max-by aggregation becomes a scalar before its range subquery. The metric already has exactly one host-labelled series, so preserve that vector and assert the rendered rule shape.
@rldyourmnd
rldyourmnd merged commit e90dc00 into main Sep 2, 2026
10 checks passed
@rldyourmnd
rldyourmnd deleted the fix/diagnostic-alert-empty-window branch September 2, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant