[Bug][Grafana] Redundant root grafana-irm.json causes dashboard UID collisions in MySQL and phantom dashboard in PostgreSQL
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 95/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- docker, grafana
- Lĩnh vực
- data-visualization, devops
Hướng nghiên cứu
Bắt đầu bằng cách kiểm tra grafana/dashboards/grafana-irm.json cùng với các dashboard dành riêng cho từng dialect, sau đó xem xét grafana/Dockerfile và entrypoint.sh để xác nhận cách các đường dẫn provisioning được sao chép và lọc. Xóa tệp dashboard dư thừa ở thư mục gốc và xác minh rằng chỉ còn dashboard MySQL hoặc PostgreSQL tương ứng với mỗi DATABASE_TYPE; các bước kiểm tra build Docker và khởi động được ghi trong tài liệu phải cho thấy không có xung đột UID hoặc dashboard ảo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Go
- Star
- 3.1k
- Fork
- 812
- Merge trung bình
- 2 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 50
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/devlake
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug][jenkins] Incremental collection skips the stages of builds that finish after the next syncĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
apache/devlake#9177 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type/bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
apache/devlake#9170 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature][Plugins] Add YouTrack pluginCó thể đã có người làm @tpam28 đã nhận 3 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 32/100
apache/devlake#9168 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug][Jira/DORA] Extra JQL does not isolate projects sharing the same Jira boardCó thể đã có người làm @veetmoradiya3628 đã nhận 8 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
apache/devlake#9151 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/devlake
Issue tương tự
-
area: global bug dx priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
grafana/mcp-grafana#1267 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
automation models
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
coverage-gap good-first-pattern help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
GoogleCloudPlatform/k8s-aibom#114 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
txn2/mcp-data-platform#1984 ·
Maintainer thường phản hồi trong vòng 1 ngày