Go:1.16 install promtool

424 views
Skip to first unread message

Dominik Meyer

unread,
Mar 4, 2021, 5:19:30 AM3/4/21
to Prometheus Users
❯ go version
go version go1.16 darwin/amd64

Neither of these work:

Error:

Has anyone a solution for that?
I can also not use go:1.13.1 as latest prometheus versions need go:^1.14

With go 1.13:
7##[error]../../../../go/src/github.com/prometheus/exporter-toolkit/web/tls_config.go:271:21: undefined: tls.CipherSuites
8##[error]../../../../go/src/github.com/prometheus/exporter-toolkit/web/tls_config.go:281:9: undefined: tls.CipherSuiteName
9##[error]Process completed with exit code 2.

Julien Pivotto

unread,
Mar 4, 2021, 5:33:57 AM3/4/21
to Dominik Meyer, Prometheus Users
On 04 Mar 02:19, Dominik Meyer wrote:
> ❯ go version
> go version go1.16 darwin/amd64
>
> Neither of these work:
> - go get -v github.com/prometheus/prometheus/cmd/promtool
> - go install -v github.com/prometheus/prometheus/cmd/promtool@latest


Can you try GO111MODULE=on go get github.com/prometheus/prometheus/cmd/promtool


Thanks

>
> Error:
> go: finding module for package github.com/Azure/azure-sdk-for-go/arm/compute
> ../../../.go/pkg/mod/github.com/prometheus/prome...@v2.5.0+incompatible/discovery/azure/azure.go:24:2:
> module github.com/Azure/azure-sdk-for-go@latest found
> (v52.3.0+incompatible), but does not contain package
> github.com/Azure/azure-sdk-for-go/arm/compute
> ../../../.go/pkg/mod/github.com/prometheus/prome...@v2.5.0+incompatible/discovery/azure/azure.go:25:2:
> module github.com/Azure/azure-sdk-for-go@latest found
> (v52.3.0+incompatible), but does not contain package
> github.com/Azure/azure-sdk-for-go/arm/network
>
> Has anyone a solution for that?
> I can also not use go:1.13.1 as latest prometheus versions need go:^1.14
>
> With go 1.13:
> # github.com/prometheus/exporter-toolkit/web
> 7
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92929?check_suite_focus=true#step:4:7>##[error]../../../../go/src/github.com/prometheus/exporter-toolkit/web/tls_config.go:271:21:
> undefined: tls.CipherSuites
> 8
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92929?check_suite_focus=true#step:4:8>##[error]../../../../go/src/github.com/prometheus/exporter-toolkit/web/tls_config.go:281:9:
> undefined: tls.CipherSuiteName
> 9
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92929?check_suite_focus=true#step:4:9>##[error]Process
> completed with exit code 2.
>
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/e9869bbf-375f-4001-908a-9dde024225f2n%40googlegroups.com.


--
Julien Pivotto
@roidelapluie

Dominik Meyer

unread,
Mar 4, 2021, 5:40:20 AM3/4/21
to Prometheus Users
Thanks. Either I use it wrong or it does not help

Run if ! foobar_loc="$(type -p promtool)" || [[ -z $foobar_loc ]]; then GO111MODULE=on go get github.com/prometheus/prometheus/cmd/promtool; fi
2 if ! foobar_loc="$(type -p promtool)" || [[ -z $foobar_loc ]]; then GO111MODULE=on go get github.com/prometheus/prometheus/cmd/promtool; fi
3 shell: /usr/bin/bash -e {0}
4 env:
5 GOROOT: /opt/hostedtoolcache/go/1.16.0/x64

Julien Pivotto

unread,
Mar 4, 2021, 5:41:56 AM3/4/21
to Dominik Meyer, Prometheus Users
On 04 Mar 02:40, Dominik Meyer wrote:
> Thanks. Either I use it wrong or it does not help


mmmh maybe GO111MODULE=on go get github.com/prometheus/prometheus/cmd/promtool@master

