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

vendor: buildkit, containerd, runc, vt100, opentelemetry #3232

Closed
wants to merge 1 commit into from

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Aug 4, 2021

vendor: github.com/containerd/containerd v1.5.5

containerd/containerd@0e8719f...v1.5.5

vendor: github.com/moby/buildkit fc3c1821711153ba8f39bf4d523d7ec83ecb7379 (v0.9.1-dev)

moby/buildkit@9f254e1...fc3c182

vendor: github.com/opencontainers/runc v1.0.1

opencontainers/runc@b9ee9c6...v1.0.1

vendor: github.com/tonistiigi/vt100 8066bb97264f56c603341d3fce837bb504e662ef (master)

Switch to https://github.com/tonistiigi/vt100 to avoid replace rule that breaks go get (fork of https://github.com/jaguilar/vt100). More info moby/buildkit#2180

vendor: go.opentelemetry.io

Remove github.com/opentracing/opentracing-go and switch to:

  • go.opentelemetry.io/contrib v0.21.0
  • go.opentelemetry.io/otel v1.0.0-RC1
  • go.opentelemetry.io/proto v0.9.0

More info: moby/buildkit#2152 moby/buildkit#2192 moby/buildkit#2238

cc @thaJeztah

Signed-off-by: CrazyMax crazy-max@users.noreply.github.com

@crazy-max
Copy link
Member Author

crazy-max commented Aug 4, 2021

Need to merge moby/buildkit#2283 first:

#19 [linux/amd64 build 1/1] RUN --mount=ro --mount=type=cache,target=/root/.cache     --mount=from=dockercore/golang-cross:xx-sdk-extras,target=/xx-sdk,src=/xx-sdk     --mount=type=tmpfs,target=cli/winresources     xx-go --wrap &&     TARGET=/out ./scripts/build/binary &&     xx-verify $([ "static" = "static" ] && echo "--static") /out/docker
#19 1.538 Building static docker-linux-arm-v7
#19 3.648 vendor/github.com/moby/buildkit/client/client.go:20:2: code in directory /go/src/github.com/docker/cli/vendor/github.com/moby/buildkit/util/tracing/otlptracegrpc expects import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
#19 3.649 vendor/github.com/moby/buildkit/util/tracing/otlptracegrpc/client.go:24:2: cannot find package "go.opentelemetry.io/otel/exporters/otlp/otlptrace" in any of:
#19 3.649 	/go/src/github.com/docker/cli/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace (vendor tree)
#19 3.649 	/usr/local/go/src/go.opentelemetry.io/otel/exporters/otlp/otlptrace (from $GOROOT)
#19 3.649 	/go/src/go.opentelemetry.io/otel/exporters/otlp/otlptrace (from $GOPATH)
#19 3.649 vendor/github.com/moby/buildkit/util/tracing/otlptracegrpc/client.go:28:2: cannot find package "go.opentelemetry.io/proto/otlp/collector/trace/v1" in any of:
#19 3.649 	/go/src/github.com/docker/cli/vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1 (vendor tree)
#19 3.649 	/usr/local/go/src/go.opentelemetry.io/proto/otlp/collector/trace/v1 (from $GOROOT)
#19 3.649 	/go/src/go.opentelemetry.io/proto/otlp/collector/trace/v1 (from $GOPATH)
#19 3.650 vendor/github.com/moby/buildkit/util/tracing/otlptracegrpc/client.go:29:2: cannot find package "go.opentelemetry.io/proto/otlp/trace/v1" in any of:
#19 3.650 	/go/src/github.com/docker/cli/vendor/go.opentelemetry.io/proto/otlp/trace/v1 (vendor tree)
#19 3.650 	/usr/local/go/src/go.opentelemetry.io/proto/otlp/trace/v1 (from $GOROOT)
#19 3.650 	/go/src/go.opentelemetry.io/proto/otlp/trace/v1 (from $GOPATH)
#19 ERROR: process "/bin/sh -c xx-go --wrap &&     TARGET=/out ./scripts/build/binary &&     xx-verify $([ \"$GO_LINKMODE\" = \"static\" ] && echo \"--static\") /out/docker" did not complete successfully: exit code: 1

@crazy-max

This comment has been minimized.

