Repository navigation
3.x.x: keep every published alert rule UID within Grafana's 40-character limit (#757) - #793
Merged
Merged
Conversation
…ter limit (#757) Grafana refuses a rule UID over 40 characters or outside [A-Za-z0-9_-], and a provisioning file carrying one stops it from starting. Five native UIDs broke this; they now use the short forms a downstream deployment already renders, so its rules and alert state carry over: qbit-prism-pool-resubmission-reject-ratio -> qbit-prism-pool-resubmit-reject-ratio qbit-prism-candidate-landing-failed-critical -> qbit-prism-candidate-landing-failed-crit qbit-prism-block-offer-standby-unconfirmed -> qbit-prism-offer-standby-unconfirmed qbit-prism-database-advisory-lock-failures-critical -> qbit-prism-advisory-lock-failures-crit qbit-prism-revision-work-pending-critical -> qbit-prism-revision-work-pending-crit Titles, labels and expressions are unchanged. scripts/check_prism_alert_uids.py fails CI when any UID in docs/*-alert-rules.json is too long, uses other characters or repeats across the files, and the provisioning test applies the same pattern to the rendered rules. The qbit-tools patch is regenerated from the frozen a007a142 snapshot. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Oct 28, 2026
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.
Fixes #757. Five alert-rule UIDs in
docs/prism-native-alert-rules.jsonwere longer than Grafana's 40-character limit, so a Grafana that provisions the published rule set refuses it. The downstream deployment had been working around this by renaming them at render time.What changes
The five UIDs now use the issue's short forms. Titles, labels and expressions are unchanged.
qbit-prism-pool-resubmission-reject-ratio(41)qbit-prism-pool-resubmit-reject-ratioqbit-prism-candidate-landing-failed-critical(44)qbit-prism-candidate-landing-failed-critqbit-prism-block-offer-standby-unconfirmed(42)qbit-prism-offer-standby-unconfirmedqbit-prism-database-advisory-lock-failures-critical(51)qbit-prism-advisory-lock-failures-critqbit-prism-revision-work-pending-critical(41)qbit-prism-revision-work-pending-critCI guard. New
scripts/check_prism_alert_uids.py, run in CI, rejects any UID that is too long, has characters outside[A-Za-z0-9_-], or is duplicated acrossdocs/*-alert-rules.json. Tests are intests/test_check_prism_alert_uids.py.scripts/test_prism_alert_deployment.pynow also asserts Grafana's UID pattern on every rendered rule.Migration note (
docs/prism-alert-migration.md). The new UIDs equal the targets of qbit-tools' five render-time aliases, so those aliases become no-ops and can be deleted, with nodeleteRulesneeded (Grafana never stored the long UIDs). Grafana treats a new UID as a new rule, so state history and any silence keyed on__alert_rule_uid__start over. Routing and label-based silences are unaffected.Other updates: the observability inventory test that named an old UID, and
docs/prism-alert-verification.md(the new check's command).Tests
tests.test_check_prism_alert_uids10/10, andtests.test_docs_lab_prism_referencespasses.generate_prism_alerts.py --checkpasses, with and without--snapshot.test_prism_alert_deployment.py --snapshotpasses against the frozen qbit-tools templates (sha256 matches the manifest; 10 gate combinations).#758 (gating the revision-work warnings) builds on this branch and follows as a stacked PR.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.