fix(dashboards): fix Grafana variable interpolation for string team/user IDs in MySQL dashboards#8926
Open
bujjibabukatta wants to merge 1 commit into
Open
fix(dashboards): fix Grafana variable interpolation for string team/user IDs in MySQL dashboards#8926bujjibabukatta wants to merge 1 commit into
bujjibabukatta wants to merge 1 commit into
Conversation
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
Fixes #8829
MySQL Grafana dashboards break when
teams.idorusers.idarenon-numeric strings (the schema allows
varchar(255)). Grafana injects$variableraw into SQLIN()clauses, so string values arriveunquoted and the query fails.
Root Cause
The affected SQL patterns looked like:
Grafana's
${variable:singlequote}formatter wraps each value insingle quotes, making the query safe for string IDs. The PostgreSQL
variants of these dashboards already used this formatter; only the
MySQL variants were affected.
Changes
grafana/dashboards/mysql/work-logs.json${team:singlequote}for user dropdownrawSqlblocks:${users}→${users:singlequote}grafana/dashboards/mysql/dora-by-team.json${team}→${team:singlequote}across allpanels (Deployment Frequency, Lead Time, Change Failure Rate,
Recovery Time — both stat cards and monthly bar charts)
grafana/dashboards/mysql/engineering-throughput-and-cycle-time-team-view.json${team1}/${team2}→${team1:singlequote}/${team2:singlequote}across all panelsTesting
Verified by inspecting all
rawSqlblocks in each affected file.No changes to PostgreSQL dashboards (
grafana/dashboards/postgresql/)as they already use
:singlequotethroughout.