fix(observability): update stale $__all sentinel assertions in maintainer-reviews dashboard test - #5719
Merged
Merged
Conversation
…aintainer-reviews dashboard test #5716 moved every panel in grafana/dashboards/maintainer-reviews.json from the "\$__all" Grafana-macro-prefixed sentinel to a plain "__ALL__" literal, but missed updating this test file's assertions and its expandGrafanaRange() helper default. The stale "\$__all" default meant simulating the "All repos" selection built a WHERE clause that could never match the dashboard's real "__ALL__" sentinel, so every issue-activity/PR-panel row-count assertion silently fell through to the single-repo branch and returned 0 rows instead of the true total.
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 #5719 +/- ##
==========================================
+ Coverage 85.57% 95.05% +9.47%
==========================================
Files 581 581
Lines 46164 46164
Branches 14810 14810
==========================================
+ Hits 39504 43880 +4376
+ Misses 5250 1523 -3727
+ Partials 1410 761 -649
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
38 tasks
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
grafana/dashboards/maintainer-reviews.jsonfrom the$__allGrafana-macro-prefixed sentinel to a plain__ALL__literal, but missed updatingtest/unit/selfhost-grafana-dashboard.test.ts's assertions and itsexpandGrafanaRange()test helper's defaultrepovalue.$__alldefault meant the test's simulated "All repos" selection built aWHEREclause that could never match the real dashboard's'__ALL__'sentinel, so it silently fell through to the single-repo branch and returned 0 rows instead of the true total across every issue-activity and PR-panel row-count assertion.main(confirmed failing on7a6ecba7b, the commit right before fix(observability): stop using Grafana's $__ macro prefix as the SQL "All" sentinel #5716's parent) — unrelated to the ongoing gittensory→loopover rebrand, found incidentally while investigating an unrelated PR's CI failure.Test plan
npx vitest run test/unit/selfhost-grafana-dashboard.test.ts— 27/27 pass (was 7 failing)npx vitest run test/unit/selfhost-grafana*.test.ts— 12 files / 105 tests all pass$__all(selfhost-grafana-miner-usage-dashboard.test.ts,selfhost-grafana-ai-usage-dashboard.test.ts) are unaffected and untouched — different dashboards, not migrated by fix(observability): stop using Grafana's $__ macro prefix as the SQL "All" sentinel #5716