jupyterhub / grafana-dashboards

Grafana Dashboards useful for k8s + JupyterHub
https://jupyterhub-grafana.readthedocs.io
BSD 3-Clause "New" or "Revised" License
55 stars 23 forks source link

pre-commit: add jsonnet-lint hook (with workaround for bug) #107

Closed consideRatio closed 7 months ago

consideRatio commented 7 months ago

I'll skip attempting to fix these failures in order to avoid merge conflicts. The main branch failures are:

dashboards/jupyterhub.jsonnet:6:7-38 Unused variable: singlestat
local singlestat = grafana.singlestat;

dashboards/user.jsonnet:4:7-38 Unused variable: singlestat
local singlestat = grafana.singlestat;

dashboards/user.jsonnet:8:7-38 Unused variable: tablePanel
local tablePanel = grafana.tablePanel;

dashboards/user.jsonnet:9:7-24 Unused variable: row
local row = grafana.row;

dashboards/user.jsonnet:10:7-42 Unused variable: heatmapPanel
local heatmapPanel = grafana.heatmapPanel;

The jsonnet-lint command (and pre-commit hook) has an issue if being passed multiple files, so we'll simply lint once per file for now. The bug is reported in https://github.com/google/go-jsonnet/issues/591.