Title
#general
g

Giovanni Tirloni

06/13/2022, 12:29 PM
Hey folks, anyone able to build infracost from the main branch?
$ make
...
go install <http://github.com/golangci/golangci-lint/cmd/golangci-lint@latest|github.com/golangci/golangci-lint/cmd/golangci-lint@latest>
go mod download
go: <http://github.com/hashicorp/terraform@v0.15.3|github.com/hashicorp/terraform@v0.15.3> requires
        <http://github.com/tencentcloud/tencentcloud-sdk-go@v3.0.82+incompatible|github.com/tencentcloud/tencentcloud-sdk-go@v3.0.82+incompatible>: reading <http://github.com/tencentcloud/tencentcloud-sdk-go/go.mod|github.com/tencentcloud/tencentcloud-sdk-go/go.mod> at revision v3.0.82: unknown revision v3.0.82
make: *** [Makefile:16: deps] Error 1
Alistair (Infracost)

Alistair (Infracost)

06/13/2022, 12:32 PM
Hmm odd, I haven’t seen this but giving it a shot now
g

Giovanni Tirloni

06/13/2022, 12:32 PM
It must something in my environment, I don't know.... Also see this:
$ make release
CGO_ENABLED=0 go build -ldflags="-X '<http://github.com/infracost/infracost/internal/version.Version=v0.10.3-dirty|github.com/infracost/infracost/internal/version.Version=v0.10.3-dirty>'" -v -o build/infracost <http://github.com/infracost/infracost/cmd/infracost|github.com/infracost/infracost/cmd/infracost>
go: downloading <http://github.com/open-policy-agent/opa|github.com/open-policy-agent/opa> v0.40.0
go: downloading <http://github.com/hashicorp/hcl|github.com/hashicorp/hcl> v1.0.1-vault
go: downloading <http://golang.org/x/oauth2|golang.org/x/oauth2> v0.0.0-20211104180415-d3ed0bb246c8
go: downloading <http://github.com/aliscott/go-pretty/v6|github.com/aliscott/go-pretty/v6> v6.1.1-0.20210226104003-408905a61c8e
go: downloading <http://github.com/chzyer/readline|github.com/chzyer/readline> v0.0.0-20180603132655-2972be24d48e
go: downloading <http://github.com/aws/aws-sdk-go|github.com/aws/aws-sdk-go> v1.41.7
get "<http://golang.org/x/oauth2|golang.org/x/oauth2>": found meta tag vcs.metaImport{Prefix:"<http://golang.org/x/oauth2|golang.org/x/oauth2>", VCS:"git", RepoRoot:"<https://go.googlesource.com/oauth2>"} at //golang.org/x/oauth2?go-get=1
verifying <http://github.com/hashicorp/hcl@v1.0.1-vault|github.com/hashicorp/hcl@v1.0.1-vault>: checksum mismatch
        downloaded: h1:/JhJsLUPC73zeqSbkZApgsofP4iB++zgDHS5t6ZL0Lc=
        go.sum:     h1:UiJeEzCWAYdVaJr8Xo4lBkTozlW1+1yxVUnpbS1xVEk=

SECURITY ERROR
This download does NOT match an earlier download recorded in go.sum.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

For more information, see 'go help module-auth'.
make: *** [Makefile:25: build] Error 1
12:33 PM
I'm using go 1.18.2
Alistair (Infracost)

Alistair (Infracost)

06/13/2022, 12:34 PM
Works for me with
go version go1.18.2 darwin/amd64
. Does it work if you run
go clean -modcache
first?
g

Giovanni Tirloni

06/13/2022, 12:51 PM
sorry for the delay, it took a while to download/build everything.. but same error:
go mod download
go: <http://github.com/hashicorp/terraform@v0.15.3|github.com/hashicorp/terraform@v0.15.3> requires
        <http://github.com/tencentcloud/tencentcloud-sdk-go@v3.0.82+incompatible|github.com/tencentcloud/tencentcloud-sdk-go@v3.0.82+incompatible>: reading <http://github.com/tencentcloud/tencentcloud-sdk-go/go.mod|github.com/tencentcloud/tencentcloud-sdk-go/go.mod> at revision v3.0.82: unknown revision v3.0.82
make: *** [Makefile:16: deps] Error 1
if it works for you don't worry, i'll have more time to debug this later in the day. thanks for looking into it
Alistair (Infracost)

Alistair (Infracost)

06/13/2022, 1:13 PM
g

Giovanni Tirloni

06/13/2022, 1:22 PM
I'm on Fedora 36 and installed go from their packages... one of the linked issues mentions the FC packages breaking things.. I don't know what they changed in there but installing go 1.18.3 from the golang.org tar.gz fixed the issue. Thank you!
Alistair (Infracost)

Alistair (Infracost)

06/13/2022, 1:22 PM
Maybe adding this at the bottom of go.mod will fix it for just now:
replace <http://github.com/TencentCloud/tencentcloud-sdk-go|github.com/TencentCloud/tencentcloud-sdk-go> => <http://github.com/TencentCloud/tencentcloud-sdk-go|github.com/TencentCloud/tencentcloud-sdk-go> v0.0.0-20190816164403-f8fa457a3c72
I got the commit from here
1:23 PM
Ah okay awesome, maybe it was using a different go proxy where that package had been purged from