Skip to content

Let deploy.py fail verbosively if jsonnet - golang version - isn't on path #112

Closed
@consideRatio

Description

@consideRatio

Its a hidden requirement, lets fail explicitly.

Actually, I think we require jsonnet from the golang project specifically since #90 was merged upgrading grafonnet to version 10.4.0 - so we should check for that.

Failure from using c++ based jsonnet (version 0.17.0 I think):

RUNTIME ERROR: field does not exist: get
	vendor/grafonnet/custom/util/././panel.libsonnet:112:22-29	object <anonymous>
	vendor/grafonnet/custom/util/././panel.libsonnet:220:18-33	function <func>
	std.jsonnet:789:24-47	thunk <running>
	std.jsonnet:789:9-57	function <aux>
	std.jsonnet:789:9-57	function <aux>
	std.jsonnet:790:5-28	function <anonymous>
	vendor/grafonnet/custom/util/././panel.libsonnet:([21](https://github.com/2i2c-org/infrastructure/actions/runs/8660326053/job/23748043528#step:7:22)6:5)-(228:6)	function <anonymous>
	vendor/grafonnet/custom/util/./grid.libsonnet:74:25-101	thunk <uncollapsed>
	vendor/grafonnet/custom/util/./grid.libsonnet:76:45-56	thunk <panels>
	vendor/grafonnet/custom/util/././panel.libsonnet:[25](https://github.com/2i2c-org/infrastructure/actions/runs/8660326053/job/23748043528#step:7:26)0:31-37	
	...
	vendor/grafonnet/clean/../custom/./util/./panel.libsonnet:57:12-18	thunk <panels>
	vendor/grafonnet/clean/../custom/./util/./panel.libsonnet:54:9-15	thunk <arr>
	std.jsonnet:790:15-18	thunk <arr>
	std.jsonnet:786:28-31	
	std.jsonnet:786:17-32	function <aux>
	std.jsonnet:790:5-28	function <anonymous>
	vendor/grafonnet/clean/../custom/./util/./panel.libsonnet:(21:7)-(56:8)	function <infunc>
	vendor/grafonnet/clean/../custom/./util/./panel.libsonnet:57:5-19	function <anonymous>
	vendor/grafonnet/clean/../custom/dashboard.libsonnet:[27](https://github.com/2i2c-org/infrastructure/actions/runs/8660326053/job/23748043528#step:7:28):12-48	object <anonymous>
	During manifestation	
Traceback (most recent call last):
  File "/home/runner/work/infrastructure/infrastructure/grafana-dashboards/./deploy.py", line 205, in <module>
    main()
  File "/home/runner/work/infrastructure/infrastructure/grafana-dashboards/./deploy.py", line 200, in main
    deploy_dashboard(dashboard, args.folder_uid, api)
  File "/home/runner/work/infrastructure/infrastructure/grafana-dashboards/./deploy.py", line 72, in deploy_dashboard
    db = build_dashboard(dashboard_path, api)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/infrastructure/infrastructure/grafana-dashboards/./deploy.py", line 58, in build_dashboard

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions