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

[v0.8] update to go1.18, debian bullseye #3079

Merged
merged 18 commits into from
Sep 7, 2022

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Sep 2, 2022

Both go1.13 and debian buster reached EOL, and some packages are
no longer available for buster. It's worth noting that this branch
is only used for vendoring in moby/docker 20.10, so updating versions
here is not affecting that, but allows us to run CI here for validation.

Also updated Dockerfiles to use the current stable syntax

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit b434e73)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

thaJeztah commented Sep 2, 2022

hope this works, and that linters are happy 😬

edit: some changes needed;

#12 [gobuild-base 4/6] RUN go get -d github.com/gogo/protobuf/protoc-gen-gogofaster 	&& cd /go/src/github.com/gogo/protobuf 	&& git checkout -q v1.3.1 	&& go install ./protoc-gen-gogo ./protoc-gen-gogofaster ./protoc-gen-gogoslick
#0 0.046 go: go.mod file not found in current directory or any parent directory.
#0 0.046 	'go get' is no longer supported outside a module.
#0 0.046 	To build and install a command, use 'go install' with a version,
#0 0.046 	like 'go install example.com/cmd@latest'
#0 0.046 	For more information, see https://golang.org/doc/go-get-install-deprecation
#0 0.046 	or run 'go help get' or 'go help install'.
#12 ERROR: process "/bin/sh -c go get -d github.com/gogo/protobuf/protoc-gen-gogofaster \t&& cd /go/src/github.com/gogo/protobuf \t&& git checkout -q $GOGO_VERSION \t&& go install ./protoc-gen-gogo ./protoc-gen-gogofaster ./protoc-gen-gogoslick" did not complete successfully: exit code: 1

@thaJeztah thaJeztah force-pushed the 0.8_update_go_and_debian branch 3 times, most recently from d8060a4 to 3631de3 Compare September 4, 2022 15:24
tonistiigi and others added 5 commits September 4, 2022 17:33
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit cc12bc8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
(cherry picked from commit 14a1d6e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This updates all occurrences of Go 1.13 to Go 1.16; also updated
the code that's used to redact credentials in URLs to use the Go
implementation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 22dd74a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
(cherry picked from commit 9cc9d6c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit ac61da5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the 0.8_update_go_and_debian branch 5 times, most recently from 043d0e7 to 3290ffe Compare September 4, 2022 17:34
thaJeztah and others added 11 commits September 4, 2022 19:56
Go 1.17 requires golang.org/x/sys a76c4d0a0096537dc565908b53073460d96c8539 (May 8,
2021) or later, see golang/go#45702. While this seems
to affect macOS only, let's update to the latest version.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Now that this repository moved to go1.16, we can use 'go install' to install
these binaries.

based on commit bd4b02d
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 01e935c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit ebdcd31)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 6676f30)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
similar to commit a633fa4
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 8679e23)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Both go1.13 and debian buster reached EOL, and some packages are
no longer available for buster. It's worth noting that this branch
is _only_ used for vendoring in moby/docker 20.10, so updating versions
here is not affecting that, but allows us to run CI here for validatoin.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
It's failing on go1.18 bullseye, and this branch is only used for vendoring in
moby/moby, which doesn't use this.

