[Bug][Grafana] Redundant root grafana-irm.json causes dashboard UID collisions in MySQL and phantom dashboard in PostgreSQL
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 95/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- docker, grafana
调研方向
先检查 grafana/dashboards/grafana-irm.json 以及各 dialect 专用的 dashboards,然后查看 grafana/Dockerfile 和 entrypoint.sh,以确认 provisioning 路径是如何复制和过滤的。删除根目录中冗余的 dashboard 文件,并验证对于每个 DATABASE_TYPE,只保留 MySQL 或 PostgreSQL dashboard;文档中所述的 Docker 构建和启动检查应显示不存在 UID 冲突或虚假 dashboard。
由索引模型根据 Issue 内容生成。
描述
Search before asking
- I had searched in the issues and found no similar issues.
What happened
Following the merge of PR #9160, the new Grafana IRM dashboard was added to dialect-specific directories (grafana/dashboards/mysql/grafana-irm.json and grafana/dashboards/postgresql/grafana-irm.json), but a duplicate file was also left at the root level in grafana/dashboards/grafana-irm.json.
In the container build (grafana/Dockerfile), the entire dashboards directory is copied into /etc/grafana/dashboards.
-
MySQL mode (
DATABASE_TYPE=mysql):entrypoint.shremoves/etc/grafana/dashboards/postgresql.- Both
/etc/grafana/dashboards/grafana-irm.jsonand/etc/grafana/dashboards/mysql/grafana-irm.jsonremain on disk with the identical UID:"uid": "grafana-irm-dashboard". - Grafana's file provider provisions dashboards recursively, encountering both files and throwing a duplicate UID collision:
logger=provisioning.dashboard type=file name="My Dashboard" level=error msg="failed to load dashboard from file" file=/etc/grafana/dashboards/grafana-irm.json error="dashboard with uid 'grafana-irm-dashboard' already exists"
-
PostgreSQL mode (
DATABASE_TYPE=postgresql):entrypoint.shremoves/etc/grafana/dashboards/mysql.- Both
/etc/grafana/dashboards/postgresql/grafana-irm.json(UIDgrafana-irm-dashboard-pg) and the stray root/etc/grafana/dashboards/grafana-irm.json(UIDgrafana-irm-dashboard) are loaded under the same title"Grafana IRM". - The root dashboard attempts to query the MySQL datasource (
devlake-mysql-api), which does not exist in PostgreSQL mode, resulting in a duplicate broken dashboard in the Grafana UI.
What do you expect to happen
Each dashboard file should only exist within its designated dialect folder (grafana/dashboards/mysql/ or grafana/dashboards/postgresql/). No duplicate files should reside in the root grafana/dashboards/ directory so that provisioning loads each dashboard exactly once without UID conflicts or cross-dialect query errors.
How to reproduce
- Inspect the repository at
grafana/dashboards/or build and run the Grafana container:docker build -t devlake-dashboard:test grafana/ docker run --rm -e DATABASE_TYPE=mysql devlake-dashboard:test - Verify that both
/etc/grafana/dashboards/grafana-irm.jsonand/etc/grafana/dashboards/mysql/grafana-irm.jsonexist. - Observe the Grafana startup logs indicating a duplicate dashboard UID error for
grafana-irm-dashboard. - Alternatively, run with
-e DATABASE_TYPE=postgresqland check the dashboard list in the Grafana UI; observe two "Grafana IRM" dashboards, with the root one failing due to missingdevlake-mysql-api.
Anything else
- Affected file to be removed:
grafana/dashboards/grafana-irm.json - Active dialect dashboards:
grafana/dashboards/mysql/grafana-irm.json(MySQL datasource)grafana/dashboards/postgresql/grafana-irm.json(PostgreSQL datasource)
grafana/dashboards/grafana-irm.jsonandgrafana/dashboards/mysql/grafana-irm.jsonare byte-for-byte identical; removing the root file cleanly eliminates the collision without impacting MySQL or PostgreSQL dashboard provisioning.
Version
b0a758996 (commit on main following PR #9160 / #9173)
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
- 主要语言
- Go
- 星标
- 3.1k
- 派生
- 812
- 平均合并
- 2 天 8 小时
- 30 天内合并 PR
- 51
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/devlake 的其他 Issue
-
[Bug][jenkins] Incremental collection skips the stages of builds that finish after the next sync未关闭
难度 3/5 1-2 天 新手友好度 76/100
维护者通常 1 天内回复
-
type/bug
难度 4/5 3-5 天 新手友好度 68/100
维护者通常 1 天内回复
-
[Feature][Plugins] Add YouTrack plugin可能已有人在做 @tpam28 于 2 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 32/100
apache/devlake#9168 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Bug][Jira/DORA] Extra JQL does not isolate projects sharing the same Jira board可能已有人在做 @veetmoradiya3628 于 8 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 35/100
apache/devlake#9151 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
type/bug
难度 4/5 3-5 天 新手友好度 52/100
维护者通常 1 天内回复
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 92/100
open-telemetry/opentelemetry-go-compile-instrumentation#1417 ·
维护者通常 2 天内回复
-
agent-research-finding agent-research-recommend chore ready-for-agent
难度 2/5 1-3 小时 新手友好度 85/100
jordansmall/spindrift#4068 · 1 条评论 ·
维护者通常 1 天内回复
-
Type/Task
难度 2/5 1-3 小时 新手友好度 74/100
OpenNSW/nsw-srilanka#537 ·
维护者通常 1 天内回复
-
security
难度 2/5 1-2 天 新手友好度 62/100
-
难度 2/5 1-3 小时 新手友好度 90/100
维护者通常 1 天内回复