Grafana schemas have their own versioning system, independent of Grafana itself. This versioning system is
typically $MAJOR.$MINOR, with the addition of x which means "experimental".
When rendering libraries based upon these schema, end users will be concerned about Grafana versions. So
we need a mapping between. This PR is a first pass at solving that.
If Grok's go generate is called with a GRAFANA_VERSION envvar set, the new "registry jennies" will
kick in, rendering two files (core and composable) for that specific Grafana version. They basically say
"this version of Grafana uses these schema version for these kinds".
This mapping can then be used by downstream libraries (or Grok itself) to render code for various languages.
Grafana schemas have their own versioning system, independent of Grafana itself. This versioning system is typically
$MAJOR.$MINOR
, with the addition ofx
which means "experimental".When rendering libraries based upon these schema, end users will be concerned about Grafana versions. So we need a mapping between. This PR is a first pass at solving that.
If Grok's
go generate
is called with aGRAFANA_VERSION
envvar set, the new "registry jennies" will kick in, rendering two files (core and composable) for that specific Grafana version. They basically say "this version of Grafana uses these schema version for these kinds".This mapping can then be used by downstream libraries (or Grok itself) to render code for various languages.