Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running mod download: unknown revision v3.0.82 #149

Open
casep opened this issue Jul 5, 2021 · 4 comments
Open

Error when running mod download: unknown revision v3.0.82 #149

casep opened this issue Jul 5, 2021 · 4 comments
Assignees
Labels
bug Something isn't working
Projects

Comments

@casep
Copy link

casep commented Jul 5, 2021

Hi,
After cloning the repo (Fedora 34 , go version go1.16.5 linux/amd64, don't know if that matters) and running the mod download comment I get this

$ go mod download go: github.com/hashicorp/terraform@v0.15.3 requires github.com/tencentcloud/tencentcloud-sdk-go@v3.0.82+incompatible: reading github.com/tencentcloud/tencentcloud-sdk-go/go.mod at revision v3.0.82: unknown revision v3.0.82

Any idea?

Cheers,
Carlos

@xescugc xescugc added the bug Something isn't working label Jul 5, 2021
@xescugc
Copy link
Member

xescugc commented Jul 5, 2021

It's weird to get this error as the CI that runs the test also has to download everything (automatically done by go test ./...).

I would suggest to run the go test ./... just to see the same error.

And potentially from the docs I did see

The -x flag causes download to print the commands download executes to standard error.

So potentially with that we may get more info.

If not I'll try to create a Docker image for Fedora and try to reproduce it.

@xescugc xescugc self-assigned this Jul 5, 2021
@xescugc xescugc added this to In progress in InfraMap Jul 5, 2021
@casep
Copy link
Author

casep commented Jul 5, 2021

Hi,
Test produced the same error
$ go test ./... go: github.com/hashicorp/terraform@v0.15.3 requires github.com/tencentcloud/tencentcloud-sdk-go@v3.0.82+incompatible: reading github.com/tencentcloud/tencentcloud-sdk-go/go.mod at revision v3.0.82: unknown revision v3.0.82

-x output

$ go mod download -x mkdir -p /home/casep/go/pkg/mod/cache/vcs # git3 https://github.com/tencentcloud/tencentcloud-sdk-go /# lock /home/casep/go/pkg/mod/cache/vcs/48d0913117235a203a131cd99c79e6a402648f1c5ef7f7cdf0b1fb88954acd33.lock/# /home/casep/go/pkg/mod/cache/vcs/48d0913117235a203a131cd99c79e6a402648f1c5ef7f7cdf0b1fb88954acd33 for git3 https://github.com/tencentcloud/tencentcloud-sdk-go cd /home/casep/go/pkg/mod/cache/vcs/48d0913117235a203a131cd99c79e6a402648f1c5ef7f7cdf0b1fb88954acd33; git tag -l 0.003s # cd /home/casep/go/pkg/mod/cache/vcs/48d0913117235a203a131cd99c79e6a402648f1c5ef7f7cdf0b1fb88954acd33; git tag -l cd /home/casep/go/pkg/mod/cache/vcs/48d0913117235a203a131cd99c79e6a402648f1c5ef7f7cdf0b1fb88954acd33; git ls-remote -q origin 0.441s # cd /home/casep/go/pkg/mod/cache/vcs/48d0913117235a203a131cd99c79e6a402648f1c5ef7f7cdf0b1fb88954acd33; git ls-remote -q origin go: github.com/hashicorp/terraform@v0.15.3 requires github.com/tencentcloud/tencentcloud-sdk-go@v3.0.82+incompatible: reading github.com/tencentcloud/tencentcloud-sdk-go/go.mod at revision v3.0.82: unknown revision v3.0.82

Cheers,
Carlos

@casep
Copy link
Author

casep commented Jul 5, 2021

Builds okay on a RockyLinux box

$ ./inframap version The current version is: v0.6.6-4-gda38573

So it could be Fedora related.

@xescugc
Copy link
Member

xescugc commented Jul 6, 2021

Ok I was able to reproduce the error with:

docker run --name fedora_bash --rm -i -t fedora:34 bash

And then installing latest version of GO and running https://github.com/cycloidio/inframap#development

Also tried

docker run --name debian_bash --rm -i -t debian:buster bash

And then installed latest version of Go and installed inframap but this time it worked.

So we can say that is related to Fedora.

Next I've checked the lib that is failing, IDK what it is and I don't speak the language so even worse haha.

But I did found this https://github.com/TencentCloud/tencentcloud-sdk-go/blob/master/doc.go

// Package doc
// go get -u github.com/tencentcloud/tencentcloud-sdk-go
// package github.com/tencentcloud/tencentcloud-sdk-go: no Go files in /Users/xxx/go/src/github.com/tencentcloud/tencentcloud-sdk-go
// FIXME: this is a workaround for above go get issue, a fake file does nothing but claims we are a go project.
// Eventually we need something useful here, such as real documentation, version and etc.
// To get the package of all products at once, the package of each product is added in the imports code as side-effects.

IDK if it could fix anything.

Also found hashicorp/terraform#29021 which is 100% the same issue, and also TencentCloud/tencentcloud-sdk-go#125 which is the one the guy opened too.

From this I get that it's an issue from the lib that broke compatibility with that.

One of the solutions purposed is to use replace to have a fixed version, I'll try that and see if it works fine with Fedora 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
InfraMap
In progress
Development

No branches or pull requests

2 participants