You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When allowUiUpdates is set to false, dashboards are not saved to the configured database.
Instead, users are instructed to save the json model of a dashboard.
However, when the ⚙️ <> Json Model is saved, the id field of the dashboard is removed as Grafana will use the dashboard's uid to insert/update the dashboard for future deployments using the same database. And when Grafana provisions again, it will automatically increment the provisioned dashboard's version number in the database. This prevents admins from maintaining the version number of the dashboard in a repository.
What you expected to happen:
If a provisioned dashboard which does not allow ui updates specifies a version number, then Grafana should use this version number rather than just incrementing the current version number in the database table select version from public.dashboard where uid = 'foo'.
How to reproduce it (as minimally and precisely as possible):
Start a postgres server
Start Grafana server with a provisioned dashboard at version = 10
Look in Grafana UI at dashboard's verison: it is not at 1 because it was a fresh database,
Anything else we need to know?:
No
Environment:
Grafana version: 8.5.9
Data source type & version: n/a
OS Grafana is installed on: running in podman from the stock ubuntu image
User OS & Browser: n/a
Grafana plugins: n/a
Others: n/a
The text was updated successfully, but these errors were encountered:
@dnck I'll route this to the squad to take a look and comment on what's expected, we might want improve the docs about this topic. Can you share more about how you're using the version in your provisioning workflow and why the version in the database is causing trouble for you? According to this note, the source will always overwrite a saved copy in the database regardless of version.
Note: If a provisioned dashboard is saved from the UI and then later updated from the source, the dashboard stored in the database will always be overwritten. The version property in the JSON file will not affect this, even if it is lower than the existing dashboard.
If I've misunderstood your question, it will help us to understand without setting up the full test you've outlined if you can share some snippets/screenshots to give us more context.
IMHO, there is a connection to #30936
Every time after a Grafana-restart the same dashboards (with the same 'uid') provisioned from the same files from a source folder get a new 'id' in the 'dashboard' table. In the mentioned issue it leads to cleared ACL settings
What happened:
When
allowUiUpdates
is set to false, dashboards are not saved to the configured database.Instead, users are instructed to save the json model of a dashboard.
However, when the ⚙️
<> Json Model
is saved, theid
field of the dashboard is removed as Grafana will use the dashboard'suid
to insert/update the dashboard for future deployments using the same database. And when Grafana provisions again, it will automatically increment the provisioned dashboard's version number in the database. This prevents admins from maintaining the version number of the dashboard in a repository.What you expected to happen:
If a provisioned dashboard which does not allow ui updates specifies a version number, then Grafana should use this version number rather than just incrementing the current version number in the database table
select version from public.dashboard where uid = 'foo'
.How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
No
Environment:
The text was updated successfully, but these errors were encountered: