You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
ocb fails to build collector-contrib in Github workspace due to failing to download go 1.22 (not a specific distro/version)
Steps to reproduce
open collector-contrib on github workspace and run make e2e test
opentelemetry-collector-contrib git:(main) make e2e-test
/home/bits/go/src/github.com/DataDog/opentelemetry-collector-contrib/.tools/builder --skip-compilation --config cmd/otelcontribcol/builder-config.yaml --output-path cmd/otelcontribcol
Flag --output-path has been deprecated, use config distribution::output_path
2024-12-10T21:14:11.753Z INFO internal/command.go:97 OpenTelemetry Collector Builder {"version": "v0.115.1-0.20241206185113-3f3e208e71b8"}
2024-12-10T21:14:11.753Z INFO internal/command.go:102 Using config file {"path": "cmd/otelcontribcol/builder-config.yaml"}
2024-12-10T21:14:11.758Z INFO builder/config.go:162 Using go {"go-executable": "/usr/local/go/bin/go"}
2024-12-10T21:14:11.766Z INFO builder/main.go:99 Sources created {"path": "cmd/otelcontribcol"}
Error: failed to update go.mod: go subcommand failed with args '[mod tidy -compat=1.22]': exit status 1, error message: go: downloading go1.22 (linux/amd64)
go: download go1.22 for linux/amd64: toolchain not available
make: *** [Makefile:347: genotelcontribcol] Error 1
What did you expect to see?
e2e test runs sucessfully
What did you see instead?
see error message above
What version did you use?
What config did you use?
Environment
Github workspace
Additional context
as @ankitpatel96 pointed out to me, it seems that from Go 1.21 and onward, there needs to be a sub-version specified in go.mod files. golang/go#62278
Also, all the other go.mod files in collector repo have a 1.22.0 specification, so this seems like an easy, uncontroversial fix.
The text was updated successfully, but these errors were encountered:
it seems that from Go 1.21 and onward, there needs to be a sub-version specified in go.mod files. golang/go#62278
There is no requirement for this, as you can see, for example, on the stdlib go.mod. Modules are free to use the 'language version' go 1.22 which has a different ordering from go 1.22.0 when it comes to beta versions (see here). I think this comment summarizes the (confusing) situation well: golang/go#62278 (comment).
Error: failed to update go.mod: go subcommand failed with args '[mod tidy -compat=1.22]': exit status 1, error message: go: downloading go1.22 (linux/amd64)
go: download go1.22 for linux/amd64: toolchain not available
thanks for the update; glad Golang has fixed this issue. It still might be worth allowing ocb to set a "toolchain" version based on the current go environment; I'll play around a little more with that.
Describe the bug
ocb fails to build collector-contrib in Github workspace due to failing to download go 1.22 (not a specific distro/version)
Steps to reproduce
open collector-contrib on github workspace and run make e2e test
What did you expect to see?
e2e test runs sucessfully
What did you see instead?
see error message above
What version did you use?
What config did you use?
Environment
Github workspace
Additional context
as @ankitpatel96 pointed out to me, it seems that from Go 1.21 and onward, there needs to be a sub-version specified in go.mod files. golang/go#62278
Also, all the other go.mod files in collector repo have a 1.22.0 specification, so this seems like an easy, uncontroversial fix.
The text was updated successfully, but these errors were encountered: