test(selfhost): sync grafana dashboard assertions with #6779's gittensory_ fallback exprs - #6785
Merged
Merged
Conversation
…sory_ fallback exprs PR #6779 changed most Prometheus expr query strings in grafana/dashboards/gittensory.json to add a legacy-metric fallback (e.g. "loopover_x" became "(loopover_x or gittensory_x)"), a dual-read migration for the old gittensory_-prefixed metric names alongside the new loopover_-prefixed ones. That change to the dashboard JSON was intentional and correct, but test/unit/selfhost-grafana-dashboard.test.ts was never updated to match, so its exact-string expr/legendFormat assertions started failing on main. Updates the 25 affected assertions across 6 describe/it blocks (GitHub response cache counters, Orb zero-safe panels, Postgres/backup freshness, maintenance admission deferrals, self-host runtime-drift signals, and backlog-vs-fresh-intake lane fairness) to match the dashboard JSON's current, shipped expr values. No behavior change -- grafana/dashboards/gittensory.json is untouched.
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 #6785 +/- ##
===========================================
+ 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. |
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
exprquery strings ingrafana/dashboards/gittensory.jsonto add a legacy-metric fallback, e.g."loopover_queue_backlog_convergence_pending"became"(loopover_queue_backlog_convergence_pending or gittensory_queue_backlog_convergence_pending)"— a migration-period dual-read of the oldgittensory_-prefixed metric names alongside the newloopover_-prefixed ones.test/unit/selfhost-grafana-dashboard.test.tswas never updated to match, so its exact-stringexpr/legendFormatassertions started failing against currentmain(6 failing test cases, ~30 assertions affected).grafana/dashboards/gittensory.jsonitself is untouched — it does not need to change.expect(...)assertions changed across 6it(...)blocks: the GitHub response cache counters test, the Orb zero-safe panels test, the Postgres/backup freshness test, the Maintenance Admission Deferrals test, the self-host runtime-drift signals test, and the backlog-vs-fresh-intake lane fairness test. Assertions that were already accurate (e.g. Postgres exporter metrics, which fix(observability): restore historical continuity in the Self-Host dashboard #6779 didn't touch) were left as-is.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.No linked issue: this is a maintainer-authored, test-only fix restoring a currently-broken test file to green against already-merged, correct production code (PR #6779). There is no behavior change and nothing to file a contributor issue against.
Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
test/unit/selfhost-grafana-dashboard.test.ts(30/30 tests) and the fullnpm run test:cichain (all drift checks, typecheck, coverage, engine/live-gate/driver parity, workers, mcp/miner pack, ui lint/typecheck/build) ran clean end-to-end locally, plusnpm audit --audit-level=moderate(0 vulnerabilities).Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. (N/A — no visible UI changes; test-file-only PR.)UI Evidence
N/A — this PR only changes
test/unit/selfhost-grafana-dashboard.test.ts; there is no visible UI/frontend change.Notes
grafana/dashboards/gittensory.jsonis not modified by this PR.