Closed MichaHoffmann closed 5 months ago
@MichaHoffmann can you give me a bit more context? How is this code affecting external behavior in the Thanos build?
@squat There is the new "stringlabels" code in Prometheus itself. When switching to this implementation, accessing the slice directly is no longer allowed.
Here's what you get if you build prom-label-proxy now:
$ go build --tags=stringlabels .
# github.com/prometheus-community/prom-label-proxy/injectproxy
injectproxy/rules.go:210:24: cannot range over rule.Labels() (value of type "github.com/prometheus/prometheus/model/labels".Labels)
injectproxy/rules.go:234:23: cannot range over alert.Labels (variable of type "github.com/prometheus/prometheus/model/labels".Labels)
With this change, the build is successful.
@MichaHoffmann can you give me a bit more context? How is this code affecting external behavior in the Thanos build?
What @SuperQ said! Just adding context that I want to convert Thanos to be compatible with the stringlabels tag and there are more build failures, this was just one of them and it seemed easy enough to fix.
And soon -tags dedupelabels
- https://github.com/prometheus/prometheus/pull/12304
I wanted to proceed a bit on trying to convert thanos to build with stringlabels and prom-label-proxy is used as a library there. This would fix this build error for me!