Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

[Bug][Grafana] Redundant root grafana-irm.json causes dashboard UID collisions in MySQL and phantom dashboard in PostgreSQL

Geschlossen Anfängerfreundlich
#9,175 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

@SatyamPandey-07 arbeitet bereits daran.

Seit 28.9.2026.

  • #9176 von @SatyamPandey-07 — offen

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

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

type/bug
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.

  1. MySQL mode (DATABASE_TYPE=mysql):

    • entrypoint.sh removes /etc/grafana/dashboards/postgresql.
    • Both /etc/grafana/dashboards/grafana-irm.json and /etc/grafana/dashboards/mysql/grafana-irm.json remain 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"
      
  2. PostgreSQL mode (DATABASE_TYPE=postgresql):

    • entrypoint.sh removes /etc/grafana/dashboards/mysql.
    • Both /etc/grafana/dashboards/postgresql/grafana-irm.json (UID grafana-irm-dashboard-pg) and the stray root /etc/grafana/dashboards/grafana-irm.json (UID grafana-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
  1. 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
    
  2. Verify that both /etc/grafana/dashboards/grafana-irm.json and /etc/grafana/dashboards/mysql/grafana-irm.json exist.
  3. Observe the Grafana startup logs indicating a duplicate dashboard UID error for grafana-irm-dashboard.
  4. Alternatively, run with -e DATABASE_TYPE=postgresql and check the dashboard list in the Grafana UI; observe two "Grafana IRM" dashboards, with the root one failing due to missing devlake-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.json and grafana/dashboards/mysql/grafana-irm.json are 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
Vorherrschende Sprache
Go
Sterne
3.2k
Forks
830
Ø Merge
2 T. 12 Std.
Gemergte PRs (30 T.)
61

Entwicklungsumgebung

In Codespaces öffnen

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

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus apache/devlake

Alle Issues in apache/devlake

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.