@crazy-max crazy-max force-pushed the update-vendor branch 2 times, most recently from a66c3da to 8718d4f Compare August 5, 2021 08:07
@crazy-max crazy-max changed the title vendor: update buildkit, vt100, opentelemetry vendor: buildkit, containerd, runc, vt100, opentelemetry Aug 5, 2021
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max
Copy link
Member Author

crazy-max commented Aug 6, 2021

Not sure how to deal with go.mod in subfolder with vndr:

 > [linux/amd64 build 1/1] RUN --mount=ro --mount=type=cache,target=/root/.cache     --mount=from=dockercore/golang-cross:xx-sdk-extras,target=/xx-sdk,src=/xx-sdk     --mount=type=tmpfs,target=cli/winresources     xx-go --wrap &&     TARGET=/out ./scripts/build/binary &&     xx-verify $([ "static" = "static" ] && echo "--static") /out/docker:
#19 1.471 Building static docker-linux-arm64
#19 3.670 vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go:25:2: cannot find package "google.golang.org/protobuf/reflect/protoreflect" in any of:
#19 3.670 	/go/src/github.com/docker/cli/vendor/google.golang.org/protobuf/reflect/protoreflect (vendor tree)
#19 3.670 	/usr/local/go/src/google.golang.org/protobuf/reflect/protoreflect (from $GOROOT)
#19 3.670 	/go/src/google.golang.org/protobuf/reflect/protoreflect (from $GOPATH)
#19 3.677 vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go:26:2: cannot find package "google.golang.org/protobuf/runtime/protoimpl" in any of:
#19 3.677 	/go/src/github.com/docker/cli/vendor/google.golang.org/protobuf/runtime/protoimpl (vendor tree)
#19 3.677 	/usr/local/go/src/google.golang.org/protobuf/runtime/protoimpl (from $GOROOT)
#19 3.677 	/go/src/google.golang.org/protobuf/runtime/protoimpl (from $GOPATH)
------

vndr should use the otlp folder to solve deps but we cannot define go.opentelemetry.io/proto/otlp in vendor.conf:

2021/08/06 08:26:11 Collecting initial packages
2021/08/06 08:26:23 Download dependencies
2021/08/06 08:26:28 WARNING: package go.opentelemetry.io/proto/otlp is not root import, should be go.opentelemetry.io/proto

I think vndr can't handle nested vendoring unfortunately :( LK4D4/vndr#5

@thaJeztah thaJeztah mentioned this pull request Aug 9, 2021
@thaJeztah
Copy link
Member

For the first one, it looks like vendor.conf specifies github.com/golang/protobuf for protobuf, and it looks like various dependencies, such as etcd import it with that name;

proto "github.com/golang/protobuf/proto"

But runc and go.openelemetry.io reference it under the google.golang.org/protobuf name.

I'm not sure if both can live side-by-side, or if that will be causing issues. Their readme mentions https://github.com/golang/protobuf#go-support-for-protocol-buffers;

Versions v1.4 and later of github.com/golang/protobuf are implemented in terms of google.golang.org/protobuf. Programs which use both modules must use at least version v1.4 of this one.

.. hm.. actually; looks like the go.opentelemetry.io/proto/otlp module specifies both; https://github.com/open-telemetry/opentelemetry-proto-go/blob/v0.9.0/otlp/go.mod#L5-L10

require (
	github.com/golang/protobuf v1.5.2
	github.com/grpc-ecosystem/grpc-gateway v1.16.0
	google.golang.org/grpc v1.37.1
	google.golang.org/protobuf v1.26.0
)

So we probably need both google.golang.org/protobuf and github.com/golang/protobuf in vendor.conf, using the same version as BuildKit uses; https://github.com/moby/buildkit/blob/v0.9.0/vendor/modules.txt#L534

For this warning:

WARNING: package go.opentelemetry.io/proto/otlp is not root import, should be go.opentelemetry.io/proto

I think we should be able to specify go.opentelemetry.io/proto in vendor.conf, and use the git commit matching the otlp/v0.9.0 tag (which is what go modules will use for the otlp submodule); https://github.com/open-telemetry/opentelemetry-proto-go/releases/tag/otlp%2Fv0.9.0

Giving that a quick try in #3237

@crazy-max crazy-max closed this Feb 25, 2022
@crazy-max crazy-max deleted the update-vendor branch February 25, 2022 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants