grafana / jsonnet-libs

Grafana Labs' Jsonnet libraries
Other
633 stars 160 forks source link

Update grafana-builder Dashboard Schema #1010

Open kennytrytek-wf opened 1 year ago

kennytrytek-wf commented 1 year ago

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

AgnesToulet commented 1 year ago

+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?

v-zhuravlev commented 1 year ago

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