[Bug][Grafana] Redundant root grafana-irm.json causes dashboard UID collisions in MySQL and phantom dashboard in PostgreSQL
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 1/5
- Temps estimé
- Moins d'une heure
- Accessibilité débutants
- 95/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- docker, grafana
- Domaine
- data-visualization, devops
Piste de recherche
Commencez par inspecter grafana/dashboards/grafana-irm.json avec les dashboards spécifiques à chaque dialecte, puis examinez grafana/Dockerfile et entrypoint.sh pour confirmer comment les chemins de provisioning sont copiés et filtrés. Supprimez le fichier de dashboard redondant à la racine et vérifiez qu’il ne reste que le dashboard MySQL ou PostgreSQL pour chaque DATABASE_TYPE ; les vérifications documentées du build Docker et du démarrage devraient montrer qu’il n’y a ni collision d’UID ni dashboard fantôme.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- Go
- Étoiles
- 3.1k
- Forks
- 812
- Merge moyen
- 2 j 8 h
- PR mergées (30 j)
- 50
Préparer son environnement
Nous n'avons pas encore vérifié les fichiers d'installation de ce projet. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de apache/devlake
-
[Bug][gitextractor] Incremental collection permanently drops in-range commits behind merge commitsOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
Les mainteneurs répondent en général sous 1 jour
-
[Bug][refdiff] Incorrect deployment diffs stay cached after missing commit parents are collectedOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
[Bug][jenkins] Incremental collection skips the stages of builds that finish after the next syncOuverte
Difficulté 3/5 1-2 jours Accessibilité débutants 76/100
apache/devlake#9177 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
type/bug
Difficulté 4/5 3-5 jours Accessibilité débutants 68/100
apache/devlake#9170 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de apache/devlake
Issues similaires
-
bug docs
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour
-
bug needs-acceptance wg/evaluation-quality
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
vllm-project/semantic-router#4424 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
NVIDIA/k8s-device-plugin#2076 ·
Les mainteneurs répondent en général sous 1 jour
-
Documentation help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
golang/go#81933 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour