Repository navigation
test(monitoring): evaluate panel queries on fixture series - #4953
Merged
Merged
Conversation
Evaluate the queries of the Grafana dashboard panels on fixture series with the pinned promtool. A case names the panel title, the target refId, the query and the values of the Grafana variables. The test replaces the variables as Grafana does and runs promtool once for each dashboard. A second test fails when a case query is not the current query of its panel target. The promtool run of the alerting tests moves to tests/support/promtool.py.
Owner
Author
|
Checks and measurements of this change (devcontainer, promtool 3.15.1, the version of
This is a test change, not a fix, so it has no No live step and no owner step: the change adds tests, a fixture and a document only. CI already installs promtool (step "Install promtool" of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No test ran a dashboard panel query, so panels with wrong numbers shipped with no failed test. This adds one evaluator that the dashboard items use.
tests/prometheus/test_dashboard_queries.pyreads the cases intests/fixtures/dashboard_queries/<dashboard>.yaml, replaces the Grafana variables as Grafana does ($__rate_intervalfrom the Min step of the target or the scrape interval of its data source), and runs promtool once for each dashboard. It skips where promtool is not installed. A second test fails when a case query is not the current query of its panel target, and names the dashboard, the panel title and the refId.devops-cli.yamlholds the four series shapes of the telemetry once each. The promtool run of the alerting tests moves totests/support/promtool.py.docs/TESTING.mdtells how to add a case.Closes #4680
Change:
openspec/changes/archive/2026-11-12-4680-evaluate-panel-queries-on-fixture-series/