Skip to content

Upgrade Grafana from v11.6.2 to v13.0.1 and Fix dashboard datasource referenes#8882

Open
shajjar-emumba wants to merge 2 commits into
apache:mainfrom
shajjar-emumba:feat/grafana-v13-upgrade
Open

Upgrade Grafana from v11.6.2 to v13.0.1 and Fix dashboard datasource referenes#8882
shajjar-emumba wants to merge 2 commits into
apache:mainfrom
shajjar-emumba:feat/grafana-v13-upgrade

Conversation

@shajjar-emumba
Copy link
Copy Markdown

⚠️ Pre Checklist

Please complete ALL items in this checklist, and remove before submitting

  • I have read through the Contributing Documentation.
  • I have added relevant tests.
  • I have added relevant documentation.
  • I will add labels to the PR, such as pr-type/bug-fix, pr-type/feature-development, etc.

Summary

Upgrades the bundled Grafana image (devlake-dashboard) from v11.6.2 to v13.0.1.

The primary motivation for this upgrade is native Git Sync support, which reached GA in Grafana v13. Organizations using DevLake often build and maintain custom dashboards on top of DevLake data and also Grafana v13 brings a range of improvements worth exploring.

Changes

grafana/Dockerfile

  • Bumped FROM grafana/grafana:11.6.2FROM grafana/grafana:13.0.1
  • Removed RUN grafana-cli plugins install grafana-piechart-panel
    • grafana-cli (hyphenated) was deprecated in v10 and fully removed in v13
    • grafana-piechart-panel was deprecated starting from Grafana v8+ and is now
      a built-in core panel; no installation needed

grafana/dashboards/*.json (all dashboard files)

  • Updated all panel and target datasource references from the legacy bare string form ("datasource": "mysql") to the modern object form
    ("datasource": {"type": "mysql", "uid": "mysql"})
  • In Grafana v13, the bare string form causes panels to fall back to the built-in Grafana datasource instead of MySQL, resulting in all SQL panels showing no data
  • As a secondary benefit, this ensures correct datasource binding in v2 schema exports, the v2 migration silently drops the datasource field entirely from panels that use the string form

Does this close any open issues?

Closes 8881

Screenshots

Include any relevant screenshots here.

Other Information

Since all DevLake dashboards are provisioned with allowUiUpdates: false, users cannot save changes through the Grafana UI. The only way to get modified dashboard JSON back out is to copy it from the dashboard settings panel. In Grafana v13, that copy action now exports the new v2 Kubernetes-style schema by default rather than the classic flat JSON format

It would be worth also updating the bundled dashboard JSON files to the v2 schema format so that users who customise dashboards and copy the JSON to commit back to their own forks get a format that works with provisioning out of the box. This is not included in the current PR but is a natural follow-up

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. component/ext This issue or PR relates to external components, such as Grafana improvement pr-type/bug-fix This PR fixes a bug labels May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/ext This issue or PR relates to external components, such as Grafana improvement pr-type/bug-fix This PR fixes a bug size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature][Grafana] Upgrade bundled Grafana version to support native Git Sync Feature

1 participant