cloudspout / cloudspout-button-panel

Grafana panel to integrate with any kind of HTTP/REST API
MIT License
50 stars 35 forks source link

Error when installing the plugin #2

Closed uncycler closed 4 years ago

uncycler commented 4 years ago

Grafana, for some reason, fails to install the plugin using the zip url.

To reproduce:

$> docker run -it --entrypoint sh grafana/grafana:7.0.3
/usr/share/grafana # grafana-cli --pluginUrl https://github.com/cloudspout/cloudspout-button-panel/releases/download/1.0.3/cloudspout-button-panel.zip plugins install cloudspout-button-panel
installing cloudspout-button-panel @
from: https://github.com/cloudspout/cloudspout-button-panel/releases/download/1.0.3/cloudspout-button-panel.zip
into: /var/lib/grafana/plugins

Error: ✗ failed to extract plugin archive: failed to extract file: failed to open file: open /var/lib/grafana/plugins/cloudspout-button-panel/img/logo.svg: no such file or directory

I fixed the issue by creating a new zip under linux and publishing it somewhere else: zip -r cloudspout-button-panel.zip cloudspout-button-panel

I found out that if I do the same operation on a mac, I have the same error as above. Only zip created under linux seems to work.

derjust commented 4 years ago

Thanks for reporting. I will have a look

@uncycler thanks for finding & using the plugin. May I ask how you found it?

uncycler commented 4 years ago

@uncycler thanks for finding & using the plugin. May I ask how you found it?

A colleague wanted to try it and sent me the link. Not sure how he lands here :-)

derjust commented 4 years ago

I can reproduce it and here is a workaround (I'm mostly confused that it is working because I have a container running that has the plugin installed somehow):

$ docker run -it --entrypoint sh grafana/grafana:7.0.3

/usr/share/grafana $ mkdir -p /var/lib/grafana/plugins/cloudspout-button-panel/img
/usr/share/grafana $ grafana-cli --pluginUrl https://github.com/cloudspout/cloudspout-button-panel/releases/download/1.0.3/cloudspout-button-panel.zip plugins install cloudspout-button-panel
installing cloudspout-button-panel @ 
from: https://github.com/cloudspout/cloudspout-button-panel/releases/download/1.0.3/cloudspout-button-panel.zip
into: /var/lib/grafana/plugins

✔ Installed cloudspout-button-panel successfully 

Restart grafana after installing plugins . <service grafana-server restart>
derjust commented 4 years ago

Fixed via with 2e978aca7ae152e660bfd7bc6bc51ed15eaf24cc

Please give it a try (yes, major version number now aligns with Grafana's major):

$ grafana-cli --pluginUrl https://github.com/cloudspout/cloudspout-button-panel/releases/download/7.0.0/cloudspout-button-panel.zip \
  plugins install cloudspout-button-panel
uncycler commented 4 years ago

It works much better thanks!