kubernetes-monitoring / kubernetes-mixin

A set of Grafana dashboards and Prometheus alerts for Kubernetes.
Apache License 2.0
2.11k stars 597 forks source link

`make dashboards_out` fails #900

Closed marians closed 7 months ago

marians commented 7 months ago

My goal was to build dashboards locally. Here is what I have done and seen:

  1. Forked the repo into https://github.com/marians/kubernetes-mixin and forked the clone as of a1c276d7a46c4b06fa5d8b4a64441939d398efe5
  2. Ran go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest:
    go: downloading github.com/jsonnet-bundler/jsonnet-bundler v0.5.1
    go: downloading golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c
  3. Ran brew install jsonnet, but it was already installed and up-to-date
  4. Ran jb install
    GET https://github.com/grafana/grafonnet-lib/archive/a1d61cce1da59c71409b99b5c7568511fec661ea.tar.gz 200
    GET https://github.com/grafana/grafonnet/archive/fe65a22df6d3a897729fff47cff599805a2c5710.tar.gz 200
    GET https://github.com/grafana/jsonnet-libs/archive/0f4cbd9edef69a6e4dc8fa7eb70768ef1cd704e1.tar.gz 200
    GET https://github.com/grafana/grafonnet/archive/fe65a22df6d3a897729fff47cff599805a2c5710.tar.gz 200
    GET https://github.com/jsonnet-libs/docsonnet/archive/6ac6c69685b8c29c54515448eaca583da2d88150.tar.gz 200
    GET https://github.com/jsonnet-libs/xtd/archive/fc2e57a8839902ed4ba6cab5a99d642500f7102b.tar.gz 200
  5. Ran make dashboards_out

Here is the output from the last command:

mkdir -p /Users/marian/git/marians/kubernetes-mixin/tmp/bin
Installing tools from hack/tools.go
go: downloading github.com/grafana/dashboard-linter v0.0.0-20231114210226-c458893a5731
go: downloading github.com/prometheus/prometheus v0.49.1
go: downloading github.com/google/go-jsonnet v0.20.0
go: downloading github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9
go: downloading github.com/zeitlinger/conflate v0.0.0-20230622100834-279724abda8c
go: downloading cloud.google.com/go/storage v1.30.1
go: downloading google.golang.org/api v0.153.0
go: downloading google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f
go: downloading google.golang.org/genproto/googleapis/api v0.0.0-20231127180814-3a041ad873d4
go: downloading github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd
go: downloading golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb
go: downloading github.com/google/pprof v0.0.0-20231205033806-a5a03c77bf08
go: downloading github.com/edsrzf/mmap-go v1.1.0
go: downloading go.opentelemetry.io/collector/pdata v1.0.0
go: downloading github.com/dennwc/varint v1.0.0
go: downloading github.com/aws/aws-sdk-go v1.48.14
go: downloading github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0
go: downloading k8s.io/utils v0.0.0-20230711102312-30195339c3c7
go: downloading github.com/go-openapi/validate v0.22.1
go: downloading github.com/Code-Hex/go-generics-cache v1.3.1
go: downloading github.com/hetznercloud/hcloud-go/v2 v2.4.0
go: downloading github.com/miekg/dns v1.1.57
go: downloading github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1
go: downloading github.com/digitalocean/godo v1.106.0
go: downloading github.com/hashicorp/consul/api v1.26.1
go: downloading github.com/ionos-cloud/sdk-go/v6 v6.1.10
go: downloading github.com/linode/linodego v1.25.0
go: downloading github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c
go: downloading github.com/gophercloud/gophercloud v1.8.0
go: downloading github.com/ovh/go-ovh v1.4.3
go: downloading github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21
go: downloading github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b
go: downloading github.com/vultr/govultr/v2 v2.17.2
go: downloading go.opentelemetry.io/collector/semconv v0.90.1
go: downloading github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0
go: downloading github.com/go-openapi/spec v0.20.9
go: downloading github.com/hashicorp/cronexpr v1.1.2
go: downloading go.opentelemetry.io/collector/featuregate v1.0.0
tools.go:9:2: import "github.com/google/go-jsonnet/cmd/jsonnet" is a program, not an importable package
Installing tools from hack/tools.go
tools.go:9:2: import "github.com/google/go-jsonnet/cmd/jsonnet" is a program, not an importable package
/Users/marian/git/marians/kubernetes-mixin/tmp/bin/jb install
make: /Users/marian/git/marians/kubernetes-mixin/tmp/bin/jb: No such file or directory
make: *** [vendor] Error 1

My Go version is go version go1.21.6 darwin/amd64.

I followed the instructions on the main README. Thanks in advance for any assistance.

leandro-alt commented 7 months ago

I'm facing the same problem here

leandro-alt commented 7 months ago

I've found this issue https://github.com/golang/go/issues/59186#issuecomment-1617446447 and the suggested solution is to include the -e on the go list.

I've changed this line on the Makefile including the -e and I was able to complete the make dashboards_out command.

marians commented 7 months ago

Worked for me, too. Thank you @leandro-alt !

povilasv commented 7 months ago

Anyone wants to make a PR with the fix? :)

marians commented 7 months ago

Sure, I can do that. Although I don't know what the -e flag actually means.

marians commented 7 months ago

PR is in https://github.com/kubernetes-monitoring/kubernetes-mixin/pull/901

imroc commented 7 months ago

I'm facing the same problem here