[Bug][Grafana] Redundant root grafana-irm.json causes dashboard UID collisions in MySQL and phantom dashboard in PostgreSQL
Maintainer antworten meist innerhalb von 2 Tagen
Bewertung
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Anfängerfreundlichkeit
- 95/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- docker, grafana
- Bereich
- data-visualization, devops
Rechercherichtung
Beginne mit der Untersuchung von grafana/dashboards/grafana-irm.json zusammen mit den dashboards für die jeweiligen Dialekte. Überprüfe anschließend grafana/Dockerfile und entrypoint.sh, um zu bestätigen, wie Provisioning-Pfade kopiert und gefiltert werden. Entferne die redundante Dashboard-Datei im Root-Verzeichnis und stelle sicher, dass für jeden DATABASE_TYPE nur das MySQL- oder PostgreSQL-Dashboard verbleibt. Die dokumentierten Docker-Build- und Startup-Prüfungen sollten keine UID-Kollision und kein Phantom-Dashboard anzeigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- Go
- Sterne
- 3.2k
- Forks
- 830
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 61
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus apache/devlake
-
type/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 60/100
Maintainer antworten meist innerhalb von 2 Tagen
-
type/bug
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 73/100
Maintainer antworten meist innerhalb von 2 Tagen
-
[Bug][dora] calculateChangeLeadTime loads the whole commits_diffs deployment join into memoryEvtl. vergeben @mdelacruz-avantio hat das vor 1 Tag übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 25/100
Maintainer antworten meist innerhalb von 2 Tagen
-
[Refactor][Build] Build the core and all plugins into a single binary by defaultEvtl. vergeben @klesh hat das vor 1 Tag übernommen. Offencomponent/plugins type/refactor
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
Maintainer antworten meist innerhalb von 2 Tagen
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
cloudflare/cloudflared#1783 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
orchestration.migration.data.tasks.retry values are ignored by the 8.8 data migration jobEvtl. vergeben @irisfield hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
camunda/camunda-platform-helm#7773 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Add missing unit tests for IsAdmissionPolicyName and IsCertManagerResourceNameEvtl. vergeben @a1h8 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
kubernetes-sigs/security-profiles-operator#3644 ·
Maintainer antworten meist innerhalb von 1 Tag