grafana / grafonnet

Jsonnet library for generating Grafana dashboards.
https://grafana.github.io/grafonnet/
Apache License 2.0
352 stars 19 forks source link

Update from schemaVersion 36 to 39+? #196

Closed consideRatio closed 4 months ago

consideRatio commented 5 months ago

I looked at the schemaVersion in grafonnet generated dashboard and then compared it to what I exported from my grafana instance after using it there - then the schema was version 39 instead of the version 36 it was initially generated with.

I think maybe this suggests some maintenance actions in this repo, but I'm not sure.

I care because when I tried to upload a dashboard generated with grafonnet 10.4.0 to https://grafana.com/grafana/dashboards, it said:

image


This is where the value is currently set:

https://github.com/grafana/grafonnet/blob/1c56af39815c4903e47c27194444456f005f65df/gen/grafonnet-v10.4.0/raw/dashboard.libsonnet#L284-L287

consideRatio commented 5 months ago

I've not found a better reference to what the schema versions are about except for this:

https://github.com/grafana/grafana/blob/53d2714a1802907c81de613a70f1271bf003c40c/public/app/features/dashboard/state/DashboardMigrator.ts#L817-L899

Duologic commented 4 months ago

Looks like the version is tracked here: https://github.com/grafana/grafana/blob/71e3814c469e6d407cf5458951258c000ffc861c/public/app/features/dashboard/state/DashboardMigrator.ts#L78

While the CUE schema that grafonnet builds on has has 36 still: https://github.com/grafana/grafana/blob/54d026f5767604e169d9c1ed5ef0a7df17bc02c0/kinds/dashboard/dashboard_kind.cue#L77