```
=== CONT  TestIntegration/TestStargzLazyPull/worker=containerd-snapshotter-stargz
    client_test.go:2158:
        	Error Trace:	client_test.go:2158
        	            				run.go:171
        	Error:      	Received unexpected error:
        	            	rpc error: code = Unknown desc = executor failed running [/bin/touch /foo]: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: rootfs_linux.go:60: mounting "/tmp/bktest_buildkitd4012827731/containerd-stargz/resolv.conf" to rootfs at "/tmp/bktest_containerd3597200052/state/io.containerd.runtime.v2.task/buildkit/h77dkpz3tip7tkyazfjvvoyug/rootfs/etc/resolv.conf" caused: open /tmp/bktest_containerd3597200052/state/io.containerd.runtime.v2.task/buildkit/h77dkpz3tip7tkyazfjvvoyug/rootfs/etc/resolv.conf: function not implemented: unknown
        	            	github.com/moby/buildkit/util/stack.Enable
        	            		/src/util/stack/stack.go:77
        	            	github.com/moby/buildkit/util/grpcerrors.FromGRPC
        	            		/src/util/grpcerrors/grpcerrors.go:188
        	            	github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor
        	            		/src/util/grpcerrors/intercept.go:41
        	            	google.golang.org/grpc.(*ClientConn).Invoke
        	            		/src/vendor/google.golang.org/grpc/call.go:35
        	            	github.com/moby/buildkit/api/services/control.(*controlClient).Solve
        	            		/src/api/services/control/control.pb.go:1321
        	            	github.com/moby/buildkit/client.(*Client).solve.func2
        	            		/src/client/solve.go:201
        	            	golang.org/x/sync/errgroup.(*Group).Go.func1
        	            		/src/vendor/golang.org/x/sync/errgroup/errgroup.go:57
        	            	runtime.goexit
        	            		/usr/local/go/src/runtime/asm_amd64.s:1571
        	            	failed to solve
        	            	github.com/moby/buildkit/client.(*Client).solve.func2
        	            		/src/client/solve.go:214
        	            	golang.org/x/sync/errgroup.(*Group).Go.func1
        	            		/src/vendor/golang.org/x/sync/errgroup/errgroup.go:57
        	            	runtime.goexit
        	            		/usr/local/go/src/runtime/asm_amd64.s:1571
        	Test:       	TestIntegration/TestStargzLazyPull/worker=containerd-snapshotter-stargz
    run.go:166:
        	Error Trace:	run.go:166
        	            				panic.go:482
        	            				testing.go:864
        	            				client_test.go:2158
        	            				run.go:171
        	Error:      	Received unexpected error:
        	            	openfdat /tmp/bktest_containerd_stargz_grpc2440934492/root/snapshotter/snapshots/1/fs: transport endpoint is not connected
        	Test:       	TestIntegration/TestStargzLazyPull/worker=containerd-snapshotter-stargz
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

One failure; not sure what's causing it; could be debian bullseye; I'm adding a "skip";

=== CONT  TestIntegration/TestStargzLazyPull/worker=containerd-snapshotter-stargz
    client_test.go:2158: 
        	Error Trace:	client_test.go:2158
        	            				run.go:171
        	Error:      	Received unexpected error:
        	            	rpc error: code = Unknown desc = executor failed running [/bin/touch /foo]: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: rootfs_linux.go:60: mounting "/tmp/bktest_buildkitd4012827731/containerd-stargz/resolv.conf" to rootfs at "/tmp/bktest_containerd3597200052/state/io.containerd.runtime.v2.task/buildkit/h77dkpz3tip7tkyazfjvvoyug/rootfs/etc/resolv.conf" caused: open /tmp/bktest_containerd3597200052/state/io.containerd.runtime.v2.task/buildkit/h77dkpz3tip7tkyazfjvvoyug/rootfs/etc/resolv.conf: function not implemented: unknown
        	            	github.com/moby/buildkit/util/stack.Enable
        	            		/src/util/stack/stack.go:77
        	            	github.com/moby/buildkit/util/grpcerrors.FromGRPC
        	            		/src/util/grpcerrors/grpcerrors.go:188
        	            	github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor
        	            		/src/util/grpcerrors/intercept.go:41
        	            	google.golang.org/grpc.(*ClientConn).Invoke
        	            		/src/vendor/google.golang.org/grpc/call.go:35
        	            	github.com/moby/buildkit/api/services/control.(*controlClient).Solve
        	            		/src/api/services/control/control.pb.go:1321
        	            	github.com/moby/buildkit/client.(*Client).solve.func2
        	            		/src/client/solve.go:201
        	            	golang.org/x/sync/errgroup.(*Group).Go.func1
        	            		/src/vendor/golang.org/x/sync/errgroup/errgroup.go:57
        	            	runtime.goexit
        	            		/usr/local/go/src/runtime/asm_amd64.s:1571
        	            	failed to solve
        	            	github.com/moby/buildkit/client.(*Client).solve.func2
        	            		/src/client/solve.go:214
        	            	golang.org/x/sync/errgroup.(*Group).Go.func1
        	            		/src/vendor/golang.org/x/sync/errgroup/errgroup.go:57
        	            	runtime.goexit
        	            		/usr/local/go/src/runtime/asm_amd64.s:1571
        	Test:       	TestIntegration/TestStargzLazyPull/worker=containerd-snapshotter-stargz
    run.go:166: 
        	Error Trace:	run.go:166
        	            				panic.go:482
        	            				testing.go:864
        	            				client_test.go:2158
        	            				run.go:171
        	Error:      	Received unexpected error:
        	            	openfdat /tmp/bktest_containerd_stargz_grpc2440934492/root/snapshotter/snapshots/1/fs: transport endpoint is not connected
        	Test:       	TestIntegration/TestStargzLazyPull/worker=containerd-snapshotter-stargz

It's failing on go1.18 bullseye, and this branch is only used for vendoring in
moby/moby, which doesn't use this.

```
=== CONT  TestClientGatewayIntegration/TestClientGatewayExecError/worker=containerd-snapshotter-stargz/rootfs_and_readwrite_scratch_mount
    build_test.go:1215:
        	Error Trace:	build_test.go:1215
        	Error:      	Not equal:
        	            	expected: "7lm22fjwmcq5lhh70drzvtqjc"
        	            	actual  : ""
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-7lm22fjwmcq5lhh70drzvtqjc
        	            	+
        	Test:       	TestClientGatewayIntegration/TestClientGatewayExecError/worker=containerd-snapshotter-stargz/rootfs_and_readwrite_scratch_mount
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

@crazy-max alright; this is green (with some skips); not sure if the commit history is really clean; some commits could be squashed. Overall this PR should't make much of a difference for vendoring in docker (so TBD; do we want to do this), but at least allows running CI in this branch.

@crazy-max
Copy link
Member

and debian buster reached EOL

Buster is not EOL afaik, end of support is June 2024 from what I see: https://wiki.debian.org/LTS

@thaJeztah
Copy link
Member Author

LTS in Debian is slightly different than in other distros; Buster is EOL'd by the Debian project, but the LTS version is a separate project done by volunteers, and they only support a limited set of architectures.

Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, PTAL @tonistiigi

@tonistiigi tonistiigi merged commit 4c987d0 into moby:v0.8 Sep 7, 2022
@thaJeztah thaJeztah deleted the 0.8_update_go_and_debian branch September 7, 2022 19:21
@thaJeztah thaJeztah changed the title [0.8] update to go1.18, debian bullseye [v0.8] update to go1.18, debian bullseye Sep 9, 2022
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.

4 participants