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

Update grafonnet import paths to absolute import paths #139

Closed raphaelzoellner closed 1 month ago

raphaelzoellner commented 2 months ago

Context

Users integrating the dashboards into mixins might use colliding relative import paths.

This might be for example the case for: https://github.com/grafana/grafonnet https://github.com/grafana/grafonnet-lib (subdir grafonnet)

Using absolute import paths instead of relative import paths should resolve this collision for dependencies in distinct repositories.

Description

This PR updates the relative import paths grafonnet/main.libsonnet to absolute import paths github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/main.libsonnet to avoid jsonnet import path collisions.

consideRatio commented 1 month ago

Thank you @raphaelzoellner, lets do it!

There is a symlink file in vendor/ pointing to the version used, and that remains an option for externally managed .jsonnet dashboards to be rendered without pinning the grafonnet version explicitly. I figure we let that remain there as this PR currently does.

consideRatio commented 1 month ago

I appreciate the work you put into the writing a context for this PR! I don't understand golang aspects well as I haven't spent much time working with it.