Repo github.com/thanos-io/thanos at version v0.25.2 uses replace directive to pin dependency github.com/bradfitz/gomemcache to version 24332e2.
According to Go Modules wikis, replace directives in modules other than the main module are ignored when building the main module.
It means such replace usage in dependency's go.mod cannot be inherited when building main module. And it turns out that observatorium/thanos-receive-controller indirectly relies on bradfitz/gomemcache@a41fca8, which is different from the pinned version thanos-io/thanos needed.
Dependency line:
github.com/observatorium/thanos-receive-controller --> github.com/thanos-io/thanos --> github.com/bradfitz/gomemcache
github.com/thanos-io/thanos v0.25.2 --> github.com/bradfitz/gomemcache 24332e2
https://github.com/thanos-io/thanos/blob/v0.25.2/go.mod#L210
Background
Repo
github.com/thanos-io/thanos
at versionv0.25.2
uses replace directive to pin dependencygithub.com/bradfitz/gomemcache
to version24332e2
.According to Go Modules wikis,
replace
directives in modules other than themain module
are ignored when building the main module. It means such replace usage in dependency's go.mod cannot be inherited when building main module. And it turns out thatobservatorium/thanos-receive-controller
indirectly relies onbradfitz/gomemcache@a41fca8
, which is different from the pinned versionthanos-io/thanos
needed.2. Add the same replace rule to your go.mod