Closed chenqi0805 closed 3 years ago
Related to StackExchange/wmi#62 but I can't reproduce locally nor does this appear to happen on CI. Maybe it's related to your GOPROXY
configuration (e.g. locally I have GOPROXY="https://proxy.golang.org,direct"
)?
@bogdandrutu saw the exact same problem and he says:
Fixed this by cleaning my golang cache.
@bogdandrutu saw the exact same problem and he says:
Fixed this by cleaning my golang cache.
Does not work in my case. Tried
go clean -cache
go clean -modcache
but go mod tidy -v
still fails
Related to StackExchange/wmi#62 but I can't reproduce locally nor does this appear to happen on CI. Maybe it's related to your
GOPROXY
configuration (e.g. locally I haveGOPROXY="https://proxy.golang.org,direct"
)?
Also tried on go version go1.16.6 linux/amd64, same error. Unfortunately, the default proxy is blocked on my corporation network, so have to change it into direct. I wonder if GOSUMDB might also have sth to do with it
Turns out adding
replace github.com/StackExchange/wmi v1.2.0 => github.com/StackExchange/wmi v1.2.1-0.20210723131906-441642c16659
into both go.mod and exporter/logzioexporter/go.mod works.
I removed the whole go folder where GOPATH is set
See https://github.com/StackExchange/wmi/pull/58#issuecomment-877265586 where the v1.2.0
tag moved
Which version you get depends on the proxy you're using, since proxy.golang.org is both default and is high traffic, in most cases it will cache the version before it was moved. sum.golang.org will also serve the checksum for the cached version. Other lower traffic proxies might only cache versions after the move, resulting in checksum mismatches.
Since moving tags is incompatible with Go's security model, the only solution is for the dependency to tag a new higher version, (which has been done in https://github.com/StackExchange/wmi/issues/62) and for consuming modules to use the new version v1.2.1
As 1.2.1 has been released, I think we can do
replace github.com/StackExchange/wmi v1.2.0 => github.com/StackExchange/wmi v1.2.1
Is this something that makes sense to add to our files? As far as I can tell, this is a transitive dependency so we need to use a replace to fix ourselves as needed. I've tried deleting my pkg cache to no avail, probably hitting what @seankhliao's is mentioning.
@anuraaga can you check if #4619 fixes the issue for you?
@mx-psi your PR broke core tests for contrib see https://github.com/open-telemetry/opentelemetry-collector/runs/3356294535
go: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter@v0.0.0-00010101000000-000000000000 requires
github.com/StackExchange/wmi@v1.2.1: missing go.sum entry; to add it:
go mod download github.com/StackExchange/wmi
I think this is not how we should fix this.
@bogdandrutu Sorry about that, I am taking a look.
FWIW, reverting the PR does not seem to fix the issue locally, so it may not be my PR (or it may be not just my PR):
@bogdandrutu Looking a bit closer, you can see the error on the Github Actions run for commit open-telemetry/opentelemetry-collector@632ed32, which is from August 11, prior to my PR being merged: https://github.com/open-telemetry/opentelemetry-collector/runs/3303527335. So this looks like an unrelated issue to me.
It's hard to tell where the issue started since contrib-tests were failing for other reasons before this error started. It may have started after open-telemetry/opentelemetry-collector#3766 which included shirou/gopsutil@7993cb68cc89146a47dcf3bd858269478d6aacc5 (I tried testing this on open-telemetry/opentelemetry-collector#3857 but it's hard to revert this since gopsutil was bumped in many places).
In any case, I think this issue can be closed and we can open a different one on the core repo.
Closing this, second issue was unrelated and was fixed on open-telemetry/opentelemetry-collector#3858
Describe the bug For the current main HEAD, at the project root
Steps to reproduce Even if I remove go.sum and run go clean -modcache, and then rerun
go mod -tidy
, it results inWhat did you expect to see? go mod -tidy should succeed
What did you see instead? It failed
What version did you use? current main HEAD
What config did you use? Config: (e.g. the yaml config file)
Environment OS: MacOS mojav 10.14.6 Compiler(if manually compiled): go1.13.4
Additional context Add any other context about the problem here.