open-telemetry / opentelemetry-operator

Kubernetes Operator for OpenTelemetry Collector
Apache License 2.0
1.18k stars 418 forks source link

gomod requires Golang 1.21 but envtest requires 1.22 #2786

Open iblancasa opened 5 months ago

iblancasa commented 5 months ago

Component(s)

No response

What happened?

Description

While trying to run the tests, I got this error:

go fmt ./...
go vet ./...
go: downloading sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20240323114127-e08b286e313e
go: sigs.k8s.io/controller-runtime/tools/setup-envtest@latest: sigs.k8s.io/controller-runtime/tools/setup-envtest@v0.0.0-20240323114127-e08b286e313e requires go >= 1.22.0 (running go 1.21.7; GOTOOLCHAIN=local)
make: *** [Makefile:395: /home/iblancasa/projects/opentelemetry-operator/bin/setup-envtest] Error 1

Kubernetes Version

.

Operator version

main

Collector version

.

Environment information

Environment

OS: (e.g., "Ubuntu 20.04") Compiler(if manually compiled): (e.g., "go 14.2")

Log output

No response

Additional context

No response

swiatekm commented 5 months ago

We should just pin the envtest version to the latest one which supports Go 1.21. This is another example of how #2757 can affect us.

iblancasa commented 5 months ago

We should just pin the envtest version to the latest one which supports Go 1.21. This is another example of how #2757 can affect us.

Agree