grafana
grafana copied to clipboard
plugin resource seems to not be idempotent for unsigned plugins
:speaking_head: Foreword
:ghost: Brief Description
As per title, we added a few weeks a go the support for unsigned plugins (https://github.com/sous-chefs/grafana/pull/396) unfortunately this showed a bug on plugins resource that for such plugin (the unsigned ones) is now not idempotent and it is trying to install the same plugin at every run
:pancakes: Cookbook version
9.6.0
:woman_cook: Chef-Infra Version
16.10.17
:tophat: Platform details
ubuntu 18.04
Steps To Reproduce
Steps to reproduce the behavior:
grafana_config_plugins 'grafana' do
allow_loading_unsigned_plugins %w( octopus-deploy-xmlfeed )
end
grafana_plugin 'octopus-deploy-xmlfeed' do
plugin_url 'https://github.com/OctopusDeploy/OctopusGrafanaDataSource/releases/download/0.0.36/octopus_grafana_datasource.zip'
end
grafana_config_writer 'grafana'
:police_car: Expected behavior
after the first run the grafana_plugin resource should state skipped due to not_if
:heavy_plus_sign: Additional context
looking into the resource I noted you are using the grafana-cli plugins ls
cmd for showing the list of installed plugins, the octopus one isn't show there in my case.
Is there any workaround for it? Otherwise I suppose this issue is for the grafana cli repository
Fix applied at the moment. The grafana_config_plugins resource notifies the grafana_plugin resorce to run, So it should run just the first time.
@themaroqa feel free to make a PR which fixes the issue, otherwise we'll get to this when we can.
Will try to figure out how to fix this, but at the moment I don't have any clue honestly. Open to suggestions
Should be fixed by #403