G-Research / geras

Geras provides a Thanos Store API for the OpenTSDB HTTP API. This makes it possible to query OpenTSDB via PromQL, through Thanos.
https://github.com/G-Research/geras
Apache License 2.0
38 stars 16 forks source link

Fix Docker image building by upgrading to Go 1.17 #96

Closed jgiannuzzi closed 2 years ago

jgiannuzzi commented 2 years ago

~We should probably upgrade to a newer version of Go, but at least this makes Geras buildable again.~

Ran go tidy, upgraded Go version in go.mod to 1.17, and fixed the warning during grpc-health-probe installation.

dgl commented 2 years ago

FWIW, the fix is literally running go get as the error points out:

--- a/go.mod
+++ b/go.mod
@@ -5,6 +5,7 @@ go 1.15
 require (
        github.com/G-Research/opentsdb-goclient v0.0.0-20191219203319-f9f2aa5b26
24
        github.com/go-kit/kit v0.9.0
+       github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect

That works on go 1.17. The breakage was kind of deliberate, go 1 compatibility promise means code shouldn't have to change, but there might be small tooling fixes, which it's worth keeping up with.

jgiannuzzi commented 2 years ago

Thanks for pointing this out @dgl!

I will update my PR to upgrade properly to Go 1.17 and run go tidy.