Kube-prometheus: jb install fails for release-0.8

Created on 27 Apr 2021  路  3Comments  路  Source: prometheus-operator/kube-prometheus

What happened?
Ran jb install github.com/prometheus-operator/kube-prometheus/jsonnet/[email protected] in a fresh directory to start trying to migrate over from release-0.7
jb panics on alertmanager-mixin with a no such file or directory error:

[hubbe@galactica monitoring]$ jb install github.com/prometheus-operator/kube-prometheus/jsonnet/[email protected]
GET https://github.com/prometheus-operator/kube-prometheus/archive/d2f8152a8bdca66492c106830b1fb4072421445e.tar.gz 200
GET https://github.com/kubernetes/kube-state-metrics/archive/b1889aa1561ee269f628e2b9659155e7714dbbf0.tar.gz 200
GET https://github.com/prometheus/alertmanager/archive/a7f9fdadbecbb7e692d2cd8d3334e3d6de1602e1.tar.gz 200
panic: rename /home/hubbe/Projects/selfhost-services/monitoring/vendor/.tmp/jsonnetpkg-github.com-prometheus-alertmanager-doc-alertmanager-mixin-release-0.21542534759/doc/alertmanager-mixin /home/hubbe/Projects/selfhost-services/monitoring/vendor/github.com/prometheus/alertmanager/doc/alertmanager-mixin: no such file or directory

goroutine 1 [running]:
github.com/jsonnet-bundler/jsonnet-bundler/pkg.(*GitPackage).Install(0xc0006ac020, 0x8c2f00, 0xc000014160, 0xc0002f61c0, 0x39, 0xc00001c9c0, 0x38, 0xc0003fcfa0, 0xc, 0x0, ...)
    /Users/tbraack/work/jsonnet-bundler/pkg/git.go:220 +0x1deb
github.com/jsonnet-bundler/jsonnet-bundler/pkg.download(0xc000073180, 0x0, 0xc0003fcfa0, 0xc, 0x0, 0x0, 0x0, 0xc0003fcfb0, 0xc, 0xc00001c9c0, ...)
    /Users/tbraack/work/jsonnet-bundler/pkg/packages.go:289 +0x1aa
github.com/jsonnet-bundler/jsonnet-bundler/pkg.ensure(0xc000167680, 0xc00001c9c0, 0x38, 0xc000011fb0, 0x0, 0x0, 0x0)
    /Users/tbraack/work/jsonnet-bundler/pkg/packages.go:233 +0x6c8
github.com/jsonnet-bundler/jsonnet-bundler/pkg.ensure(0xc000011f50, 0xc00001c9c0, 0x38, 0xc000011fb0, 0x38, 0x0, 0x1)
    /Users/tbraack/work/jsonnet-bundler/pkg/packages.go:259 +0xef6
github.com/jsonnet-bundler/jsonnet-bundler/pkg.Ensure(0xc000011f50, 0x1, 0xc00001c9c0, 0x38, 0xc000011fb0, 0x0, 0x0, 0x0)
    /Users/tbraack/work/jsonnet-bundler/pkg/packages.go:55 +0x67
main.installCommand(0xc00001c0c4, 0x31, 0x82ea8b, 0x6, 0xc000060f00, 0x1, 0x1, 0x0, 0x0)
    /Users/tbraack/work/jsonnet-bundler/cmd/jb/install.go:76 +0x74c
main.Main(0xc0000200b8)
    /Users/tbraack/work/jsonnet-bundler/cmd/jb/main.go:82 +0xb07
main.main()
    /Users/tbraack/work/jsonnet-bundler/cmd/jb/main.go:37 +0x22

Did you expect to see some different?
I would expect kube-prometheus to install cleanly in a fresh directory.

How to reproduce it (as minimally and precisely as possible):
Follow steps in https://github.com/prometheus-operator/kube-prometheus#installing replacing release-0.7 with release-0.8

$ mkdir my-kube-prometheus; cd my-kube-prometheus
$ jb init
$ jb install github.com/prometheus-operator/kube-prometheus/jsonnet/[email protected]

Environment
Arch Linux
jsonnet v0.17.0
jsonnet-bundler v0.4.0

kinbug

All 3 comments

Indeed, we need to pin to master in alertmanager mixin as https://github.com/prometheus/alertmanager/tree/master/doc/alertmanager-mixin doesn't exist on release-0.21. I wonder why this wasn't picked up in our tests :thinking:

This should be fixed now. @HubbeKing can you confirm?

Yup! jb init && jb install github.com/prometheus-operator/kube-prometheus/jsonnet/[email protected] now succeeds when ran in a new directory. Thanks for looking into this!

Was this page helpful?
0 / 5 - 0 ratings