Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
So, who specified the wrong versions? The problem here is that `v0.x.…
…x` is "unstable", and as it specifieds a minimum version, that will include "any breaking change after". try to fix go.opentelemetry.io dependency hell docker ("indirect") and buildkit ("direct") specify `v0.29.0`; ```bash go mod graph --modfile=vendor.mod | grep ' go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp' github.com/docker/docker go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.29.0 github.com/moby/buildkit@v0.11.4 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.29.0 ``` containerd specified v0.34.0 for `go.opentelemetry.io/otel/metric`; ```bash go mod graph --modfile=vendor.mod | grep ' go.opentelemetry.io/otel/metric@' github.com/docker/docker go.opentelemetry.io/otel/metric@v0.34.0 github.com/containerd/containerd@v1.7.0-rc.2 go.opentelemetry.io/otel/metric@v0.34.0 github.com/moby/buildkit@v0.11.4 go.opentelemetry.io/otel/metric@v0.27.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc@v0.37.0 go.opentelemetry.io/otel/metric@v0.34.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.29.0 go.opentelemetry.io/otel/metric@v0.27.0 go.opentelemetry.io/otel/internal/metric@v0.27.0 go.opentelemetry.io/otel/metric@v0.27.0 ``` But BuildKit uses; ```bash git checkout v0.11.4 go mod graph | grep ' go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp' github.com/moby/buildkit go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.29.0 k8s.io/apiserver@v0.22.5 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.20.0 k8s.io/component-base@v0.22.5 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.20.0 ``` But looks like BuildKit has older versions of the other packages installed; ```bash go mod graph | grep ' go.opentelemetry.io/otel/metric@' github.com/moby/buildkit go.opentelemetry.io/otel/metric@v0.27.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.29.0 go.opentelemetry.io/otel/metric@v0.27.0 go.opentelemetry.io/otel/internal/metric@v0.27.0 go.opentelemetry.io/otel/metric@v0.27.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.20.0 go.opentelemetry.io/otel/metric@v0.20.0 go.opentelemetry.io/otel@v0.20.0 go.opentelemetry.io/otel/metric@v0.20.0 go.opentelemetry.io/otel/exporters/otlp@v0.20.0 go.opentelemetry.io/otel/metric@v0.20.0 go.opentelemetry.io/otel/oteltest@v0.20.0 go.opentelemetry.io/otel/metric@v0.20.0 go.opentelemetry.io/otel/sdk/export/metric@v0.20.0 go.opentelemetry.io/otel/metric@v0.20.0 go.opentelemetry.io/otel/sdk/metric@v0.20.0 go.opentelemetry.io/otel/metric@v0.20.0 ``` Looks like `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.31.0` is the first version taking the new metrics into account; https://github.com/open-telemetry/opentelemetry-go-contrib/blob/instrumentation/net/http/otelhttp/v0.31.0/instrumentation/net/http/otelhttp/handler.go#L52-L53 Changed in open-telemetry/opentelemetry-go-contrib@a587520 (open-telemetry/opentelemetry-go-contrib#1977) Unfortunately, updating these to v0.31.0 works around the other issues, but breaks BuildKit, which doesn't support the newer API; go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.31.0 // indirect // updated to v0.31+ to account for moby#44530 (comment) go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.31.0 // indirect // updated v0.31+ to account for moby#44530 (comment) ```bash Building static bundles/binary-daemon/dockerd (linux/arm64)... vendor/github.com/moby/buildkit/util/tracing/transform/span.go:34:26: sd.InstrumentationLibrarySpans undefined (type *"github.com/docker/docker/vendor/go.opentelemetry.io/proto/otlp/trace/v1".ResourceSpans has no field or method InstrumentationLibrarySpans) vendor/github.com/moby/buildkit/util/tracing/transform/span.go:56:17: undefined: v11.InstrumentationLibrary vendor/github.com/moby/buildkit/util/tracing/transform/instrumentation.go:9:42: undefined: commonpb.InstrumentationLibrary vendor/github.com/moby/buildkit/worker/containerd/containerd.go:56:74: cannot use &gogoptypes.Empty{} (value of type *"github.com/docker/docker/vendor/github.com/gogo/protobuf/types".Empty) as *emptypb.Empty value in argument to client.IntrospectionService().Server ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- Loading branch information