I tried running query service using `go run main.g...
# support
a
I tried running query service using
go run main.go
(inside
pkg/query-service
), but for adding new dependencies like
viper
, I had to pin its version like
go get <http://github.com/spf13/viper@v1.0.0|github.com/spf13/viper@v1.0.0>
to make it work. Go version:
v1.14.7
On using
go mod tidy
or
go build
, dependencies seem to collide. When I add new dependencies like
viper
to the project, the Docker build (
make build-query-service-amd64
) and locally building query service fails. Full error stacktrace:
Copy code
./../../../.gvm/pkgsets/go1.14.7/global/pkg/mod/github.com/!sig!noz/prometheus@v1.9.68/discovery/consul/consul.go:27:2: ambiguous import: found package <http://github.com/hashicorp/consul/api|github.com/hashicorp/consul/api> in multiple modules:
        <http://github.com/hashicorp/consul|github.com/hashicorp/consul> v1.1.1-0.20180615161029-bed22a81e9fd (/home/user/.gvm/pkgsets/go1.14.7/global/pkg/mod/github.com/hashicorp/consul@v1.1.1-0.20180615161029-bed22a81e9fd/api)
        <http://github.com/hashicorp/consul/api|github.com/hashicorp/consul/api> v1.12.0 (/home/user/.gvm/pkgsets/go1.14.7/global/pkg/mod/github.com/hashicorp/consul/api@v1.12.0)
The problem is in
<http://github.com/signoz/prometheus|github.com/signoz/prometheus>
, it seems. I replicated the same issue in an isolated environment (Docker) and used multiple go versions (1.14, 1.17) using
gvm
, but the issue still persists.
FYI, pinning dependency versions work, but it is tedious for pinning versions for each new added dependency; could we update SigNoz to use at least Go 1.16 by the next release?
v
@User Looks like this is due to using very old version of prometheus.
a
I can confirm this is true, as even after pinning depedency versions, the above error still arises. The
main
branch of
prometheus
is almost ~800+ commits ahead of SigNoz's fork.
v
@User We are planning to deprecate prometheus within next 2 weeks which will also solve the dependency issues. Please pick some other task for now. Thanks
a
No worries! I solved it using
replace <http://github.com/hashicorp/consul|github.com/hashicorp/consul> => <http://github.com/hashicorp/consul/api|github.com/hashicorp/consul/api> v1.1.0
in #821.
🙌 1
v
Cool