-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data Sources: Provisioning config updated, but changes not reflected in Grafana #79694
Comments
I have a suspicion that for the datasource editing to work a |
Now that I have returned from my holidays, I have found that the only way to make this work is to delete the original provisioned datasource and reprovision it. Editing the datasource to add the UID and restarting Grafana without deleting the datasource did not work. |
hi @SuperMatt have you tried to increase the Grafana updates only data sources with the same or lower version number than specified in the config. This prevents old configurations from overwriting newer ones if you have different versions of the datasource.yaml file that don’t define version numbers |
Hi @tonypowa, thanks for this but I did just notice something interesting in my test environment. Imagine I have a datasource which is already set to version I think this is the cause of my issues in a nutshell. I think that all my versions were Could it be something has changed in the Grafana codebase to automatically increment the number on update? |
thanks for your reply @SuperMatt
I will add the issue to the team's board for review |
Thanks very much! |
@grafana/plugins-platform-backend as per the codeowners file it's within your area of ownership. Could you please take a look at this issue? Thank you |
Hi, This is the expected behavior. The This behavior was fixed in 10.2.3, that's why you may have seen a different behavior in previous versions: #77428 To ensure that the changes in the provisioning file are applied, either increment the version field or simply remove it. Let us know if you still think there is an issue about this. |
Hi @andresmgot I've just checked in Grafana 10.3.1, and the database is still updating the version number to be that of a higher number than the one set. Here are my replication steps:
There's clearly a bug here if all of my Prometheus datasources are updating to a new version number despite my provisioning files not requesting them. |
The Any update made to the datasource, regardless if it's triggered by a provisioning file or a manual change, cause the version in the database to be increased by 1. That's why you are seeing Version 2 after all of them have been updated. The next time the provisioning is run, since version 2 is bigger than version 1 from the file, it won't apply any changes. If you want your provisioning files to always take precendence over what's stored in the database you need to remove the |
What happened?
In Grafana 10.2.x, I have made a change to a datasource, namely a http header value, but also the
editable
flag, but these changes have not been reflected back in Grafana, they are using the old configuration. When I look at the mysql database for the datasource after the provisioning file has been updated and Grafana restarted, the data in the database is completely unchanged. I used the editable flag as a good canary for this because it's unencrypted and therefore would be easy to see the read_only column in the data_source table switch from 1 to 0, but it has not.What did you expect to happen?
I expected the changes to the provisioning file to be picked up during a restart of Grafana (or even after 10 minutes of Grafana running), and the changes be visible (or at least the effects of the changes visible WRT changing header values) in the UI.
Did this work before?
10.0.x
How do we reproduce it?
Is the bug inside a dashboard panel?
n/a
Environment (with versions)?
Grafana: 10.2.2 and 10.2.3
OS: Linux / Kubernetes
Browser: Edge
Grafana platform?
Kubernetes
Datasource(s)?
Prometheus
The text was updated successfully, but these errors were encountered: