jsonnet-libs icon indicating copy to clipboard operation
jsonnet-libs copied to clipboard

Update grafana-builder Dashboard Schema

Open kennytrytek-wf opened this issue 2 years ago • 2 comments

schemaVersion is set to 14, but latest schema is 38. Current: https://github.com/grafana/jsonnet-libs/blob/ef364ae521bbb2304f23845e36182a908e295789/grafana-builder/grafana.libsonnet#L98 Latest: https://github.com/grafana/grafana/blob/6f880b713afcd83519d89c506609f31b6b7bc1df/public/app/features/dashboard/state/DashboardMigrator.ts#L817

The reason this would be helpful is that if the Alertmanager dashboard is created using Terraform (grafana_dashboard resource), this dashboard is produced at schema version 14. When an admin loads the dashboard page, the board is automatically migrated to version 38. Then, subsequent navigation prompts to save the dashboard changes.

If the dashboard could be generated at the newer schema version, then it could be more effectively managed with Terraform.

grafana

kennytrytek-wf avatar Jul 06 '23 21:07 kennytrytek-wf

+1 to update grafana-builder schema as the one used here is quite old and it causes issues for the reporting feature as well.

Maybe it would help to use grafonnet to do this update so this would be easier to keep it up-to-date in the future?

AgnesToulet avatar Jul 20 '23 13:07 AgnesToulet

Best to switch to grafonnet, as it is autogenerated from grafana schema, so should always be up to date.

v-zhuravlev avatar Sep 26 '23 04:09 v-zhuravlev