?
>
> *Run if ! foobar_loc="$(type -p promtool)" || [[ -z $foobar_loc ]]; then
> GO111MODULE=on go get github.com/prometheus/prometheus/cmd/promtool; fi *
> *2
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92973?check_suite_focus=true#step:4:2>
> if ! foobar_loc="$(type -p promtool)" || [[ -z $foobar_loc ]]; then
> GO111MODULE=on go get github.com/prometheus/prometheus/cmd/promtool; fi *
> *3
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92973?check_suite_focus=true#step:4:3>
> shell: /usr/bin/bash -e {0} *
> *4
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92973?check_suite_focus=true#step:4:4>
> env: *
> *5
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92973?check_suite_focus=true#step:4:5>
> GOROOT: /opt/hostedtoolcache/go/1.16.0/x64 *
> *6
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92973?check_suite_focus=true#step:4:6>github.com/prometheus/prometheus/cmd/promtool
> imports *
> *7
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92973?check_suite_focus=true#step:4:7>
> github.com/prometheus/prometheus/config imports *
> *8
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92973?check_suite_focus=true#step:4:8>
> github.com/prometheus/prometheus/discovery/config imports *
> *9
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92973?check_suite_focus=true#step:4:9>
> github.com/prometheus/prometheus/discovery/azure imports *
> *10
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92973?check_suite_focus=true#step:4:10>
> github.com/Azure/azure-sdk-for-go/arm/compute: cannot find module providing
> package github.com/Azure/azure-sdk-for-go/arm/compute *
> *11
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92973?check_suite_focus=true#step:4:11>github.com/prometheus/prometheus/cmd/promtool
> imports *
> *12
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92973?check_suite_focus=true#step:4:12>
> github.com/prometheus/prometheus/config imports *
> *13
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92973?check_suite_focus=true#step:4:13>
> github.com/prometheus/prometheus/discovery/config imports *
> *14
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92973?check_suite_focus=true#step:4:14>
> github.com/prometheus/prometheus/discovery/azure imports *
> *15
> <https://github.tools.sap/coresystemsFSM/3rdparty-infrastructure/runs/92973?check_suite_focus=true#step:4:15>
> github.com/Azure/azure-sdk-for-go/arm/network: cannot find module providing
> package github.com/Azure/azure-sdk-for-go/arm/network*
>
> On Thursday, 4 March 2021 at 11:33:57 UTC+1 Julien Pivotto wrote:
>
> > On 04 Mar 02:19, Dominik Meyer wrote:
> > > ❯ go version
> > > go version go1.16 darwin/amd64
> > >
> > > Neither of these work:
> > > - go get -v github.com/prometheus/prometheus/cmd/promtool
> > > - go install -v github.com/prometheus/prometheus/cmd/promtool@latest
> >
> >
> > Can you try GO111MODULE=on go get
> > github.com/prometheus/prometheus/cmd/promtool
> >
> >
> > Thanks
> >
> > >
> > > Error:
> > > go: finding module for package
> > github.com/Azure/azure-sdk-for-go/arm/compute
> > > ../../../.go/pkg/mod/
> > github.com/prometheus/prome...@v2.5.0+incompatible/discovery/azure/azure.go:24:2
> > <http://github.com/prometheus/prome...@v2.5.0+incompatible/discovery/azure/azure.go:24:2>:
> >
> > > module github.com/Azure/azure-sdk-for-go@latest found
> > > (v52.3.0+incompatible), but does not contain package
> > > github.com/Azure/azure-sdk-for-go/arm/compute
> > > ../../../.go/pkg/mod/
> > github.com/prometheus/prome...@v2.5.0+incompatible/discovery/azure/azure.go:25:2
> > <http://github.com/prometheus/prome...@v2.5.0+incompatible/discovery/azure/azure.go:25:2>:
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/0ced28d3-4218-4b71-bb49-6b460a2aced4n%40googlegroups.com.


--
Julien Pivotto
@roidelapluie
Message has been deleted
Message has been deleted

Dominik Meyer

unread,
Mar 4, 2021, 7:36:15 AM3/4/21
to Prometheus Users
This did it! 🎉  Thank you.

Accepted answer: GO111MODULE=on go get github.com/prometheus/prometheus/cmd/promtool@master

So if someone can extend my answer on how to use a pinned version that would be perfect.
On Thursday, 4 March 2021 at 13:35:23 UTC+1 Dominik Meyer wrote:
Actually, that does not work. So if someone can extend my answer on how to use a pinned version that would be perfect.

On Thursday, 4 March 2021 at 12:00:22 UTC+1 Dominik Meyer wrote:
This did it! 🎉  Thank you.

One question remains. Should I keep master or take a specific tag. But that I can figure.

Accepted answer: GO111MODULE=on go get github.com/prometheus/prometheus/cmd/promtool@master

Annotation: Consider using a tag or sha e.g. GO111MODULE=on go get github.com/prometheus/prometheus/cmd/promtool@v2.25.0

Julien Pivotto

unread,
Mar 4, 2021, 8:27:19 AM3/4/21
to Dominik Meyer, Prometheus Users
On 04 Mar 04:35, Dominik Meyer wrote:
> Actually, that does not work. So if someone can extend my answer on how to
> use a pinned version that would be perfect.


You can use

GO111MODULE=on go get github.com/prometheus/prometheus/cmd/prom...@release-2.25

>
> On Thursday, 4 March 2021 at 12:00:22 UTC+1 Dominik Meyer wrote:
>
> > This did it! 🎉 Thank you.
> >
> > One question remains. Should I keep master or take a specific tag. But
> > that I can figure.
> >
> > Accepted answer: GO111MODULE=on go get
> > github.com/prometheus/prometheus/cmd/promtool@master
> >
> > Annotation: Consider using a tag or sha e.g. GO111MODULE=on go get
> > github.com/prometheus/prometheus/cmd/promtool@
> > <http://github.com/prometheus/prometheus/cmd/promtool@master>v2.25.0
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/a261afd5-e62e-495d-8187-492725c1c3cfn%40googlegroups.com.


--
Julien Pivotto
@roidelapluie
Reply all
Reply to author
Forward
0 new messages