Skip to content

fix(observability): update stale $__all sentinel assertions in maintainer-reviews dashboard test - #5719

Merged
JSONbored merged 1 commit into
mainfrom
fix-grafana-repo-scoped-issue-panels
Jul 14, 2026
Merged

fix(observability): update stale $__all sentinel assertions in maintainer-reviews dashboard test#5719
JSONbored merged 1 commit into
mainfrom
fix-grafana-repo-scoped-issue-panels

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • fix(observability): stop using Grafana's $__ macro prefix as the SQL "All" sentinel #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 test/unit/selfhost-grafana-dashboard.test.ts's assertions and its expandGrafanaRange() test helper's default repo value.
  • The stale $__all default meant the test's simulated "All repos" selection built a WHERE clause 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.
  • Pre-existing on main (confirmed failing on 7a6ecba7b, 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
  • Confirmed the other 2 dashboards still referencing $__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

…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.
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.05%. Comparing base (40e6cdf) to head (6d530af).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

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     
Flag Coverage Δ
shard-1 43.55% <ø> (-0.43%) ⬇️
shard-2 35.84% <ø> (+0.13%) ⬆️
shard-3 32.22% <ø> (-0.06%) ⬇️
shard-4 32.90% <ø> (-0.12%) ⬇️
shard-5 31.34% <ø> (-0.26%) ⬇️
shard-6 44.67% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 117 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored self-assigned this Jul 14, 2026
@JSONbored
JSONbored merged commit 9d33cb3 into main Jul 14, 2026
17 checks passed
@JSONbored
JSONbored deleted the fix-grafana-repo-scoped-issue-panels branch July 14, 2026 07:33
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant