* feat(unified): migration at startup based on resource count -- draft * feat: introduce auto migration enablement for dashboards & folders * feat: enable auto migration based on threshold * fix: improve * fix: pass in the auto migrate per migration definition * fix: minor * fix: only use one options * fix: test * fix: test * fix: tests * fix: simplify configs * chore: rename * fix: add integration test * fix: add integration test * fix: integration tests * chore: add comments * fix: address comment * fix: address comments * fix: test and auto migration flow * fix: test --------- Co-authored-by: Rafael Paulovic <rafael.paulovic@grafana.com>
This implements a ResourceServer backed by the existing dashboard SQL tables.
There are a few oddities worth noting. This is not a totally accurate implementation, but it is good enough to drive the UI needs and let kubectl list work!
- The resourceVersion is based on internal ID and dashboard version
- can get version from the least significant digits
- avoids duplicate resourceVersions... but not sequential
- the resourceVersion is never set on the list commands
- Results are always sorted by internal id ascending
- this ensures everything is returned