grafana-image-renderer: init at 2020-12-01 #108142
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
This package[1] is a replacement for the old phantomjs-integration[2]
which is practically EOL. It is basically used to render PNGs of panels
that triggered an alert in Grafana.
This package internally uses
puppeteer
[3] to control a headlessChromium instance. Even though puppeteer recommends to use a fixed
revision of
chromium
, I checked that our defaultpkgs.chromium
worksfine as well. Also, I don't think it's a good idea to use outdated
browser versions[4].
I used the latest revision from
master
on purpose since compiling thecode with
tsc
fromv2.0
didn't work and I couldn't figure out why.[1] https://grafana.com/grafana/plugins/grafana-image-renderer
[2] https://grafana.com/blog/2020/05/07/grafana-7.0-preview-new-image-renderer-plugin-to-replace-phantomjs/
[3] https://github.com/puppeteer/puppeteer
[4] currently, puppeteer v2.0.0 is used which recommends revision 706915
(v79.0.3945.130).
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)