-
Notifications
You must be signed in to change notification settings - Fork 5
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
Config change after deployment does not update Grafana dashboard #73
Comments
I'm not sure that that is the issue, because while the relation provider class is in fact only doing that 'automatically' on install and upgrade, the charm itself is doing that in its common exit hook (https://github.com/canonical/cos-configuration-k8s-operator/blob/051e1461430edb2d342f8b2088a79d363fd02140/src/charm.py#L162C22-L162C22) which is triggered, among other things, on config-changed. So there must be something else going on. Perhaps a bug in the hashing? |
Thanks @PietroPasotti for the quick reply. It seems that the update of the boards is not triggered if the git hash does not change, which is indeed true in this case because the config cos-configuration-k8s-operator/src/charm.py Line 363 in 051e146
|
We should probably just always update on config-changed. |
The issue isn't reproducible when following the original steps and the updated dashboards path in the However, the issue arises if step 4 is performed before step 3 in the reproduction steps (i.e., relating to Grafana before setting the |
should be fixed by #98 |
Bug Description
Changing the configuration (e.g.
grafana_dashboards
) does not update the Grafana dashboard. This seems to be due to the fact that the dashboard is only updated during aninstall
orupgrade
event:cos-configuration-k8s-operator/lib/charms/grafana_k8s/v0/grafana_dashboard.py
Lines 1051 to 1052 in 051e146
As a user, I would expect the dashboard data to be updated when the configuration is changed.
To Reproduce
juju deploy --trust grafana-k8s grafana
juju deploy cos-configuration-k8s --config git_repo=https://github.com/canonical/github-runner-operator --config git_branch=main
juju config cos-configuration-k8s grafana_dashboards_path=src/grafana_dashboard_metrics
juju relate cos-configuration-k8s:grafana-dashboards grafana:grafana-dashboard
juju show-unit grafana/0 --format json | jq '."grafana/0"."relation-info"'
The last command shows an empty dashboard in the integration data. It would not be empty if the configuration value
grafana_dashboards_path=src/grafana_dashboard_metric
had been passed at deployment time.Environment
Juju (tested with 3.1 and 2.9) within multipass using microk8s.
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered: