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

ci(dockerd): trigger through chat-ops #3003

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Aug 5, 2022

While checking moby/moby#43661 I encounter an issue with our dockerd workflow and some recent tests added here fail against this worker.

I changed the behavior of the workflow to add a trigger through comment in PR (chat-ops): crazy-max#8

# will trigger dockerd workflow with default moby version (20.10.18 atm)
/test-dockerd
# download and test 20.10.17
/test-dockerd 20.10.17
# build master branch and test
/test-dockerd https://github.com/moby/moby.git#master

I skip the tests in the meantime but we might be able to make them compatible with dockerd worker (cc @jedevc @tonistiigi @deitch):

=== CONT  TestIntegration/TestExportAnnotations/worker=dockerd
    client_test.go:6132: 
        	Error Trace:	client_test.go:6132
        	            				run.go:85
        	            				run.go:184
        	Error:      	Received unexpected error:
        	            	exporter "image" could not be found
        	            	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:196
        	            	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:1535
        	            	github.com/moby/buildkit/client.(*Client).solve.func2
        	            		/src/client/solve.go:231
        	            	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:244
        	            	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/TestExportAnnotations/worker=dockerd
=== CONT  TestIntegration/TestCallInfo/worker=dockerd
    client_test.go:6039: 
        	Error Trace:	client_test.go:6039
        	            				run.go:85
        	            				run.go:184
        	Error:      	Received unexpected error:
        	            	Unimplemented: unknown method Info for service moby.buildkit.v1.Control
        	            	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:196
        	            	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).Info
        	            		/src/api/services/control/control.pb.go:1616
        	            	github.com/moby/buildkit/client.(*Client).Info
        	            		/src/client/info.go:22
        	            	github.com/moby/buildkit/client.testCallInfo
        	            		/src/client/client_test.go:6038
        	            	github.com/moby/buildkit/util/testutil/integration.testFunc.Run
        	            		/src/util/testutil/integration/run.go:85
        	            	github.com/moby/buildkit/util/testutil/integration.Run.func2.1
        	            		/src/util/testutil/integration/run.go:184
        	            	testing.tRunner
        	            		/usr/local/go/src/testing/testing.go:1439
        	            	runtime.goexit
        	            		/usr/local/go/src/runtime/asm_amd64.s:1571
        	            	failed to call info
        	            	github.com/moby/buildkit/client.(*Client).Info
        	            		/src/client/info.go:24
        	            	github.com/moby/buildkit/client.testCallInfo
        	            		/src/client/client_test.go:6038
        	            	github.com/moby/buildkit/util/testutil/integration.testFunc.Run
        	            		/src/util/testutil/integration/run.go:85
        	            	github.com/moby/buildkit/util/testutil/integration.Run.func2.1
        	            		/src/util/testutil/integration/run.go:184
        	            	testing.tRunner
        	            		/usr/local/go/src/testing/testing.go:1439
        	            	runtime.goexit
        	            		/usr/local/go/src/runtime/asm_amd64.s:1571
        	Test:       	TestIntegration/TestCallInfo/worker=dockerd
=== CONT  TestIntegration/TestOCILayoutPlatformSource/worker=dockerd
    client_test.go:1733: 
        	Error Trace:	client_test.go:1733
        	            				run.go:85
        	            				run.go:184
        	Error:      	Received unexpected error:
        	            	exporter "oci" could not be found
        	            	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:196
        	            	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:1535
        	            	github.com/moby/buildkit/client.(*Client).solve.func2
        	            		/src/client/solve.go:231
        	            	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:244
        	            	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/TestOCILayoutPlatformSource/worker=dockerd
=== CONT  TestIntegration/TestOCILayoutSource/worker=dockerd
    client_test.go:1603: 
        	Error Trace:	client_test.go:1603
        	            				run.go:85
        	            				run.go:184
        	Error:      	Received unexpected error:
        	            	exporter "oci" could not be found
        	            	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:196
        	            	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:1535
        	            	github.com/moby/buildkit/client.(*Client).solve.func2
        	            		/src/client/solve.go:231
        	            	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:244
        	            	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/TestOCILayoutSource/worker=dockerd
=== CONT  TestIntegration/TestNamedOCILayoutContext/worker=dockerd/frontend=client
    dockerfile_test.go:5379: 
        	Error Trace:	dockerfile_test.go:5379
        	            				run.go:85
        	            				run.go:184
        	Error:      	Received unexpected error:
        	            	exporter "oci" could not be found
        	            	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:196
        	            	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:1535
        	            	github.com/moby/buildkit/client.(*Client).solve.func2
        	            		/src/client/solve.go:231
        	            	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:244
        	            	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/TestNamedOCILayoutContext/worker=dockerd/frontend=client
=== CONT  TestIntegration/TestNamedImageContextTimestamps/worker=dockerd/frontend=client
2022/08/05 01:40:21 http2: server connection error from localhost: connection error: PROTOCOL_ERROR
    dockerfile_test.go:5230: 
        	Error Trace:	dockerfile_test.go:5230
        	            				run.go:85
        	            				run.go:184
        	Error:      	Received unexpected error:
        	            	exporter "image" could not be found
        	            	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:196
        	            	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:1535
        	            	github.com/moby/buildkit/client.(*Client).solve.func2
        	            		/src/client/solve.go:231
        	            	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:244
        	            	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/TestNamedImageContextTimestamps/worker=dockerd/frontend=client

Copy link
Member

@jedevc jedevc left a comment

Choose a reason for hiding this comment

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

Looks like a good idea to run this on PRs 🎉

For test skipping, woops, most of those should be skipped in the first place I think - I don't think there's any point in trying to get them to work with the moby exporter in dockerd, since what we're interested in testing are features of the exported images themselves, e.g. annotations need to be attached to containerimage/oci images, oci layout sources need the oci exporter, the timestamps test compares timestamps on built images.

Only one I'm not sure about is the TestCallInfo: Unimplemented: unknown method Info for service moby.buildkit.v1.Control - is that moby's buildkit worker not implementing one of the methods? If so, maybe we should have an explicit check that moby's error message is unimplemented, so that we remember to re-enable it once moby re-vendors buildkit?

@crazy-max
Copy link
Member Author

crazy-max commented Aug 5, 2022

Only one I'm not sure about is the TestCallInfo: Unimplemented: unknown method Info for service moby.buildkit.v1.Control - is that moby's buildkit worker not implementing one of the methods? If so, maybe we should have an explicit check that moby's error message is unimplemented, so that we remember to re-enable it once moby re-vendors buildkit?

As it's only on SkipIfDockerd with message not implemented I think it's enough no?: https://github.com/moby/buildkit/runs/7684232245?check_suite_focus=true#step:9:1201

=== CONT  TestIntegration/TestCallInfo/worker=dockerd
    client_test.go:6037: dockerd worker can not currently run this test due to missing features (not implemented)

Also yes I think I will open a PR on moby just to add the implementation and backport to 22.06 and maybe 20.10 (cc @thaJeztah)

Edit: BuildKit 0.10.3 on Moby does not have #2725 so we might need to wait for 0.11 or we could backport to v0.10 branch if you are ok with it @tonistiigi?

@tonistiigi
Copy link
Member

Running this on pull requests doesn't really work because the changes a pull request makes are not in the dockerd worker until PR gets merged and vendored into dockerd.

@crazy-max crazy-max changed the title ci: enhance dockerd workflow ci(dockerd): trigger through chat-ops Sep 9, 2022
@crazy-max
Copy link
Member Author

crazy-max commented Sep 9, 2022

Changed the behavior of the workflow to add a trigger through comment in PR (chat-ops): crazy-max#8

# will trigger dockerd workflow with default moby version (20.10.18 atm)
/test-dockerd
# download and test 20.10.17
/test-dockerd 20.10.17
# build master branch and test
/test-dockerd https://github.com/moby/moby.git#master

Edit: Actually the checked out ref does not look right.

@crazy-max crazy-max marked this pull request as draft September 9, 2022 16:14
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.

3 participants