fix(test): update grafana dashboard assertions for the historical-continuity query rewrite#6787
Merged
Merged
Conversation
…tinuity query rewrite #6779 wrapped 71 panel queries in this dashboard with an (new_metric or gittensory_old_metric) union for historical Prometheus continuity across the rebrand, but didn't update this test file's exact target.expr string assertions to match -- 25 of them were pinned to the pre-#6779 query text and have been silently failing since that PR merged.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6787 +/- ##
===========================================
+ Coverage 82.21% 93.63% +11.41%
===========================================
Files 682 682
Lines 68115 68115
Branches 18692 18692
===========================================
+ Hits 56003 63779 +7776
+ Misses 9998 3350 -6648
+ Partials 2114 986 -1128
Flags with carried forward coverage won't be shown. Click here to find out more. |
Merged
3 tasks
thomasalvaedison7777-lgtm
pushed a commit
to thomasalvaedison7777-lgtm/loopover
that referenced
this pull request
Jul 17, 2026
…hboard JSONbored#5522's hard-cutover rename of the gittensory_ metric prefix to loopover_ left this dashboard's 9 loopover_ai_* queries with no fallback to their pre-rebrand names, so every panel here only ever showed data recorded after that cutover -- confirmed live, both metric names have real historical series in Prometheus going back well past the cutover. Applies the same (loopover_x or gittensory_x) union fix already shipped for grafana/dashboards/gittensory.json (JSONbored#6779/JSONbored#6787), including that fix's own lesson: a label matcher like {provider="codex"} must bind to each side of the union individually, never to the closing paren of the union as a whole -- verified all 9 rewritten queries directly against live Prometheus before deploying. Deployed to edge-nl-01 and restarted Grafana to force a clean reprovision.
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.
Summary
exprqueries ingrafana/dashboards/gittensory.json, wrapping each in an(new_metric or gittensory_old_metric)union so the Self-Host dashboard keeps showing pre-rebrand history. That PR's own local test run didn't catch it, buttest/unit/selfhost-grafana-dashboard.test.tspins 38 exacttarget.expr === "..."string assertions against this same file — 25 of them were still asserting the pre-fix(observability): restore historical continuity in the Self-Host dashboard #6779 query text and have been silently red onmainsince that PR merged (eachit()block only reports its first failing assertion, so CI only surfaced 6 failing tests, not the full 25 broken assertions).exprstring against the real dashboard JSON's actual panel targets, confirmed the exact mismatch set, cross-checked every proposed replacement exists byte-for-byte in the dashboard before editing.Scope
Validation
npx vitest run test/unit/selfhost-grafana-dashboard.test.ts— 30/30 passing (was 6 failing)grafana/dashboards/gittensory.json, and a repo-wide reconciliation pass against that file now finds 0 mismatches (was 25)