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

Cleanup logic to populate variables no longer needed #125

Closed consideRatio closed 7 months ago

consideRatio commented 7 months ago

We had logic to pre-populate variables values, but I've conluded it doesn't seem to be needed any more. Whenever I deploy entirely fresh dashboards and visit them, the variables are up to date. I think they are both refreshed on load and on time range change now.

refresh-variables

Related config

query.refresh.onLoad and query.refresh.onTime could be declared explicitly four our variables declared here, but the default seems to be to have those refresh, which is fine and makes us not need the code removed in this PR.

Related issues

consideRatio commented 7 months ago

I've rechecked all dashboards - this work the same with and without this functionality.

I also think now that this would close #32 and #98, which have errors related to the removed code.

consideRatio commented 7 months ago

I did a third self-review and went for a self-merge!

I worry that the bugs in this code this could cause someone looking to trial these dashboards to fail. I just suggested in https://discourse.jupyter.org/t/grafana-dashboard/25249/3 that a user could try deploy at least one of the dashboards in a non-k8s context - and I guess without knowing that this code could be erroring for a grafana deployed outside k8s context.